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>
This commit is contained in:
Samuel Rødal 2013-01-04 10:06:08 +01:00 committed by The Qt Project
parent cf2a75e41b
commit bd04a3d136

View File

@ -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());
}
}
/*!