[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [declarative-plasmoids] tasks: provide proper patht o qml object
From:       Shaun Reich <shaun.reich () kdemail ! net>
Date:       2012-02-10 17:07:25
Message-ID: 20120210170725.1E231A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 3cca856cba421c909c39f8f534c41e8400a02fe5 by Shaun Reich.
Committed on 10/02/2012 at 18:07.
Pushed by sreich into branch 'master'.

provide proper patht o qml object

M  +5    -2    tasks/tasks.cpp

http://commits.kde.org/declarative-plasmoids/3cca856cba421c909c39f8f534c41e8400a02fe5

diff --git a/tasks/tasks.cpp b/tasks/tasks.cpp
index a157a07..016d96f 100644
--- a/tasks/tasks.cpp
+++ b/tasks/tasks.cpp
@@ -19,6 +19,9 @@
 
 #include "tasks.h"
 
+#include <Plasma/Containment>
+#include <Plasma/Corona>
+
 #include <QGraphicsView>
 #include <QDeclarativeEngine>
 #include <QDeclarativeView>
@@ -36,9 +39,9 @@ Tasks::Tasks(QObject *parent, const QVariantList &args)
     setHasConfigurationInterface(false);
 
     QDeclarativeEngine *engine = new QDeclarativeEngine;
-    QDeclarativeComponent component(engine, QUrl::fromLocalFile("qml/contents/ui/main.qml"));
+    QDeclarativeComponent component(engine, QUrl::fromLocalFile("qml/package/contents/ui/main.qml"));
     QGraphicsObject *object = qobject_cast<QGraphicsObject *>(component.create());
-    scene()->addItem(object);
+    containment()->corona()->addItem(object);
 }
 
 Tasks::~Tasks()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic