summaryrefslogtreecommitdiffstats
path: root/framework/src/frameworkplugin.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-24 15:34:31 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-24 15:34:31 +0200
commit74703d12ef6f72a057f11957181b6cf6f4730e2d (patch)
treea9126fd02863243e26fdc2881b3910b163d59c87 /framework/src/frameworkplugin.cpp
parent68ed477e34756beb5b152f8077c2e2527bba4708 (diff)
downloadkube-74703d12ef6f72a057f11957181b6cf6f4730e2d.tar.gz
kube-74703d12ef6f72a057f11957181b6cf6f4730e2d.zip
Added the Fabric as an in application message bus
Diffstat (limited to 'framework/src/frameworkplugin.cpp')
-rw-r--r--framework/src/frameworkplugin.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/framework/src/frameworkplugin.cpp b/framework/src/frameworkplugin.cpp
index f491bae7..4c17242f 100644
--- a/framework/src/frameworkplugin.cpp
+++ b/framework/src/frameworkplugin.cpp
@@ -40,9 +40,17 @@
40#include "actions/context.h" 40#include "actions/context.h"
41#include "actions/actionhandler.h" 41#include "actions/actionhandler.h"
42#include "actions/actionresult.h" 42#include "actions/actionresult.h"
43#include "fabric.h"
43 44
44#include <QtQml> 45#include <QtQml>
45 46
47static QObject *example_qobject_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
48{
49 Q_UNUSED(engine)
50 Q_UNUSED(scriptEngine)
51 return new Kube::Fabric::Fabric;
52}
53
46void FrameworkPlugin::registerTypes (const char *uri) 54void FrameworkPlugin::registerTypes (const char *uri)
47{ 55{
48 qmlRegisterType<FolderListModel>(uri, 1, 0, "FolderListModel"); 56 qmlRegisterType<FolderListModel>(uri, 1, 0, "FolderListModel");
@@ -69,4 +77,7 @@ void FrameworkPlugin::registerTypes (const char *uri)
69 qmlRegisterType<Kube::Action>(uri, 1, 0, "Action"); 77 qmlRegisterType<Kube::Action>(uri, 1, 0, "Action");
70 qmlRegisterType<Kube::ActionHandler>(uri, 1, 0, "ActionHandler"); 78 qmlRegisterType<Kube::ActionHandler>(uri, 1, 0, "ActionHandler");
71 qmlRegisterType<Kube::ActionResult>(uri, 1, 0, "ActionResult"); 79 qmlRegisterType<Kube::ActionResult>(uri, 1, 0, "ActionResult");
80
81 qmlRegisterType<Kube::Fabric::Listener>(uri, 1, 0, "Listener");
82 qmlRegisterSingletonType<Kube::Fabric::Fabric>(uri, 1, 0, "Fabric", example_qobject_singletontype_provider);
72} 83}