From: Oleg Shparber Date: Wed, 26 Dec 2012 02:15:49 +0000 (+0200) Subject: Fix warnings about nonexistent signals in QQuickScreen X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=4baed7ba620efdefa5eec503038e9be5f88f08b6;p=konrad%2Fqtdeclarative.git 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 Reviewed-by: Alan Alpert --- diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp index 139cd72..d82d646 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