Gui: Fix memory leak
This commit is contained in:
@@ -627,9 +627,10 @@ WorkbenchGroup::WorkbenchGroup ( Command* pcCmd, QObject * parent )
|
||||
this, &WorkbenchGroup::onWorkbenchActivated);
|
||||
}
|
||||
|
||||
QAction* WorkbenchGroup::getOrCreateAction(const QString& wbName) {
|
||||
QAction* WorkbenchGroup::getOrCreateAction(const QString& wbName)
|
||||
{
|
||||
if (!actionByWorkbenchName.contains(wbName)) {
|
||||
actionByWorkbenchName[wbName] = new QAction;
|
||||
actionByWorkbenchName[wbName] = new QAction(QApplication::instance());
|
||||
}
|
||||
|
||||
return actionByWorkbenchName[wbName];
|
||||
|
||||
Reference in New Issue
Block a user