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>
This commit is contained in:
Giuseppe D'Angelo 2013-04-27 01:02:56 +02:00 committed by The Qt Project
parent 3e37e3c3e9
commit 305300cd9c

View File

@ -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;