diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-12-23 00:15:30 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-04 12:22:34 +0000 |
commit | 8faf51429e243a3e009f66a5f58321da259b9fc6 (patch) | |
tree | ddc61642266864b610bc8f8d38d4025fcc15eadc /src/corelib/plugin/qpluginloader.cpp | |
parent | 0ff221f5229b2ca09a63c73b724348585934d7dd (diff) |
QtCore: eradicate all Q_FOREACH loops [threads, plugins]
Saves just shy of 4KiB in text size on optimized GCC 4.9 Linux
AMD64 builds, iow: ~0.07% of the total QtCore library size.
Change-Id: I87fdcc8ee25c6bb5dabddb9a694ab4496b1538fa
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/plugin/qpluginloader.cpp')
-rw-r--r-- | src/corelib/plugin/qpluginloader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 8264a27842..af6e3e0e93 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -300,9 +300,9 @@ static QString locatePlugin(const QString& fileName) paths.prepend(QStringLiteral(".")); // search in current dir first } - foreach (const QString &path, paths) { - foreach (const QString &prefix, prefixes) { - foreach (const QString &suffix, suffixes) { + for (const QString &path : qAsConst(paths)) { + for (const QString &prefix : qAsConst(prefixes)) { + for (const QString &suffix : qAsConst(suffixes)) { const QString fn = path + QLatin1Char('/') + basePath + prefix + baseName + suffix; if (debug) qDebug() << "Trying..." << fn; |