Bug 446354 - QML SpinBox: Binding loop detected for property "implicitWidth" and "implicitHeight"
Summary: QML SpinBox: Binding loop detected for property "implicitWidth" and "implicit...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.88.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-02 02:02 UTC by george fb
Modified: 2021-12-07 16:36 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description george fb 2021-12-02 02:02:02 UTC
With `styleitem.fullRect.width` removed from implicitWidth/implicitHeight there are no errors/warnings.
https://invent.kde.org/frameworks/qqc2-desktop-style/-/blob/be2c437c99fc29e92648368fe19fca56bf154f18/org.kde.desktop/SpinBox.qml#L20

Relevant commit: https://invent.kde.org/frameworks/qqc2-desktop-style/-/commit/7e8ae63d98b843a1779810baf9f6816aee84f801

STEPS TO REPRODUCE
1. Build Kirigami app with SpinBox

OBSERVED RESULT
Lots of "QML SpinBox: Binding loop detected for property "implicitWidth" and "implicitHeight" errors/warnings.

EXPECTED RESULT
No errors/warnings

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20211130
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.5-1-default (64-bit)
Graphics Platform: X11
Comment 1 Méven Car 2021-12-07 16:36:24 UTC
Git commit 7c97810f53e7ad89002b4afcadc9fe40cbcff3e0 by Méven Car, on behalf of David Edmundson.
Committed on 07/12/2021 at 08:31.
Pushed by ngraham into branch 'master'.

Fix binding loop in Spinbox

There is currently a loop:

 - upRect changes whenever the size of the background changes
 - when upRect changes we adjust both margins and minimum size.
This adjusts the size of the background
 - upRect changes whenever the size of the background changes

Our requirements are:
- we want the size hint from this once to calculate a minimum size and
margins
- we need the position constantly updated so the up indicator can be in
the right place

Using two properties allows us to separate our two requirements

M  +13   -12   org.kde.desktop/SpinBox.qml

https://invent.kde.org/frameworks/qqc2-desktop-style/commit/7c97810f53e7ad89002b4afcadc9fe40cbcff3e0