Blame 0091-Fix-moveToAnchor-for-Qt5.patch
|
Rex Dieter |
c319351 |
From fa3625f7b85f6ab5510914ab97e8ea231c252175 Mon Sep 17 00:00:00 2001
|
|
Rex Dieter |
c319351 |
From: Gary Holmlund <gary@holmlundg.(none)>
|
|
Rex Dieter |
c319351 |
Date: Sun, 16 Dec 2012 18:30:14 -0800
|
|
Rex Dieter |
c319351 |
Subject: [PATCH 091/133] Fix moveToAnchor for Qt5
|
|
Rex Dieter |
c319351 |
|
|
Rex Dieter |
c319351 |
---
|
|
Rex Dieter |
c319351 |
src/frontend/display/bthtmlreaddisplay.cpp | 4 ++++
|
|
Rex Dieter |
c319351 |
1 file changed, 4 insertions(+)
|
|
Rex Dieter |
c319351 |
|
|
Rex Dieter |
c319351 |
diff --git a/src/frontend/display/bthtmlreaddisplay.cpp b/src/frontend/display/bthtmlreaddisplay.cpp
|
|
Rex Dieter |
c319351 |
index 5cb69fb..433cec4 100644
|
|
Rex Dieter |
c319351 |
--- a/src/frontend/display/bthtmlreaddisplay.cpp
|
|
Rex Dieter |
c319351 |
+++ b/src/frontend/display/bthtmlreaddisplay.cpp
|
|
Rex Dieter |
c319351 |
@@ -247,7 +247,11 @@ void BtHtmlReadDisplay::selectAll() {
|
|
Rex Dieter |
c319351 |
|
|
Rex Dieter |
c319351 |
// Scroll QWebView to the correct location as specified by the anchor
|
|
Rex Dieter |
c319351 |
void BtHtmlReadDisplay::moveToAnchor( const QString& anchor ) {
|
|
Rex Dieter |
c319351 |
+#if QT_VERSION >= 0x040700
|
|
Rex Dieter |
c319351 |
+ mainFrame()->scrollToAnchor(anchor);
|
|
Rex Dieter |
c319351 |
+#else
|
|
Rex Dieter |
c319351 |
slotGoToAnchor(anchor);
|
|
Rex Dieter |
c319351 |
+#endif
|
|
Rex Dieter |
c319351 |
}
|
|
Rex Dieter |
c319351 |
|
|
Rex Dieter |
c319351 |
// Scroll the QWebView to the correct location specified by anchor
|
|
Rex Dieter |
c319351 |
--
|
|
Rex Dieter |
c319351 |
1.8.1.4
|
|
Rex Dieter |
c319351 |
|