From f677d482e9db6f4d566eac40909bb7c8f01fafd7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 2 Apr 2016 07:02:44 -0500 Subject: QML UI: don't go through manager object to open user manual We can open URLs in the browser directly from QML. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/main.qml | 2 +- qt-mobile/qmlmanager.cpp | 7 ------- qt-mobile/qmlmanager.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 76696ba1e..9365052a8 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -205,7 +205,7 @@ Kirigami.ApplicationWindow { Kirigami.Action { text: "User manual" onTriggered: { - manager.showUserManual() + Qt.openUrlExternally("https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual/") } }, Kirigami.Action { diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 301a02ce1..a3506ce4d 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -969,13 +969,6 @@ void QMLManager::showMap(const QString& location) } } -#define MOBILEUSERMANUAL QUrl(QLatin1Literal("https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual/")) - -void QMLManager::showUserManual() -{ - QDesktopServices::openUrl(MOBILEUSERMANUAL); -} - // where in the QML dive list is that dive? int QMLManager::getIndex(const QString &diveId) { diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index 2113a1dfe..de04156f5 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -104,7 +104,6 @@ public slots: void finishSetup(); void openLocalThenRemote(QString url); void showMap(const QString& location); - void showUserManual(); int getIndex(const QString& diveId); QString getNumber(const QString& diveId); QString getDate(const QString& diveId); -- cgit v1.2.3-70-g09d2