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

Reply via email to