Changeset View
Changeset View
Standalone View
Standalone View
src/core/kprotocolmanager.cpp
Show All 38 Lines | |||||
39 | #include <QUrl> | 39 | #include <QUrl> | ||
40 | #include <QSslSocket> | 40 | #include <QSslSocket> | ||
41 | #include <QHostAddress> | 41 | #include <QHostAddress> | ||
42 | #include <QHostInfo> | 42 | #include <QHostInfo> | ||
43 | #include <QDBusReply> | 43 | #include <QDBusReply> | ||
44 | #include <QDBusInterface> | 44 | #include <QDBusInterface> | ||
45 | #include <QCache> | 45 | #include <QCache> | ||
46 | #include <QLocale> | 46 | #include <QLocale> | ||
47 | #include <QRegularExpression> | ||||
47 | #include <qstandardpaths.h> | 48 | #include <qstandardpaths.h> | ||
48 | #include <qmimedatabase.h> | 49 | #include <qmimedatabase.h> | ||
49 | 50 | | |||
50 | #if !defined(QT_NO_NETWORKPROXY) && (defined (Q_OS_WIN32) || defined(Q_OS_MAC)) | 51 | #if !defined(QT_NO_NETWORKPROXY) && (defined (Q_OS_WIN32) || defined(Q_OS_MAC)) | ||
51 | #include <QNetworkProxyFactory> | 52 | #include <QNetworkProxyFactory> | ||
52 | #include <QNetworkProxyQuery> | 53 | #include <QNetworkProxyQuery> | ||
53 | #endif | 54 | #endif | ||
54 | 55 | | |||
▲ Show 20 Lines • Show All 840 Lines • ▼ Show 20 Line(s) | 868 | if (sysInfoFound) { | |||
895 | if (modifiers.contains(QL1C('l'))) { | 896 | if (modifiers.contains(QL1C('l'))) { | ||
896 | agentStr.replace(QL1S("%language%"), QLocale::languageToString(QLocale().language()), Qt::CaseInsensitive); | 897 | agentStr.replace(QL1S("%language%"), QLocale::languageToString(QLocale().language()), Qt::CaseInsensitive); | ||
897 | } else { | 898 | } else { | ||
898 | agentStr.remove(QStringLiteral("%language%"), Qt::CaseInsensitive); | 899 | agentStr.remove(QStringLiteral("%language%"), Qt::CaseInsensitive); | ||
899 | } | 900 | } | ||
900 | 901 | | |||
901 | // Clean up unnecessary separators that could be left over from the | 902 | // Clean up unnecessary separators that could be left over from the | ||
902 | // possible keyword removal above... | 903 | // possible keyword removal above... | ||
903 | agentStr.replace(QRegExp(QL1S("[(]\\s*[;]\\s*")), QStringLiteral("(")); | 904 | agentStr.replace(QRegularExpression(QStringLiteral("[(]\\s*[;]\\s*")), QStringLiteral("(")); | ||
904 | agentStr.replace(QRegExp(QL1S("[;]\\s*[;]\\s*")), QStringLiteral("; ")); | 905 | agentStr.replace(QRegularExpression(QStringLiteral("[;]\\s*[;]\\s*")), QStringLiteral("; ")); | ||
905 | agentStr.replace(QRegExp(QL1S("\\s*[;]\\s*[)]")), QStringLiteral(")")); | 906 | agentStr.replace(QRegularExpression(QStringLiteral("\\s*[;]\\s*[)]")), QStringLiteral(")")); | ||
906 | } else { | 907 | } else { | ||
907 | agentStr.remove(QStringLiteral("%osname%")); | 908 | agentStr.remove(QStringLiteral("%osname%")); | ||
908 | agentStr.remove(QStringLiteral("%osversion%")); | 909 | agentStr.remove(QStringLiteral("%osversion%")); | ||
909 | agentStr.remove(QStringLiteral("%platform%")); | 910 | agentStr.remove(QStringLiteral("%platform%")); | ||
910 | agentStr.remove(QStringLiteral("%systype%")); | 911 | agentStr.remove(QStringLiteral("%systype%")); | ||
911 | agentStr.remove(QStringLiteral("%language%")); | 912 | agentStr.remove(QStringLiteral("%language%")); | ||
912 | } | 913 | } | ||
913 | 914 | | |||
▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines |