From bd04a3d136ed3384aa754f288201b5675a912596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 4 Jan 2013 10:06:08 +0100 Subject: [PATCH] Fixed wrong emits of x/y/width/height changed signals in QWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We should only emit these when the corresponding property value changes. Since these are changed asynchronously in the case of a platform window, we should not emit them in the setter, as they are already properly emitted in QGuiApplicationPrivate::processGeometryChangeEvent(). Change-Id: I5ac00601ddb4e7a8ff02376e5f5135d427913119 Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qwindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index b6d592e050..22ad748fb5 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1105,16 +1105,16 @@ void QWindow::setGeometry(const QRect &rect) d->platformWindow->setGeometry(rect); } else { d->geometry = rect; - } - if (rect.x() != oldRect.x()) - emit xChanged(rect.x()); - if (rect.y() != oldRect.y()) - emit yChanged(rect.y()); - if (rect.width() != oldRect.width()) - emit widthChanged(rect.width()); - if (rect.height() != oldRect.height()) - emit heightChanged(rect.height()); + if (rect.x() != oldRect.x()) + emit xChanged(rect.x()); + if (rect.y() != oldRect.y()) + emit yChanged(rect.y()); + if (rect.width() != oldRect.width()) + emit widthChanged(rect.width()); + if (rect.height() != oldRect.height()) + emit heightChanged(rect.height()); + } } /*!