Refractor into slotImportResource()
Description
Description
Details
Details
- Committed
anikethgirish Aug 9 2017, 6:46 PM - Parents
- R37:84e673a5abe3: Fix issue
- Branches
- Unknown
- Tags
Comment Actions
This leaks memory: every time the button is pressed, a new menu is created. The old one isn't deleted. It should be enough to create the menu in the constructor and set it on the button. You will also need a a destructor, to delete the menu:
DlgBundleManager::~DlgBundleManager()
{
delete(m_ui->m_importResources->menu());
}
Check the documentation of QPushButton: http://doc.qt.io/qt-5/qpushbutton.html#setMenu
/plugins/extensions/resourcemanager/dlg_bundle_manager.cpp | ||
---|---|---|
91 | Here you should create the menu and set it on the button | |
98 | This is not needed: if the menu is set on the button it will open. | |
342 | This whole method is not needed. |