diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-11-27 21:05:39 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-17 09:17:54 -0800 |
commit | 820fefb372e85cfe0857bb41a63ca032a87bfb54 (patch) | |
tree | e2a868d219df4fe9a174c9809a172932d4889e3a /subsurface-helper.cpp | |
parent | 2fd464893b66d3898cba83686b19ef15f9529d97 (diff) | |
download | subsurface-820fefb372e85cfe0857bb41a63ca032a87bfb54.tar.gz |
mobile: more build hackery
So while the documentation explicitly says that you need to have the
getInstance()registerTypes() call, that clearly is not supported if you
build kirigami as a library. Even the required include file doesn't
exist in the install-root.
So let's try some other way to make this work. Heck if I know what the
correct way of doing this might be.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-helper.cpp')
-rw-r--r-- | subsurface-helper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index fbf173792..7120405dc 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -23,7 +23,6 @@ #include "core/downloadfromdcthread.h" #include "core/subsurfacestartup.h" // for testqml #include "qt-models/diveimportedmodel.h" -#include "kirigamiplugin.h" #else #include "desktop-widgets/mainwindow.h" #endif @@ -40,7 +39,10 @@ QObject *qqWindowObject = NULL; static void register_qml_types(QQmlEngine *); static void register_meta_types(); +#ifdef SUBSURFACE_MOBILE +#include <QtPlugin> Q_IMPORT_PLUGIN(KirigamiPlugin) +#endif void init_ui() { @@ -66,8 +68,6 @@ void run_ui() { #ifdef SUBSURFACE_MOBILE #if defined(Q_OS_ANDROID) - // according to the documentation this is required on Android, but nowhere else - KirigamiPlugin::getInstance().registerTypes(); // work around an odd interaction between the OnePlus flavor of Android and Qt font handling if (getAndroidHWInfo().contains("/OnePlus/")) { QFontDatabase db; |