From 18d6c82299d51aacca55465dd1a2066a93440618 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Mon, 27 Mar 2017 22:44:22 +0300 Subject: Prefer rvalue versions of toLower() and toUpper() ... to re-use existing buffers. Change-Id: Ib2bc938f1cf0451c1dbc012b3db022b878e987cb Reviewed-by: Thiago Macieira --- src/plugins/platforms/windows/qwindowstheme.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 4ae1a751e9..3e2cb5e9e9 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -815,14 +815,14 @@ QString QWindowsFileIconEngine::cacheKey() const // Return "" for .exe, .lnk and .ico extensions. // It is faster to just look at the file extensions; // avoiding slow QFileInfo::isExecutable() (QTBUG-13182) - const QString &suffix = fileInfo().suffix(); + QString suffix = fileInfo().suffix(); if (!suffix.compare(QLatin1String("exe"), Qt::CaseInsensitive) || !suffix.compare(QLatin1String("lnk"), Qt::CaseInsensitive) || !suffix.compare(QLatin1String("ico"), Qt::CaseInsensitive)) { return QString(); } return QLatin1String("qt_.") - + (suffix.isEmpty() ? fileInfo().fileName() : suffix.toUpper()); // handle "Makefile" ;) + + (suffix.isEmpty() ? fileInfo().fileName() : std::move(suffix).toUpper()); // handle "Makefile" ;) } QPixmap QWindowsFileIconEngine::filePixmap(const QSize &size, QIcon::Mode, QIcon::State) -- cgit v1.2.3