1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Merge branch 'v2.0'

This commit is contained in:
David Rosca 2016-06-14 11:13:02 +02:00
commit b5fabd3ca1
6 changed files with 51 additions and 10 deletions

1
.gitignore vendored
View File

@ -37,3 +37,4 @@ hunspell
callgrind.out.*
tests/autotests/autotests
.ycm_extra_conf.py*
*.stash

View File

@ -38,7 +38,7 @@ function checkFields()
<p>
<table>
<form action="https://www.qupzilla.com/reportbug.php" onsubmit="return checkFields()" method="POST">
<tr><td>%EMAIL%*:</td><td><input type="text" id="mail" name="mail" required> </tr>
<tr><td>%EMAIL%*:</td><td><input type="email" id="mail" name="mail"> </tr>
<tr><td>%TYPE%:</td><td><input type="text" id="type" name="type" required> </tr>
<tr><td>%DESCRIPTION%:</td><td><textarea id="text" name="text" required></textarea> </tr>
<tr><td colspan=2 align=%RIGHT_STR%><input class="submit" type="submit" name="ok" value="%SEND%"> </tr>

View File

@ -144,7 +144,7 @@ QString QupZillaSchemeReply::reportbugPage()
"bug report <a href=%1>here</a> first.").arg("https://github.com/QupZilla/qupzilla/wiki/Bug-Reports target=_blank"));
bPage.replace(QLatin1String("%FIELDS-ARE-REQUIRED%"), tr("Please fill out all required fields!"));
bPage.replace(QLatin1String("%INFO_OS%"), QzTools::operatingSystem());
bPage.replace(QLatin1String("%INFO_OS%"), QzTools::operatingSystemLong());
bPage.replace(QLatin1String("%INFO_APP%"),
#ifdef GIT_REVISION
QString("%1 (%2)").arg(Qz::VERSION, GIT_REVISION)
@ -383,7 +383,7 @@ QString QupZillaSchemeReply::configPage()
#endif
) +
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Qt version"), QT_VERSION_STR) +
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), QzTools::operatingSystem()));
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), QzTools::operatingSystemLong()));
cPage.replace(QLatin1String("%PATHS-TEXT%"),
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), DataPaths::currentProfilePath()) +

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -37,11 +37,12 @@ UserAgentDialog::UserAgentDialog(QWidget* parent)
ui->globalComboBox->setLayoutDirection(Qt::LeftToRight);
ui->table->setLayoutDirection(Qt::LeftToRight);
const QString os = QzTools::operatingSystem();
const QString os = QzTools::operatingSystemLong();
m_knownUserAgents << QString("Opera/9.80 (%1) Presto/2.12.388 Version/12.16").arg(os)
<< QString("Mozilla/5.0 (%1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36").arg(os)
<< QString("Mozilla/5.0 (%1) AppleWebKit/537.51.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A").arg(os)
<< QString("Mozilla/5.0 (%1; rv:42.0) Gecko/20100101 Firefox/42.0").arg(os);
<< QString("Mozilla/5.0 (%1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36").arg(os)
<< QString("Mozilla/5.0 (%1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7").arg(os)
<< QString("Mozilla/5.0 (%1; rv:47.0) Gecko/20100101 Firefox/47.0").arg(os);
ui->globalComboBox->addItems(m_knownUserAgents);

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -936,3 +936,40 @@ QString QzTools::operatingSystem()
#endif
}
QString QzTools::cpuArchitecture()
{
#if defined(__x86_64__) || defined(_M_X64)
return QSL("x86_64");
#endif
#if defined(_M_IX86)
return QSL("x86");
#endif
#if defined(__i686__)
return QSL("i686");
#endif
#if defined(__i586__)
return QSL("i586");
#endif
#if defined(__i486__)
return QSL("i486");
#endif
#if defined(__i386__)
return QSL("i386");
#endif
#if defined(__aarch64__)
return QSL("arm64");
#endif
#if defined(__arm__) || defined(_M_ARM)
return QSL("arm");
#endif
return QString();
}
QString QzTools::operatingSystemLong()
{
const QString arch = cpuArchitecture();
if (arch.isEmpty())
return QzTools::operatingSystem();
return QzTools::operatingSystem() + QSL(" ") + arch;
}

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -84,6 +84,8 @@ public:
static QKeySequence actionShortcut(QKeySequence shortcut, QKeySequence fallBack, QKeySequence shortcutRtl = QKeySequence(), QKeySequence fallbackRtl = QKeySequence());
static QString operatingSystem();
static QString cpuArchitecture();
static QString operatingSystemLong();
static void setWmClass(const QString &name, const QWidget* widget);