D27862: [WIP] KCM KWinTouchScreen port to KConfigXT

Kevin Ottens <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
ervin requested changes to this revision.
ervin added inline comments.

INLINE COMMENTS

> kwnscreenedgeconfigform.cpp:34
> +    : QWidget(parent)
> +    , ui(new Ui::KWinTouchScreenConfigUi)
> +{

This is leaked

> kwnscreenedgeconfigform.cpp:84
> +    if (ui->monitor->selectedEdgeItem(static_cast<int>(Monitor::Top)) == index) {
> +        list.append(static_cast<int>(ElectricTop));
> +    }

those static casts are not strictly required, enums convert implicitly to int

> kwnscreenedgeconfigform.cpp:154
> +    case ElectricTop:
> +        return static_cast<int>(Monitor::Top);
> +    case ElectricTopRight:

ditto

> kwnscreenedgeconfigform.h:42
> +public:
> +    explicit KWinScreenEdgeConfigForm(QWidget *parent);
> +

`= nullptr` missing

> touch.cpp:50
>  {
> -    m_ui = new KWinScreenEdgesConfigForm(this);
> +    m_ui = new KWinScreenEdgeConfigForm(this);
>      QVBoxLayout* layout = new QVBoxLayout(this);

This would be better in the initialization list. Also this is leaked.

> touch.cpp:185
> +    // Present Windows BorderActivateAll
> +    m_ui->monitorChangeEdge(m_settings->touchBorderActivateAll(), int(PresentWindowsAll));
>      // PresentWindows BorderActivate

Since you're touching those lines anyway, please clean up the c-casts to int

REPOSITORY
  R108 KWin

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

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
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.