Fix fallback to built-in ui
ClosedPublic

Authored by graesslin on Nov 17 2018, 9:37 AM.

Details

Summary

If the lock screen package is not available m_mainQmlPath is an empty
URL. Thus view->setSource won't do anything and the status won't change
to Error. Due to that the fallback was not activated when the lnf
package is missing.

This change also checks whether said variable is empty.

Test Plan

run kscreenlocker_greet in testing mode with manipulated XDG_DATA_DIRS

Diff Detail

Repository
R133 KScreenLocker
Branch
fix-fallback
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5018
Build 5036: arc lint + arc unit
graesslin created this revision.Nov 17 2018, 9:37 AM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 17 2018, 9:37 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin requested review of this revision.Nov 17 2018, 9:37 AM

Ship it if you like, but I think there's a nicer solution.

greeter/greeterapp.cpp
313

view->status() != Ready

should also work, and that covers the case of m_mainQmlPath being set but pointing to an empty file.

We'll never be loading as all files should be local.

graesslin updated this revision to Diff 45744.Nov 18 2018, 7:22 PM

Adjust in the way David suggested.

davidedmundson accepted this revision.Nov 19 2018, 8:44 AM
This revision is now accepted and ready to land.Nov 19 2018, 8:44 AM
This revision was automatically updated to reflect the committed changes.