@@ -16,45 +16,53 @@
1616
1717/**
1818 * Expose an API that allows interaction with the
19− * integrated LightDM or real LightDM depending on shell mode
19+ * integrated LightDM or real LightDM depending on shell mode.
20+ * This is a hack to essentially support conditional imports
2021 */
22+
2123import QtQuick 2.3
2224
2325Loader {
26+ id: loader
2427 source: "IntegratedLightDMImpl.qml"
25− property bool valid: item !== null
2628
27− property bool active: valid ? item.active : null
28− property bool authenticated: valid ? item.authenticated : null
29− property bool promptless: valid ? item.promptless : null
30− property real userCount: valid ? item.userCount : null
29+ QtObject {
30+ id: d
31+
32+ property bool valid: loader.item !== null
33+ }
34+
35+ property bool active: d.valid ? item.active : null
36+ property bool authenticated: d.valid ? item.authenticated : null
37+ property bool promptless: d.valid ? item.promptless : null
38+ property real userCount: d.valid ? item.userCount : null
3139
32− property var theGreeter: valid ? item.theGreeter : null
33− property var infographicModel: valid ? item.infographicModel : null
34− property var userModel: valid ? item.userModel : null
40+ property var theGreeter: d.valid ? item.theGreeter : null
41+ property var infographicModel: d.valid ? item.infographicModel : null
42+ property var userModel: d.valid ? item.userModel : null
3543
3644 function authenticate(user) {
37− if (valid) item.authenticate(user);
45+ if (d.valid) item.authenticate(user);
3846 }
3947
4048 function getUser(uid) {
41− if (valid) return item.getUser(uid);
49+ if (d.valid) return item.getUser(uid);
4250 }
4351
4452 function infographicReadyForDataChange() {
45− if (valid) return item.infographicReadyForDataChange();
53+ if (d.valid) return item.infographicReadyForDataChange();
4654 }
4755
4856 function respond(response) {
49− if (valid) item.respond(response);
57+ if (d.valid) item.respond(response);
5058 }
5159
5260 function showGreeter() {
53− if (valid) item.showGreeter();
61+ if (d.valid) item.showGreeter();
5462 }
5563
5664 function startSessionSync() {
57− if (valid) item.startSessionSync();
65+ if (d.valid) item.startSessionSync();
5866 }
5967}
6068