Summary: | KstatusNotifierItem->actionCollection() - is currently useless. | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-knotifications | Reporter: | Vovochka <vovochka13> |
Component: | general | Assignee: | Martin Klapetek <mklapetek> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | kdelibs-bugs |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | All | ||
Latest Commit: | http://commits.kde.org/knotifications/f8d29aa9108fa74c1a3666c1774779eb100325a9 | Version Fixed In: | |
Sentry Crash Report: |
Description
Vovochka
2015-06-23 01:52:21 UTC
Thanks for the report I think that the reason why it got removed was that the intended usage is meant to be this: QAction *quitAction; Q_FOREACH(QAction *action, ksni->actionCollection()) { if (action == KStandardAction::quit()) { quitAction = action; } } ...wouldn't that work? Actually ignore that, that wouldn't work. What you can do however, in the meantime anyway, is to set setStandardActionsEnabled(false); which will not put a "quit" action in the menu and then add your own quit action by using addAction(QString, QAction*); But this also will disable "minimizeRestore" action that has a little bit advanced logic. I do not want to reimplement this logic too. This makes standard actions from KSNI useless and unneeded. Don't you think so? Git commit f8d29aa9108fa74c1a3666c1774779eb100325a9 by Martin Klapetek. Committed on 01/07/2015 at 08:05. Pushed by mklapetek into branch 'master'. [ksni] Add method to retrieve action by its name REVIEW: 124155 M +5 -0 src/kstatusnotifieritem.cpp M +9 -0 src/kstatusnotifieritem.h http://commits.kde.org/knotifications/f8d29aa9108fa74c1a3666c1774779eb100325a9 |