summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2017-04-27 11:05:05 +0200
committerKai Uwe Broulik <[email protected]>2017-04-27 11:05:05 +0200
commit2e3790b998657e94652e0a64addec77def3c3ef4 (patch)
tree0b5e6afbde6975ee273c668e13da32631a40afb2
parentc5e49e466e48aef26c03d6c3784aabf94d52118d (diff)
[Greeter] Expose wallpaper QML item as "wallpaper" context property
This way the look and feel package can access the item and for example reparent it elsewhere for a slide gesture to reveal the password input. CHANGELOG: Lock Screen look and feel can now access the wallpaper item through the "wallpaper" context property Differential Revision: https://phabricator.kde.org/D5602
-rw-r--r--greeter/greeterapp.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/greeter/greeterapp.cpp b/greeter/greeterapp.cpp
index 18d8e31..d276930 100644
--- a/greeter/greeterapp.cpp
+++ b/greeter/greeterapp.cpp
@@ -230,6 +230,8 @@ void UnlockApp::loadWallpaperPlugin(KQuickAddons::QuickViewSharedEngine *view)
QQmlExpression expr(qmlObject->engine()->rootContext(), item, QStringLiteral("parent"));
QQmlProperty prop(item, QStringLiteral("anchors.fill"));
prop.write(expr.evaluate());
+
+ view->rootContext()->setContextProperty(QStringLiteral("wallpaper"), item);
}
);
}