aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw/qhashedstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/ftw/qhashedstring.cpp')
-rw-r--r--src/qml/qml/ftw/qhashedstring.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp
index 8f6c57e029..577757f3c0 100644
--- a/src/qml/qml/ftw/qhashedstring.cpp
+++ b/src/qml/qml/ftw/qhashedstring.cpp
@@ -40,20 +40,16 @@
****************************************************************************/
#include "qhashedstring_p.h"
-#include <private/qcalculatehash_p.h>
inline quint32 stringHash(const QChar* data, int length)
{
- quint32 rv = calculateHash((quint16*)data, length);
- Q_ASSERT(rv == v8::String::ComputeHash((uint16_t*)data, length));
- return rv;
+ return QV4::String::createHashValue(data, length);
}
inline quint32 stringHash(const char *data, int length)
{
- quint32 rv = calculateHash((quint8*)data, length);
- Q_ASSERT(rv == v8::String::ComputeHash((char *)data, length));
- return rv;
+ QString s = QString::fromLatin1(data, length);
+ return QV4::String::createHashValue(s.constData(), s.length());
}
void QHashedString::computeHash() const