summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2012-07-14 22:19:32 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2012-07-14 22:47:17 (GMT)
commit3856b408e799bf59bfafdc858996e5d377754228 (patch)
treebe2f49390f6021581bbe39272618e669575ee04a
parent09abf2844e80578e9cd50a4edcf37dfd9ad98d27 (diff)
Fix hashChangeEvent not emitted when oldUrl has no ref and newUrl has
empty ref. In qt4, unlike in qt3, (QString("") != QString()) return false and newRef can not be null here due to the hasRef() check in sLocalAnchorJump. (cherry picked from commit 763948ae5a79490b233919f00b0b5295723a65d8)
-rw-r--r--khtml/khtml_part.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index 086b356..ad00ea5 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -637,7 +637,7 @@ void KHTMLPartPrivate::executeAnchorJump( const KUrl& url, bool lockHistory )
const QString &oldRef = q->url().ref();
const QString &newRef = url.ref();
- if (oldRef != newRef) {
+ if ((oldRef != newRef) || (oldRef.isNull() && newRef.isEmpty())) {
DOM::HashChangeEventImpl *evImpl = new DOM::HashChangeEventImpl();
evImpl->initHashChangeEvent("hashchange",
true, //bubble