Skip to content

PC3/SpinBox: don't read implicitsize of loader before it's ready

Christoph Wolk requested to merge cwo/libplasma:spinbox_no_bindingloop into master

Spinbox uses a Loader to conditionally load the editable or non-editable version of the textinput background. The Loader coming in confuses the implicit size assignment and leads to a binding loop for a moment before settling on a proper value. This seems harmless, but causes a warning to be printed each time a PC3 SpinBox is created.

Instead, just wait until the Loader is ready, and consider its implicit size to be 0 until then.


Simple test case that triggers the warning:

import QtQuick
import org.kde.plasma.components 3.0 as PlasmaComponents3

PlasmaComponents3.SpinBox {
    editable: true
    from: 0
    stepSize: 10
    to: 1000
    value: 0
}

or just open anything that has a PC3 SpinBox, like panel edit mode

BUG: 500338 FIXED-IN: 6.4.0

Edited by Christoph Wolk

Merge request reports

Loading