forked from qt-creator/qt-creator
CorePlugin: Don't leak actions for options
Amends d86a67e0bc
Change-Id: I45703f4fbc018f1f30375e578aa6c55815db902b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -258,12 +258,12 @@ static void registerActionsForOptions()
|
||||
categoryDisplay[page->category()] = page->displayCategory();
|
||||
}
|
||||
for (IOptionsPage *page : IOptionsPage::allOptionsPages()) {
|
||||
Id commandId = generateOpenPageCommandId(page);
|
||||
const Id commandId = generateOpenPageCommandId(page);
|
||||
if (!commandId.isValid())
|
||||
continue;
|
||||
const QString actionTitle = Tr::tr("%1 > %2 Preferences...")
|
||||
.arg(categoryDisplay.value(page->category()), page->displayName());
|
||||
auto action = new QAction(actionTitle);
|
||||
auto action = new QAction(actionTitle, m_instance);
|
||||
QObject::connect(action, &QAction::triggered, m_instance, [id = page->id()]() {
|
||||
ICore::showOptionsDialog(id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user