Bug 458099 - ScrollablePage change in 5.97.0 breaks flickable use in Calamares
Summary: ScrollablePage change in 5.97.0 breaks flickable use in Calamares
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.97.0
Platform: Other Linux
: VHI major
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-08-20 12:39 UTC by demm
Modified: 2022-08-26 10:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description demm 2022-08-20 12:39:01 UTC
SUMMARY
***
The linked code is a simplified version of what is used in the Users QML module in the system installer "Calamares".  This runs fine with Kirigami 5.96.
The change with https://invent.kde.org/frameworks/kirigami/-/commit/c28dff79721d3805edcd413ef233216b3b3b0104 breaks it (message: `flickable is null` and layout for the header needs adjusting), reverting that commit is so far the only solution found while still using kirigami.ScrollablePage.
***


STEPS TO REPRODUCE
1.  Get users.qml https://paste.ee/p/i1SaF, UserInput.qml https://paste.ee/p/FsuRG and content/textField.qml https://paste.ee/p/iYX2s
2. Run with `QT_IM_MODULE=qtvirtualkeyboard qmlscene-qt5 usersq.qml` in kirigami 5.96.0
3. Do the same in 5.97.0 (fails to run then)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KaOS (other distributions are effected, using the Calamares QML Modules)
(available in About System)
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5 (with KDE patches from kde/5.15 branch)

ADDITIONAL INFORMATION
Comment 1 Rinigus 2022-08-20 14:51:14 UTC
Same bug has hit Pure Maps.
Comment 2 Nate Graham 2022-08-23 13:12:22 UTC
This does not seem to work:

$  QT_IM_MODULE=qtvirtualkeyboard qmlscene usersq.qml
qt.qpa.wayland: qtvirtualkeyboard currently is not supported at client-side, use QT_IM_MODULE=qtvirtualkeyboard at compositor-side.
file:///home/nate/Desktop/UserInput.qml:41 Cannot set properties on flickable as it is null

"There are still \"1\" items in the process of being created at engine destruction."


Can you fix the reproducible test case? Thanks!
Comment 3 demm 2022-08-23 13:52:53 UTC
(In reply to Nate Graham from comment #2)
> This does not seem to work:
> 
> $  QT_IM_MODULE=qtvirtualkeyboard qmlscene usersq.qml
> qt.qpa.wayland: qtvirtualkeyboard currently is not supported at client-side,
> use QT_IM_MODULE=qtvirtualkeyboard at compositor-side.
> file:///home/nate/Desktop/UserInput.qml:41 Cannot set properties on
> flickable as it is null
> 
> "There are still \"1\" items in the process of being created at engine
> destruction."
> 
> 
> Can you fix the reproducible test case? Thanks!

That is the issue. Run it with kirigami 5.96 > no error, just works.  Output above is when run with 5.97.
Comment 4 Nate Graham 2022-08-23 16:49:55 UTC
Are you saying that this error:

> file:///home/nate/Desktop/UserInput.qml:41 Cannot set properties on
> flickable as it is null

is the regression you're seeing?
Comment 5 Rinigus 2022-08-23 17:37:12 UTC
Making `flickable` property as "read-only" in 5.97 caused the same issue in Pure Maps and OSM Scout Server. Before, if I understood it correctly, it was recommended to set that property to your flickable which was embedded in ScrollablePage. At least that was done for my apps. As a result of Kirigami update 5.96->5.97 which got pushed out now in Flatpak platform, the apps broke on calls to ScrollablePage.
Comment 6 demm 2022-08-23 17:44:15 UTC
(In reply to Nate Graham from comment #4)
> Are you saying that this error:
> 
> > file:///home/nate/Desktop/UserInput.qml:41 Cannot set properties on
> > flickable as it is null
> 
> is the regression you're seeing?

Yes.  In 5.96 & before `flickable` was an alias, as noted in the previous comment, it is set to read-only since 5.97.
Comment 7 Nate Graham 2022-08-25 04:39:01 UTC
Got it. Perhaps we can fix this. Sorry for the regression.
Comment 8 Bug Janitor Service 2022-08-25 10:52:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/725
Comment 9 Marco Martin 2022-08-26 08:53:24 UTC
Git commit 27b2a4fbbdb919a54e9a825840f9e9200eaabf74 by Marco Martin.
Committed on 26/08/2022 at 08:53.
Pushed by mart into branch 'master'.

Workaround apps that assume flickable exists before component completition

upstream ScrollView can create/assign its own flickable only ater its completion,
so give a provisional Flickable from the beginning which may or may not change during
the component creation

M  +25   -19   src/controls/ScrollablePage.qml

https://invent.kde.org/frameworks/kirigami/commit/27b2a4fbbdb919a54e9a825840f9e9200eaabf74
Comment 10 demm 2022-08-26 10:29:36 UTC
To include the above patch on top of Kirigami 5.97.0, this commit is also needed:
https://invent.kde.org/frameworks/kirigami/-/commit/b5126b2bac3564908881e4c657a9470047a4b71e