D27988: KCM/Compositing: Use KConfig XT in UI

Vlad Zahorodnii noreply at phabricator.kde.org
Mon Mar 16 09:44:45 GMT 2020


zzag added inline comments.

INLINE COMMENTS

> main.cpp:60
>      void init();
> -    KWin::Compositing::Compositing *m_compositing;
> +    void updateUnnamagedItemStatus();
> +    bool isRunningPlasma() const;

typo: Unnamaged

> main.cpp:79
>      : KCModule(parent, args)
> -    , m_compositing(new KWin::Compositing::Compositing(this))
> +    //, m_compositing(new KWin::Compositing::Compositing(this))
> +    , m_compositingInterface(new OrgKdeKwinCompositingInterface(QStringLiteral("org.kde.KWin"), QStringLiteral("/Compositor"), QDBusConnection::sessionBus(), this))

Please don't submit commented code unless there is a reason, which must be stated in a comment.

> main.cpp:81
> +    , m_compositingInterface(new OrgKdeKwinCompositingInterface(QStringLiteral("org.kde.KWin"), QStringLiteral("/Compositor"), QDBusConnection::sessionBus(), this))
> +    , m_settings(new KWinCompositingSetting(parent))
>  {

Is there a reason why the parent is not `this`?

> main.cpp:88
>      QAction *reenableGLAction = new QAction(i18n("Re-enable OpenGL detection"), this);
> -    connect(reenableGLAction, &QAction::triggered, m_compositing, &KWin::Compositing::Compositing::reenableOpenGLDetection);
> +    connect(reenableGLAction, &QAction::triggered, m_settings, [this]() {
> +        m_settings->setOpenGLIsUnsafe(false);

We don't capture any variable so there is no point for using a lambda.

REPOSITORY
  R108 KWin

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

To: meven, #kwin, ervin, crossi, bport, hchain
Cc: zzag, 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/95a41b42/attachment-0001.html>


More information about the kwin mailing list