From 6bf53c033281d5086ecb9e1c10c28c3256f61529 Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 9 Jan 2013 19:00:48 +0100 Subject: [PATCH] [QtWebKit 2.3] Disable unnecessary workarounds. Disabled touch mocking and fake user agent. --- src/lib/other/useragentmanager.cpp | 2 +- src/lib/webview/webview.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/other/useragentmanager.cpp b/src/lib/other/useragentmanager.cpp index f52002f00..5a0760808 100644 --- a/src/lib/other/useragentmanager.cpp +++ b/src/lib/other/useragentmanager.cpp @@ -61,7 +61,7 @@ QString UserAgentManager::userAgentForUrl(const QUrl &url) const } } -#if QT_VERSION < 0x050000 +#if QT_VERSION < 0x050000 && (QTWEBKIT_VERSION < QTWEBKIT_VERSION_CHECK(2, 3, 0)) if (host.contains(QLatin1String("google"))) { return m_fakeUserAgent; } diff --git a/src/lib/webview/webview.cpp b/src/lib/webview/webview.cpp index 2efa09e2c..20fb26f6f 100644 --- a/src/lib/webview/webview.cpp +++ b/src/lib/webview/webview.cpp @@ -1156,8 +1156,8 @@ void WebView::setZoom(int zoom) /// bool WebView::eventFilter(QObject* obj, QEvent* event) { -// This hack is no longer needed with Qt 5 -#if QT_VERSION < 0x050000 +// This hack is no longer needed with QtWebKit 2.3 (bundled in Qt 5) +#if QT_VERSION < 0x050000 && (QTWEBKIT_VERSION < QTWEBKIT_VERSION_CHECK(2, 3, 0)) if (obj != this || m_disableTouchMocking) { return false; }