D27784: KCM KWinTabBox manage KCModule states
Kevin Ottens
noreply at phabricator.kde.org
Mon Mar 16 15:59:02 GMT 2020
ervin requested changes to this revision.
ervin added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kwintabboxconfigform.cpp:40
> + , m_type(type)
> + , ui(new Ui::KWinTabBoxConfigForm)
> +{
This is leaked, you got to have a dtor now. It can be empty (or = default) if you use QScopedPointer, otherwise it'll have to contain delete ui;.
> kwintabboxconfigform.cpp:90
> + m_actionCollection->setConfigGlobal(true);
> + QAction* a;
> + if (TabboxType::Main == m_type) {
Space on the wrong side of the *, also probably a good idea to initialize with nullptr.
Or even better maybe adjust the macro to declare a scope and have the QAction declared and initialized within the scope. This would avoid this odd namespace pollution.
> kwintabboxconfigform.cpp:259
> + QString action;
> + auto resetShortcut = [this](KKeySequenceWidget *widget, const QKeySequence &sequence = QKeySequence()) {
> + const QString action = widget->property("shortcutAction").toString();
man this is so much better than the old macros ;-)
(not saying you have to clean them up, it's just that seeing both like this the contrast is telling).
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D27784
To: crossi, #kwin, ervin, bport, meven, zzag
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200316/64c7e34a/attachment.html>
More information about the kwin
mailing list