From 305300cd9c7d6048c8a83312fcc6b9a3057e355a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 27 Apr 2013 01:02:56 +0200 Subject: 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 --- src/corelib/io/qresource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') 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; -- cgit v1.2.3