aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickscreen.cpp
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2012-12-26 04:15:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-09 16:43:17 +0100
commit4baed7ba620efdefa5eec503038e9be5f88f08b6 (patch)
tree8379cb352061f4c3324cd5403893b262718a993f /src/quick/items/qquickscreen.cpp
parentd37547add0369d45182271754c0a35032d7de2d3 (diff)
Fix warnings about nonexistent signals in QQuickScreen
On application exit QQuickScreen tries to disconnect from an old QScreen which is almost destroyed at this point. Change-Id: I6c595cf68d6faaf3527b8ffcae0a074c23170ea1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
Diffstat (limited to 'src/quick/items/qquickscreen.cpp')
-rw-r--r--src/quick/items/qquickscreen.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp
index 139cd72168..d82d64610f 100644
--- a/src/quick/items/qquickscreen.cpp
+++ b/src/quick/items/qquickscreen.cpp
@@ -167,16 +167,8 @@ void QQuickScreenAttached::screenChanged(QScreen *screen)
QScreen* oldScreen = m_screen;
m_screen = screen;
- if (oldScreen) {
- disconnect(oldScreen, SIGNAL(geometryChanged(QRect)),
- this, SIGNAL(widthChanged()));
- disconnect(oldScreen, SIGNAL(geometryChanged(QRect)),
- this, SIGNAL(heightChanged()));
- disconnect(oldScreen, SIGNAL(orientationChanged(Qt::ScreenOrientation)),
- this, SIGNAL(orientationChanged()));
- disconnect(oldScreen, SIGNAL(primaryOrientationChanged(Qt::ScreenOrientation)),
- this, SIGNAL(primaryOrientationChanged()));
- }
+ if (oldScreen)
+ oldScreen->disconnect(this);
if (!screen)
return; //Don't bother emitting signals, because the new values are garbage anyways