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

Sending "correct" UA to assure full functionality of Google services

- also fixed startup issue with QtCurve theme
This commit is contained in:
nowrep 2012-03-31 21:36:27 +02:00
parent 5348c72e9d
commit aa6962f8cb
3 changed files with 8 additions and 2 deletions

View File

@ -47,7 +47,6 @@
#include "locationbarsettings.h" #include "locationbarsettings.h"
#include "webviewsettings.h" #include "webviewsettings.h"
#include "clearprivatedata.h" #include "clearprivatedata.h"
#include "proxystyle.h"
#include "commandlineoptions.h" #include "commandlineoptions.h"
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
@ -190,7 +189,6 @@ MainApplication::MainApplication(int &argc, char** argv)
setQuitOnLastWindowClosed(true); setQuitOnLastWindowClosed(true);
#endif #endif
setStyle(new ProxyStyle);
setApplicationName("QupZilla"); setApplicationName("QupZilla");
setApplicationVersion(QupZilla::VERSION); setApplicationVersion(QupZilla::VERSION);
setOrganizationDomain("qupzilla"); setOrganizationDomain("qupzilla");

View File

@ -423,6 +423,11 @@ void WebPage::cleanBlockedObjects()
QString WebPage::userAgentForUrl(const QUrl &url) const QString WebPage::userAgentForUrl(const QUrl &url) const
{ {
// Let Google services play nice with us
if (url.host().contains("google")) {
return "Mozilla/5.0 " + qz_buildSystem() + " AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7";
}
if (m_userAgent.isEmpty()) { if (m_userAgent.isEmpty()) {
m_userAgent = QWebPage::userAgentForUrl(url); m_userAgent = QWebPage::userAgentForUrl(url);
#ifdef Q_WS_MAC #ifdef Q_WS_MAC

View File

@ -17,6 +17,7 @@
* ============================================================ */ * ============================================================ */
#include "mainapplication.h" #include "mainapplication.h"
#include "proxystyle.h"
#ifdef Q_WS_X11 #ifdef Q_WS_X11
#include <iostream> #include <iostream>
@ -51,5 +52,7 @@ int main(int argc, char* argv[])
return 0; return 0;
} }
app.setStyle(new ProxyStyle);
return app.exec(); return app.exec();
} }