D27988: KCM/Compositing: Use KConfig XT in UI

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.