From b37a02e0781c2840cbfe9f55b9d5be4f3f0c62a8 Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 26 Dec 2011 22:54:03 +0100 Subject: [PATCH] Checking QtWebKit version rather than global Qt version. See #96 - choose (not) to compile with using QWebView::selectedHtml function --- src/webview/webview.cpp | 4 ++-- src/webview/webview.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index 2d79adad4..d1a29437b 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -540,7 +540,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event) m_menu->addAction(engine.icon, tr("Search \"%1 ..\" with %2").arg(selectedText, engine.name), this, SLOT(searchSelectedText())); } -#if QT_VERSION == 0x040800 +#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0)) // still bugged in 4.8 RC (it shows selection of webkit's internal source, not html from page) // it may or may not be bug, but this implementation is useless for us // @@ -643,7 +643,7 @@ void WebView::showSource() p_QupZilla->showSource(); } -#if QT_VERSION >= 0x040800 +#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0)) void WebView::showSourceOfSelection() { p_QupZilla->showSource(selectedHtml()); diff --git a/src/webview/webview.h b/src/webview/webview.h index b07d26385..582600534 100644 --- a/src/webview/webview.h +++ b/src/webview/webview.h @@ -115,7 +115,7 @@ private slots: void sendLinkByMail(); void bookmarkLink(); void showSource(); -#if QT_VERSION >= 0x040800 +#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0)) void showSourceOfSelection(); #endif void showSiteInfo();