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>
This commit is contained in:
Dirk Hohndel 2020-11-27 21:05:39 +00:00
parent 2fd464893b
commit 820fefb372

View file

@ -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;