Fix Memory leak related to Content Menu
From Qt4.7 on, the contextmenu of QTextEdit/QPlainTextEdit/QLineEdit/QLabel/QMainWindow etc using QMenu::popup() instead of QMenu::exec(), but the setAttribute(Qt::WA_DeleteOnClose) does not work, as QMenu::close() isn't called when the menus disapper. And this causes a memory leak. This is a side effect of b7af368e86874d71ffc9071c9ef009814d6a3467 Task-number: QTBUG-22817 Task-number: QTBUG-19592 Change-Id: I4c2c3edb3f63ce914b7b57cd0fbcec20488c8315 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>bb10
parent
d308797d00
commit
7694599ef9
|
|
@ -500,7 +500,7 @@ void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister)
|
|||
menu->blockSignals(false);
|
||||
#endif // QT_NO_EFFECTS
|
||||
if (!justRegister)
|
||||
menu->hide();
|
||||
menu->close();
|
||||
}
|
||||
|
||||
void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst)
|
||||
|
|
|
|||
Loading…
Reference in New Issue