diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-01 14:17:51 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-07 12:57:43 +0000 |
commit | d42da86c96cfef54f88b5897a76fb26044e4d449 (patch) | |
tree | 94c79340d3db0c1e8613b44dbbed84005e478ca9 /src/platformsupport/input/evdevmouse | |
parent | 5e38706624998e6fc3679fa2c65770fea644d08b (diff) |
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 <marc.mutz@kdab.com>
Diffstat (limited to 'src/platformsupport/input/evdevmouse')
-rw-r--r-- | src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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="))) |