D16945: Fix fallback to built-in ui
This revision was automatically updated to reflect the committed changes. Closed by commit R133:dfd02160746b: Fix fallback to built-in ui (authored by graesslin). REPOSITORY R133 KScreenLocker CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D16945?vs=45744=49330 REVISION DETAIL https://phabricator.kde.org/D16945 AFFECTED FILES greeter/greeterapp.cpp To: graesslin, #plasma, davidedmundson Cc: davidedmundson, plasma-devel, kvanton, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16945: Fix fallback to built-in ui
graesslin updated this revision to Diff 45744. graesslin added a comment. Adjust in the way David suggested. REPOSITORY R133 KScreenLocker CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D16945?vs=45633=45744 BRANCH fix-fallback REVISION DETAIL https://phabricator.kde.org/D16945 AFFECTED FILES greeter/greeterapp.cpp To: graesslin, #plasma Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16945: Fix fallback to built-in ui
davidedmundson added a comment. Ship it if you like, but I think there's a nicer solution. INLINE COMMENTS > greeterapp.cpp:313 > // on error, load the fallback lockscreen to not lock the user out > of the system > -if (view->status() == QQmlComponent::Error) { > +if (view->status() == QQmlComponent::Error || > m_mainQmlPath.isEmpty()) { > static const QUrl > fallbackUrl(QUrl(QStringLiteral("qrc:/fallbacktheme/LockScreen.qml"))); > 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. REPOSITORY R133 KScreenLocker REVISION DETAIL https://phabricator.kde.org/D16945 To: graesslin, #plasma Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16945: Fix fallback to built-in ui
graesslin created this revision. graesslin added a reviewer: Plasma. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. graesslin requested review of this revision. REVISION 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 REPOSITORY R133 KScreenLocker BRANCH fix-fallback REVISION DETAIL https://phabricator.kde.org/D16945 AFFECTED FILES greeter/greeterapp.cpp To: graesslin, #plasma Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart