diff options
-rw-r--r-- | core/android.cpp | 3 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 7 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/core/android.cpp b/core/android.cpp index 865a0ad7e..f64182b08 100644 --- a/core/android.cpp +++ b/core/android.cpp @@ -175,6 +175,9 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setDeviceString(JNIEn const char *deviceString = env->GetStringUTFChars(javaDeviceString, NULL); Q_UNUSED (obj) LOG(deviceString); +#if defined(SUBSURFACE_MOBILE) + QMLManager::instance()->showDownloadPage(deviceString); +#endif env->ReleaseStringUTFChars(javaDeviceString, deviceString); return; } diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 3495468db..1adf5bf57 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1776,3 +1776,10 @@ int QMLManager::getDetectedProductIndex(const QString ¤tVendorText) { return m_device_data->getDetectedProductIndex(currentVendorText); } + +void QMLManager::showDownloadPage(QString deviceString) +{ + // inform the QML UI that it should show the download page + m_pluggedInDeviceName = strdup(qPrintable(deviceString)); + emit pluggedInDeviceNameChanged(); +} diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index c4ed27e7c..9b956aafe 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -192,7 +192,7 @@ public slots: void quit(); void hasLocationSourceChanged(); void btRescan(); - + void showDownloadPage(QString deviceString); private: BuddyCompletionModel buddyModel; |