aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-11-12 09:50:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-15 13:07:52 +0100
commit0dc17ae4d8b01582d9a9d2fa89f0d72cd022f5cf (patch)
treec427b62e6f20f17b71f1f0de0d59cd5fc8b6d5ae /src/qml/jsruntime/qv4string.cpp
parentd7a876d0025290e506622af85403fa3c5fed795b (diff)
Fix === operator for value types
Fix === comparison for urls and other QML value types. Task-number: QTBUG-33546 Change-Id: I4a7066e6bbc7de7c599fe2c7b2fdfb75e0ff5196 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r--src/qml/jsruntime/qv4string.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index eef901d74a..0e43d03987 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -234,7 +234,10 @@ bool String::isEqualTo(Managed *t, Managed *o)
if (t == o)
return true;
- Q_ASSERT(t->type == Type_String && o->type == Type_String);
+ if (o->type != Type_String)
+ return false;
+
+ Q_ASSERT(t->type == Type_String);
String *that = static_cast<String *>(t);
String *other = static_cast<String *>(o);
if (that->hashValue() != other->hashValue())