diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-05-14 13:48:17 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-14 16:57:13 +0200 |
commit | d1320d78c6653320e33564c1fd64c14b2dd24cee (patch) | |
tree | 7995e62ba123d39763d5f92120ba7b3f760a8b18 /src/dialogs/qquickabstractdialog.cpp | |
parent | f60911ca0d492c3868f7feb71d1de63f111d6cd6 (diff) | |
download | qtquickcontrols-5.3.0.tar.gz |
QRect::setX() and setY() can change the width and height, even to a
negative value, which will make the dialog's intended geometry invalid.
The intention was that QQuickAbstractDialog::setX() and setY() should
move the window, so it should be done with QRect::moveLeft and moveTop.
Task-number: QTBUG-38898
Change-Id: I59104395ed39b09f6b7a99eb177820edb5e46cf6
Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/dialogs/qquickabstractdialog.cpp')
-rw-r--r-- | src/dialogs/qquickabstractdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp index 005d1015..847fb697 100644 --- a/src/dialogs/qquickabstractdialog.cpp +++ b/src/dialogs/qquickabstractdialog.cpp @@ -295,7 +295,7 @@ int QQuickAbstractDialog::height() const void QQuickAbstractDialog::setX(int arg) { m_hasAspiredPosition = true; - m_sizeAspiration.setX(arg); + m_sizeAspiration.moveLeft(arg); if (helper()) { // TODO } else if (m_dialogWindow) { @@ -310,7 +310,7 @@ void QQuickAbstractDialog::setX(int arg) void QQuickAbstractDialog::setY(int arg) { m_hasAspiredPosition = true; - m_sizeAspiration.setY(arg); + m_sizeAspiration.moveTop(arg); if (helper()) { // TODO } else if (m_dialogWindow) { |