aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-mobile-helper.cpp')
-rw-r--r--subsurface-mobile-helper.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp
index 38b6be9f4..5fe83acd9 100644
--- a/subsurface-mobile-helper.cpp
+++ b/subsurface-mobile-helper.cpp
@@ -29,6 +29,8 @@
#include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h"
+#include "core/ssrf.h"
+
QObject *qqWindowObject = NULL;
void set_non_bt_addresses() {
@@ -51,6 +53,7 @@ void init_ui()
void run_ui()
{
+ LOG_STP("run_ui starting");
qmlRegisterType<QMLManager>("org.subsurfacedivelog.mobile", 1, 0, "QMLManager");
qmlRegisterType<QMLProfile>("org.subsurfacedivelog.mobile", 1, 0, "QMLProfile");
@@ -63,6 +66,7 @@ void run_ui()
qmlRegisterType<MapLocation>("org.subsurfacedivelog.mobile", 1, 0, "MapLocation");
QQmlApplicationEngine engine;
+ LOG_STP("run_ui qml engine started");
KirigamiPlugin::getInstance().registerTypes();
#if defined(__APPLE__) && !defined(Q_OS_IOS)
// when running the QML UI on a Mac the deployment of the QML Components seems
@@ -79,11 +83,13 @@ void run_ui()
#endif
engine.addImportPath("qrc://imports");
DiveListModel diveListModel;
+ LOG_STP("run_ui diveListModel started");
DiveListSortModel *sortModel = new DiveListSortModel(0);
sortModel->setSourceModel(&diveListModel);
sortModel->setDynamicSortFilter(true);
sortModel->setSortRole(DiveListModel::DiveDateRole);
sortModel->sort(0, Qt::DescendingOrder);
+ LOG_STP("run_ui diveListModel sorted");
GpsListModel gpsListModel;
QSortFilterProxyModel *gpsSortModel = new QSortFilterProxyModel(0);
gpsSortModel->setSourceModel(&gpsListModel);
@@ -95,11 +101,13 @@ void run_ui()
ctxt->setContextProperty("gpsModel", gpsSortModel);
ctxt->setContextProperty("vendorList", vendorList);
set_non_bt_addresses();
+ LOG_STP("run_ui set_non_bt_adresses");
ctxt->setContextProperty("connectionListModel", &connectionListModel);
ctxt->setContextProperty("logModel", MessageHandlerModel::self());
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
+ LOG_STP("run_ui qml loaded");
qqWindowObject = engine.rootObjects().value(0);
if (!qqWindowObject) {
fprintf(stderr, "can't create window object\n");
@@ -112,8 +120,10 @@ void run_ui()
QScreen *screen = qml_window->screen();
QObject::connect(qml_window, &QQuickWindow::screenChanged, QMLManager::instance(), &QMLManager::screenChanged);
QMLManager *manager = QMLManager::instance();
+ LOG_STP("run_ui qmlmanager instance started");
// now that the log file is initialized...
show_computer_list();
+ LOG_STP("run_ui show_computer_list");
manager->setDevicePixelRatio(qml_window->devicePixelRatio(), qml_window->screen());
manager->dlSortModel = sortModel;
@@ -124,6 +134,7 @@ void run_ui()
qml_window->setWidth(800);
#endif
qml_window->show();
+ LOG_STP("run_ui running exec");
qApp->exec();
}