From 820fefb372e85cfe0857bb41a63ca032a87bfb54 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 27 Nov 2020 21:05:39 +0000 Subject: 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 --- subsurface-helper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'subsurface-helper.cpp') 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 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; -- cgit v1.2.3-70-g09d2