diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-01-04 10:06:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-04 13:20:06 +0100 |
commit | bd04a3d136ed3384aa754f288201b5675a912596 (patch) | |
tree | 6857b8259be85c4c647095d979a91a0b7d075ab2 | |
parent | cf2a75e41bc6715958d170d42f37fc6bb609f830 (diff) |
Fixed wrong emits of x/y/width/height changed signals in QWindow
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ø <tor.arne.vestbo@digia.com>
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 18 |
1 files 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()); + } } /*! |