make the view's qml know about the wallpaper

better giving the access to the view qml rather than the containment

Reviewed by: Bhushan Shah <bhush94@gmail.com>
This commit is contained in:
Marco Martin 2014-06-20 19:02:48 +02:00
parent 5cd7040d8d
commit 6603334b9b

View File

@ -117,6 +117,10 @@ void ViewPrivate::setContainment(Plasma::Containment *cont)
graphicObject->setParentItem(q->rootObject());
if (q->rootObject()) {
q->rootObject()->setProperty("containment", QVariant::fromValue(graphicObject));
QObject *wpGraphicObject = containment->property("wallpaperGraphicsObject").value<QObject *>();
if (wpGraphicObject) {
q->rootObject()->setProperty("wallpaper", QVariant::fromValue(wpGraphicObject));
}
} else {
qWarning() << "Could not set containment property on rootObject";
}