From d42da86c96cfef54f88b5897a76fb26044e4d449 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Fri, 1 Apr 2016 14:17:51 +0300 Subject: OpenGL, PlatformSupport: use QStringRef to optimize memory allocation Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: Ib94d29b6ecec1cdab2604d0277a743e8b340be5e Reviewed-by: Marc Mutz --- src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp') diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp index 7f73a7ef94..382b9b1514 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp +++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp @@ -71,8 +71,8 @@ QEvdevMouseHandler *QEvdevMouseHandler::create(const QString &device, const QStr int grab = 0; bool abs = false; - QStringList args = specification.split(QLatin1Char(':')); - foreach (const QString &arg, args) { + const auto args = specification.splitRef(QLatin1Char(':')); + for (const QStringRef &arg : args) { if (arg == QLatin1String("nocompress")) compression = false; else if (arg.startsWith(QLatin1String("dejitter="))) -- cgit v1.2.3