Minor optimization use QString midRef instead of mid.

It doesn't create a temporary string.

Change-Id: If5c540422f69e573107d1f5a886ac7174ae99853
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Jędrzej Nowacki 2014-01-15 15:48:26 +01:00 committed by The Qt Project
parent a6c79344f7
commit 3558c0cd74

View File

@ -609,7 +609,7 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
foreach (const QString &option, opts) {
if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) {
bool ok;
const int nt = option.mid(21).toInt(&ok);
const int nt = option.midRef(21).toInt(&ok);
if (ok)
timeOut = nt;
} else if (option == QLatin1String("QSQLITE_OPEN_READONLY")) {