diff options
-rw-r--r-- | mobile-widgets/qmlmanager.h | 2 | ||||
-rw-r--r-- | subsurface-mobile-helper.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 1c86e96b9..d905fe236 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -8,6 +8,7 @@ #include <QElapsedTimer> #include "core/gpslocation.h" +#include "qt-models/divelistmodel.h" class QMLManager : public QObject { Q_OBJECT @@ -81,6 +82,7 @@ public: void setSyncToCloud(bool status); typedef void (QMLManager::*execute_function_type)(); + DiveListSortModel *dlSortModel; public slots: void applicationStateChanged(Qt::ApplicationState state); diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index d8430a597..2093af9f4 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -74,7 +74,9 @@ void run_ui() qDebug() << "qqwindow devicePixelRatio" << qml_window->devicePixelRatio() << qml_window->screen()->devicePixelRatio(); QScreen *screen = qml_window->screen(); QObject::connect(qml_window, &QQuickWindow::screenChanged, QMLManager::instance(), &QMLManager::screenChanged); - QMLManager::instance()->screenChanged(screen); + QMLManager *manager = QMLManager::instance(); + manager->dlSortModel = sortModel; + manager->screenChanged(screen); qDebug() << "qqwindow screen has ldpi/pdpi" << screen->logicalDotsPerInch() << screen->physicalDotsPerInch(); #if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) qml_window->setHeight(1200); |