From a24b90a21c4f2feb61630ca6a1684312556a6bc7 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Thu, 14 Apr 2016 14:55:44 +0300 Subject: 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 --- src/gui/kernel/qplatformscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformscreen.cpp') diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index 8450c6a083..3c1552c31e 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -93,7 +93,7 @@ QPixmap QPlatformScreen::grabWindow(WId window, int x, int y, int width, int hei */ QWindow *QPlatformScreen::topLevelAt(const QPoint & pos) const { - QWindowList list = QGuiApplication::topLevelWindows(); + const QWindowList list = QGuiApplication::topLevelWindows(); for (int i = list.size()-1; i >= 0; --i) { QWindow *w = list[i]; if (w->isVisible() && QHighDpi::toNativePixels(w->geometry(), w).contains(pos)) -- cgit v1.2.3