diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-14 14:55:44 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-06-01 09:35:29 +0000 |
commit | a24b90a21c4f2feb61630ca6a1684312556a6bc7 (patch) | |
tree | 1717ed9f699dd5cb119471ccb51f661b7d207f8b /src/gui/kernel/qguiapplication.cpp | |
parent | d11abc8bd7ac10da4bfd548b3d1d9d4e0dd6a264 (diff) |
Gui: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.
Change-Id: I88d08d499e1be72c1f6d983fecdcee513df18aa2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a9f0ab04a1..137310ffbd 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1024,7 +1024,7 @@ QWindow *QGuiApplication::topLevelAt(const QPoint &pos) // may repeat. Find only when there is more than one virtual desktop. if (!windowScreen && screens.count() != primaryScreens.count()) { for (int i = 1; i < screens.size(); ++i) { - QScreen *screen = screens[i]; + QScreen *screen = screens.at(i); if (screen->geometry().contains(pos)) { windowScreen = screen; break; @@ -2617,7 +2617,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To if (b == Qt::NoButton) self->synthesizedMousePoints.clear(); - QList<QTouchEvent::TouchPoint> touchPoints = touchEvent.touchPoints(); + const QList<QTouchEvent::TouchPoint> &touchPoints = touchEvent.touchPoints(); if (eventType == QEvent::TouchBegin) m_fakeMouseSourcePointId = touchPoints.first().id(); |