From 49c64104c0750857858504b512955d9cc31e5c42 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 5 May 2013 01:55:41 +0200 Subject: update the rest of the watchlets --- qmafwwatchlet/qmafwwatchlet.cpp | 6 +++--- qmafwwatchlet/qmafwwatchlet.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'qmafwwatchlet') diff --git a/qmafwwatchlet/qmafwwatchlet.cpp b/qmafwwatchlet/qmafwwatchlet.cpp index 84c5ea9..41cea2a 100644 --- a/qmafwwatchlet/qmafwwatchlet.cpp +++ b/qmafwwatchlet/qmafwwatchlet.cpp @@ -6,7 +6,7 @@ using namespace sowatch; -QMafwWatchlet::QMafwWatchlet(WatchServer* server) : +QMafwWatchlet::QMafwWatchlet(Watch* watch) : DeclarativeWatchlet(server, "com.javispedro.sowatch.qmafw"), _registry(MafwRegistry::instance()), _player(new QMafwWatchletPlayer(this)), @@ -22,8 +22,8 @@ QMafwWatchlet::QMafwWatchlet(WatchServer* server) : connect(this, SIGNAL(activated()), _player, SLOT(activate())); connect(this, SIGNAL(deactivated()), _player, SLOT(deactivate())); - rootContext()->setContextProperty("player", _player); - rootContext()->setContextProperty("volumeControl", _volumeControl); + context()->setContextProperty("player", _player); + context()->setContextProperty("volumeControl", _volumeControl); setSource(QUrl(SOWATCH_QML_DIR "/qmafwwatchlet/" + server->watch()->model() + ".qml")); } diff --git a/qmafwwatchlet/qmafwwatchlet.h b/qmafwwatchlet/qmafwwatchlet.h index 09cdf81..afec03a 100644 --- a/qmafwwatchlet/qmafwwatchlet.h +++ b/qmafwwatchlet/qmafwwatchlet.h @@ -15,7 +15,7 @@ class QMafwWatchlet : public DeclarativeWatchlet { Q_OBJECT public: - explicit QMafwWatchlet(WatchServer* server); + explicit QMafwWatchlet(Watch* watch); private: MafwRegistry *_registry; -- cgit v1.2.3