D22287: [colorcorrection] Introduce toggle Night Color shortcut
Kai Uwe Broulik <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
broulik added inline comments.
INLINE COMMENTS
> manager.cpp:172
> +{
> + QAction *toggleAction = new QAction(this);
> + toggleAction->setProperty("componentName", QStringLiteral(KWIN_NAME));
Everywhere else in KWin (and other apps) we use a `KActionCollection` for this:
m_actionCollection = new KActionCollection(this, QStringLiteral("kwin"));
m_actionCollection->setComponentDisplayName(i18n("KWin"));
with `m_actionCollection->addAction` (which sets the `objectName`)
> manager.cpp:176
> + toggleAction->setText(i18n("Toggle Night Color"));
> + KGlobalAccel::setGlobalShortcut(toggleAction, QKeySequence());
> + input()->registerShortcut(QKeySequence(), toggleAction, this, &Manager::toggle);
Given we don't actually set a shortcut, isn't
KGlobalAccel::self()->setShortcut(action, QList<QKeySequence>{});
the proper way?
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D22287
To: zzag, #kwin
Cc: broulik, davidedmundson, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart