diff options
Diffstat (limited to 'framework/theme/themeplugin.cpp')
-rw-r--r-- | framework/theme/themeplugin.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/theme/themeplugin.cpp b/framework/theme/themeplugin.cpp index 919205cf..ad9d0e1b 100644 --- a/framework/theme/themeplugin.cpp +++ b/framework/theme/themeplugin.cpp | |||
@@ -18,11 +18,12 @@ | |||
18 | 18 | ||
19 | #include "themeplugin.h" | 19 | #include "themeplugin.h" |
20 | 20 | ||
21 | #include "colorpalette.h" | ||
22 | |||
23 | #include <QtQml> | 21 | #include <QtQml> |
24 | #include <QQmlEngine> | 22 | #include <QQmlEngine> |
25 | 23 | ||
24 | #include "colorpalette.h" | ||
25 | #include "unit.h" | ||
26 | |||
26 | static QObject *colorpaletteInstace(QQmlEngine *engine, QJSEngine *scriptEngine) | 27 | static QObject *colorpaletteInstace(QQmlEngine *engine, QJSEngine *scriptEngine) |
27 | { | 28 | { |
28 | Q_UNUSED(engine); | 29 | Q_UNUSED(engine); |
@@ -31,10 +32,19 @@ static QObject *colorpaletteInstace(QQmlEngine *engine, QJSEngine *scriptEngine) | |||
31 | return new ColorPalette; | 32 | return new ColorPalette; |
32 | } | 33 | } |
33 | 34 | ||
35 | static QObject *unitInstace(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
36 | { | ||
37 | Q_UNUSED(engine); | ||
38 | Q_UNUSED(scriptEngine); | ||
39 | |||
40 | return new Unit; | ||
41 | } | ||
42 | |||
34 | void ThemePlugin::registerTypes (const char *uri) | 43 | void ThemePlugin::registerTypes (const char *uri) |
35 | { | 44 | { |
36 | Q_ASSERT(uri == QLatin1String("org.kube.framework.theme")); | 45 | Q_ASSERT(uri == QLatin1String("org.kube.framework.theme")); |
37 | 46 | ||
38 | qmlRegisterSingletonType<ColorPalette>(uri, 1, 0, "ColorPalette", colorpaletteInstace); | 47 | qmlRegisterSingletonType<ColorPalette>(uri, 1, 0, "ColorPalette", colorpaletteInstace); |
48 | qmlRegisterSingletonType<Unit>(uri, 1, 0, "Unit", unitInstace); | ||
39 | 49 | ||
40 | } | 50 | } |