summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2013-04-27 01:02:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-08 12:01:29 +0200
commit305300cd9c7d6048c8a83312fcc6b9a3057e355a (patch)
tree9bf9dbbbb90b5b7b19111401ce8d06d09a0533b6 /src
parent3e37e3c3e9ba16e8cc7a3bfc1c17539348df0cd6 (diff)
Avoid a QStringRef -> QString conversion by using the new qt_hash overload
During qHash refactorings, this line was changed as qt_hash didn't have an overload taking a QStringRef. This causes a performance regression w.r.t. the same code in Qt 4. Task-number: QTBUG-30821 Change-Id: I17b27a54a73cb9061c20f1bd7f79d0c405050edd Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qresource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 7dfc9b977c..04ec81e159 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -665,7 +665,7 @@ int QResourceRoot::findNode(const QString &_path, const QLocale &locale) const
qDebug() << " " << child+j << " :: " << name(child+j);
}
#endif
- const uint h = qt_hash(segment.toString());
+ const uint h = qt_hash(segment);
//do the binary search for the hash
int l = 0, r = child_count-1;