Allow applets/containments/wallpaper to defer UIReadyConstraint
ClosedPublic

Authored by davidedmundson on Jul 31 2019, 11:29 AM.

Details

Summary

This is needed so that we don't remove the splash till the wallpaper is
loaded, but also allows doing this in a generic way.

Version 2 of the patch using a normal property.

We need to have the virtual so that the containment waits for the
wallpaper.

Test Plan

Used with wallpaper patch
Added debug to ensure it happened after the stackview in the wallpaper is pushed

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 31 2019, 11:29 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jul 31 2019, 11:29 AM
apol added a subscriber: apol.Jul 31 2019, 11:41 AM

+1 LGTM overall

src/scriptengines/qml/plasmoid/wallpaperinterface.h
52

Use READ isLoading() instead of MEMBER? and unify loading vs isLoading.

That's something I deliberately did, though it might still be stupid :)

I have a property on containment isLoading

If the containment itself is loaded and set to false but the wallpaper is not, I thought it was more correct for the loading property of the containment to return false.

broulik added inline comments.
src/scriptengines/qml/plasmoid/containmentinterface.cpp
1226

Shouldn't this be |=?

apol added a comment.Jul 31 2019, 12:40 PM

If the containment itself is loaded and set to false but the wallpaper is not, I thought it was more correct for the loading property of the containment to return false.

Will it? isLoading returns m_loading anyway...

Will it? isLoading returns m_loading anyway...

it's virtual, the ContainmentInterface::isLoading does not return that.

apol added a comment.Jul 31 2019, 1:53 PM

Will it? isLoading returns m_loading anyway...

it's virtual, the ContainmentInterface::isLoading does not return that.

It does, including the wallpaper, which is what we're actually after.
Do we need appletInterface.loading to be false while the wallpaper is still loading?

Do we need appletInterface.loading to be false while the wallpaper is still loading?

I think so. Most properties map 1:1 with what was explicitly set.

Without that we don't have an accessor for the containment QML code to find out what it has set itself to, which might prove problematic.

broulik accepted this revision.Aug 19 2019, 8:38 AM
This revision is now accepted and ready to land.Aug 19 2019, 8:38 AM
This revision was automatically updated to reflect the committed changes.