diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 25f0982ba..04a438d5a 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -47,7 +47,6 @@ #include "locationbarsettings.h" #include "webviewsettings.h" #include "clearprivatedata.h" -#include "proxystyle.h" #include "commandlineoptions.h" #ifdef Q_WS_MAC @@ -190,7 +189,6 @@ MainApplication::MainApplication(int &argc, char** argv) setQuitOnLastWindowClosed(true); #endif - setStyle(new ProxyStyle); setApplicationName("QupZilla"); setApplicationVersion(QupZilla::VERSION); setOrganizationDomain("qupzilla"); diff --git a/src/lib/webview/webpage.cpp b/src/lib/webview/webpage.cpp index 18da9e2cf..0117fb763 100644 --- a/src/lib/webview/webpage.cpp +++ b/src/lib/webview/webpage.cpp @@ -423,6 +423,11 @@ void WebPage::cleanBlockedObjects() 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()) { m_userAgent = QWebPage::userAgentForUrl(url); #ifdef Q_WS_MAC diff --git a/src/main/main.cpp b/src/main/main.cpp index 03010e675..5bf04462a 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -17,6 +17,7 @@ * ============================================================ */ #include "mainapplication.h" +#include "proxystyle.h" #ifdef Q_WS_X11 #include @@ -51,5 +52,7 @@ int main(int argc, char* argv[]) return 0; } + app.setStyle(new ProxyStyle); + return app.exec(); }