diff options
author | Thomas McGuire <thomas.mcguire.qnx@kdab.com> | 2012-10-01 13:28:04 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-02 08:42:06 (GMT) |
commit | 7b2c8378cfa48f1dad2bd86136e33095bb13b664 (patch) | |
tree | 8fd06182a21203b39b2ae4e06bd8f2601ff20021 /src/plugins | |
parent | a6717650711b107c96caf757f3aa91190a8bb52e (diff) | |
download | Qt-7b2c8378cfa48f1dad2bd86136e33095bb13b664.zip Qt-7b2c8378cfa48f1dad2bd86136e33095bb13b664.tar.gz Qt-7b2c8378cfa48f1dad2bd86136e33095bb13b664.tar.bz2 |
QNX: Fix bug on window hierarchy list
removeFromParent() must not be called from raise()/lower(), because it wrongly
sets m_currentParent to 0, causing the parent/child link to be broken after a
call either of these methods.
This is a backport of
qtbase commit 4c33efc3228d82a82e13fe8c196b8c74a4998572
Change-Id: I5970cd2b2e0d58ef01dd99c10748195220d0e006
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/blackberry/qbbwindow.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/platforms/blackberry/qbbwindow.cpp b/src/plugins/platforms/blackberry/qbbwindow.cpp index ff66534..07a2f91 100644 --- a/src/plugins/platforms/blackberry/qbbwindow.cpp +++ b/src/plugins/platforms/blackberry/qbbwindow.cpp @@ -518,10 +518,9 @@ void QBBWindow::raise() qDebug() << "QBBWindow::raise - w=" << widget(); #endif - QBBWindow* oldParent = mParent; - if (oldParent) { - removeFromParent(); - oldParent->mChildren.push_back(this); + if (mParent) { + mParent->mChildren.removeAll(this); + mParent->mChildren.push_back(this); } else { mScreen->raiseWindow(this); } @@ -535,10 +534,9 @@ void QBBWindow::lower() qDebug() << "QBBWindow::lower - w=" << widget(); #endif - QBBWindow* oldParent = mParent; - if (oldParent) { - removeFromParent(); - oldParent->mChildren.push_front(this); + if (mParent) { + mParent->mChildren.removeAll(this); + mParent->mChildren.push_front(this); } else { mScreen->lowerWindow(this); } |