summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-24 20:56:48 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-03-27 16:15:43 +0000
commitde9145dcd904068256e28e130fdfda2e8014efe8 (patch)
treefd046cf9d9d571537de633740e2b689dc9a47d47 /dist
parentea9e620a7f5bfbac63ccc9017732bb78db8e5356 (diff)
downloadqtquickcontrols-de9145dcd904068256e28e130fdfda2e8014efe8.tar.gz
Menu: Separate dismiss and destroy actions
This avoids issues when the action is triggered from a Menu and the slot ends up processing pending events, effectively deleting an object while one of its QML signal handlers is being executed. The reason being that we used to call deleteLater() on the menu popup window while still in the mouse event handler. Now, we do the same thing in three separate steps. 1. Close/dismiss the menu popups, 2. trigger the action, and 3. delete the popups. This keeps the menu popups and their contents alive until we return from the action triggered handler. We also need to take care of manually destroying any popup we may create. Finally, the menu content creation in Menu.qml had to be tweaked since we shouldn't rely on the popup visibility anymore. Task-number: QTBUG-45182 Change-Id: I9f1155bbf74dd3353c6c4066a24abf1cd2c3a283 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions