D27862: [WIP] KCM KWinTouchScreen port to KConfigXT

Kevin Ottens noreply at phabricator.kde.org
Mon Mar 16 16:37:15 GMT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200316/ae98eaef/attachment-0001.html>


More information about the kwin mailing list