[Differential] [Commented On] D3617: [Touchpad KCM] New KWin Wayland version

subdiff (Roman Gilg) noreply at phabricator.kde.org
Sun Dec 25 21:35:29 UTC 2016


subdiff added inline comments.

INLINE COMMENTS

> knambiar wrote in kwinwaylandbackend.cpp:72
> Just wondering whether these calls are synchronous and may cause delay in startup.

> Just wondering whether these calls are synchronous and may cause delay in startup.

I assume so. Should be no problem though. We need the reply values anyway.

> graesslin wrote in kwinwaylandbackend.cpp:84
> please don't use the Q_FOREACH in new code as Qt might deprecate it.

Are you sure? The foreach keyword is still listed in the official Qt docu. What's the best alternative? A normal for-loop? With upcounting integer or iterator?

> graesslin wrote in kwinwaylandbackend.h:55
> why is m_devices a list of QObjects and not a list of KWinWaylandTouchpad?
> 
> Also: please don't use QList any more in new code, but if possible QVector.

getDevices() is a implementation independent virtual method of TouchpadBackend and therefore KWinWaylandBackend also needs to return a container of QObjects in its getDevices() function. Implicit conversion for the whole container doesn't work and I don't wanted to iterate over the container just to return QObjects, or is there another trick?

The reason for QList is, that we later in TouchpadConfigLibinput() set it as a model context property of the QML context, which only accepts QList. But I've done it anyway now as QVector and convert it there back to a QList with toList().

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: subdiff, #kwin, #plasma_on_wayland, #plasma, #vdg
Cc: graesslin, knambiar, kwin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161225/32f871eb/attachment-0001.html>


More information about the Plasma-devel mailing list