Merge pull request #1884 from nicolasfella/menuaction

[dolphin] Use menuAction() instead of manual creation
This commit is contained in:
Dominique Fuchs 2020-04-25 14:57:32 +02:00 committed by GitHub
commit 3626715394
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,12 +90,10 @@ public:
delete menu;
return {};
}
auto menuaction = new QAction(parentWidget);
menuaction->setText(helper->contextMenuTitle());
menuaction->setIcon(QIcon::fromTheme(helper->contextMenuIconName()));
menuaction->setMenu(menu);
return { menuaction };
menu->setTitle(helper->contextMenuTitle());
menu->setIcon(QIcon::fromTheme(helper->contextMenuIconName()));
return { menu->menuAction() };
}