Skip to content

Fix undefined property accesses & Close the overlay drawer when window width is reduced

I did some minor QoL improvements. I am a QML noob, so please feel free to amend my commits

Fix undefined property accesses

When QT_QUICK_CONTROLS_MOBILE=true is set, some properties of a
OrgKdeKdeconnectDeviceInterface like isReachable and isTrusted
are defined, but isPaired, isPairRequested are not defined.

This commit fixes warnings like
> qrc:/qml/DevicePage.qml:24:13: Unable to assign [undefined] to bool

Before:

Screenshot_20230823_232918

After

Screenshot_20230823_232851

Gammaray not listing isPaired

Screenshot_20230823_232740


Close the overlay drawer when window width is reduced

Previously when the window width was reduced, the overlay drawer
was still visible except it was hidden behind the main view.

Taking inspiration from the binding in OverlayDrawer.qml source,
I set up a binding to match it closely. Now, it closes the drawer
when the window is resized.

Note: Both before and after this commit, there is a warning when
one collapses the window width.

> QQuickItem::stackBefore: Cannot stack
> QQuickRectangle(0x55b4746513d0, parent=0x55b4744a4750,
> geometry=0,0 0x0) before QQuickPopupItem(0x55b4747871c0),
> which must be a sibling

Before

Screenshot_20230823_233822

Merge request reports

Loading