aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickscreen.cpp
diff options
context:
space:
mode:
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