summaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-helper.cpp
diff options
context:
space:
mode:
authorGravatar Marco Martin <notmart@gmail.com>2016-06-22 18:17:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-08-14 07:56:05 -0700
commit24718adfc3c2d7caaddd307289ba69fa706315c9 (patch)
tree39ede99be41e6908e73d1899c9d5ab071bf363a7 /subsurface-mobile-helper.cpp
parent545c60a517402346aa04e2b67284827d510ec71d (diff)
downloadsubsurface-24718adfc3c2d7caaddd307289ba69fa706315c9.tar.gz
Use kirigami built in static mode
Now kirigami needs to be built with a C++ plugin. In cases of mobile operating systems such as iOS (and in a lesser measuse, Android) having a proper plugin loaded at runtime may be difficult, so statically link it together with all of its qml files compiled as a qresource inside the static library. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-mobile-helper.cpp')
-rw-r--r--subsurface-mobile-helper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp
index 2093af9f4..d038336c4 100644
--- a/subsurface-mobile-helper.cpp
+++ b/subsurface-mobile-helper.cpp
@@ -21,6 +21,9 @@
#include "qt-models/gpslistmodel.h"
#include "mobile-widgets/qmlprofile.h"
+#define KIRIGAMI_BUILD_TYPE_STATIC
+#include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h"
+
QObject *qqWindowObject = NULL;
void init_ui()
@@ -32,7 +35,9 @@ void run_ui()
{
qmlRegisterType<QMLManager>("org.subsurfacedivelog.mobile", 1, 0, "QMLManager");
qmlRegisterType<QMLProfile>("org.subsurfacedivelog.mobile", 1, 0, "QMLProfile");
+
QQmlApplicationEngine engine;
+ KirigamiPlugin::getInstance().registerTypes();
#if __APPLE__
// when running the QML UI on a Mac the deployment of the QML Components seems
// to fail and the search path for the components is rather odd - simply the