mblumenstingl added inline comments.

INLINE COMMENTS

> broulik wrote in powerdevildpmsaction.cpp:83
> I suppose there's no `Qt::Key_` enum for that, given laptops typically bypass 
> the operating system here anyway.

I couldn't find any appropriate `Qt::Key_` so I'm leaving it up to the user to 
choose one

> broulik wrote in powerdevildpmsaction.cpp:84
> Use new style connect, you can probably just use a lambda
> 
>   connect(globalAction, &QAction::triggered, this, [this] {
>       if (m_helper) {
>           m_helper->trigger(QStringLiteral("TurnOff"));
>       }
>   });

that if (m_helper) is probably the overloaded != nullptr from 
https://doc.qt.io/qt-5/qscopedpointer.html#operator-not-eq-1
thanks for this hint, it's been a long time since I last did some c++/Qt

> broulik wrote in powerdevildpmsaction.h:57
> For `SLOT(...)` syntax to work this must be in a section `private Q_SLOTS`, 
> but note my comment below about using a lambda instead

sorry for that, I missed that when I moved from a public slot to a private one
your lambda expression is working fine so I'm going with that instead

REPOSITORY
  R122 Powerdevil

REVISION DETAIL
  https://phabricator.kde.org/D22261

To: mblumenstingl, #plasma, broulik
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart

Reply via email to