LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fix-movetoanchor-for-qt5.patch of Package bibletime (Project Education)

From fa3625f7b85f6ab5510914ab97e8ea231c252175 Mon Sep 17 00:00:00 2001
From: Gary Holmlund <gary@holmlundg.(none)>
Date: Sun, 16 Dec 2012 18:30:14 -0800
Subject: [PATCH 091/133] Fix moveToAnchor for Qt5

---
 src/frontend/display/bthtmlreaddisplay.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/frontend/display/bthtmlreaddisplay.cpp b/src/frontend/display/bthtmlreaddisplay.cpp
index 5cb69fb..433cec4 100644
--- a/src/frontend/display/bthtmlreaddisplay.cpp
+++ b/src/frontend/display/bthtmlreaddisplay.cpp
@@ -247,7 +247,11 @@ void BtHtmlReadDisplay::selectAll() {
 
 // Scroll QWebView to the correct location as specified by the anchor
 void BtHtmlReadDisplay::moveToAnchor( const QString& anchor ) {
+#if QT_VERSION >= 0x040700
+    mainFrame()->scrollToAnchor(anchor);
+#else
     slotGoToAnchor(anchor);
+#endif
 }
 
 // Scroll the QWebView to the correct location specified by anchor
-- 
1.8.1.4