diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-10-10 23:40:58 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-10-12 09:34:03 +0000 |
commit | 690f9a7e74701e64db1035ccb11673942988d927 (patch) | |
tree | 031ecd5570f9b8e3051bb11531c2511167c861cc /src/corelib/plugin | |
parent | 2a1ea8f13be95f664b112663986102300a17bdfe (diff) |
QtCore: use QStringRef in more places
Apart from removing some unwanted allocations, also reduces
text size by ~800B on Linux AMD64 GCC 4.9 release builds.
Change-Id: Ibcd1d8264f54f2b165b69bee8aa50ff7f4ad3a10
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/plugin')
-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 292ad30525..24101be87b 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -286,9 +286,9 @@ static QString locatePlugin(const QString& fileName) suffixes.prepend(QString()); // Split up "subdir/filename" - const int slash = fileName.lastIndexOf('/'); - const QString baseName = fileName.mid(slash + 1); - const QString basePath = isAbsolute ? QString() : fileName.left(slash + 1); // keep the '/' + const int slash = fileName.lastIndexOf(QLatin1Char('/')); + const QStringRef baseName = fileName.midRef(slash + 1); + const QStringRef basePath = isAbsolute ? QStringRef() : fileName.leftRef(slash + 1); // keep the '/' const bool debug = qt_debug_component(); |