1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Use cpu architecture with os name everywhere

This commit is contained in:
David Rosca 2016-06-14 11:01:22 +02:00
parent e5de2a2403
commit 766a661bfe
4 changed files with 16 additions and 10 deletions

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")); "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("%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%"), bPage.replace(QLatin1String("%INFO_APP%"),
#ifdef GIT_REVISION #ifdef GIT_REVISION
QString("%1 (%2)").arg(Qz::VERSION, GIT_REVISION) QString("%1 (%2)").arg(Qz::VERSION, GIT_REVISION)
@ -383,7 +383,7 @@ QString QupZillaSchemeReply::configPage()
#endif #endif
) + ) +
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Qt version"), QT_VERSION_STR) + 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%"), cPage.replace(QLatin1String("%PATHS-TEXT%"),
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), DataPaths::currentProfilePath()) + QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), DataPaths::currentProfilePath()) +

View File

@ -37,15 +37,12 @@ UserAgentDialog::UserAgentDialog(QWidget* parent)
ui->globalComboBox->setLayoutDirection(Qt::LeftToRight); ui->globalComboBox->setLayoutDirection(Qt::LeftToRight);
ui->table->setLayoutDirection(Qt::LeftToRight); ui->table->setLayoutDirection(Qt::LeftToRight);
const QString arch = QzTools::cpuArchitecture(); const QString os = QzTools::operatingSystemLong();
QString platform = QzTools::operatingSystem();
if (!arch.isEmpty())
platform.append(QL1S(" ") + arch);
m_knownUserAgents << QString("Opera/9.80 (%1) Presto/2.12.388 Version/12.16").arg(platform) 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/51.0.2704.84 Safari/537.36").arg(platform) << 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(platform) << 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(platform); << QString("Mozilla/5.0 (%1; rv:47.0) Gecko/20100101 Firefox/47.0").arg(os);
ui->globalComboBox->addItems(m_knownUserAgents); ui->globalComboBox->addItems(m_knownUserAgents);

View File

@ -965,3 +965,11 @@ QString QzTools::cpuArchitecture()
return QString(); return QString();
} }
QString QzTools::operatingSystemLong()
{
const QString arch = cpuArchitecture();
if (arch.isEmpty())
return QzTools::operatingSystem();
return QzTools::operatingSystem() + QSL(" ") + arch;
}

View File

@ -85,6 +85,7 @@ public:
static QString operatingSystem(); static QString operatingSystem();
static QString cpuArchitecture(); static QString cpuArchitecture();
static QString operatingSystemLong();
static void setWmClass(const QString &name, const QWidget* widget); static void setWmClass(const QString &name, const QWidget* widget);