diff options
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 8 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.h | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 688c97ba5..5b526362a 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -113,6 +113,9 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), // ensure that we start the BTDiscovery - this should be triggered by the export of the class // to QML, but that doesn't seem to always work BTDiscovery *btDiscovery = BTDiscovery::instance(); + m_btEnabled = btDiscovery->btAvailable(); +#else + m_btEnabled = false; #endif setShowPin(false); // create location manager service @@ -1559,6 +1562,11 @@ void QMLManager::setLibdcLog(bool value) emit libdcLogChanged(); } +bool QMLManager::btEnabled() const +{ + return m_btEnabled; +} + #if defined (Q_OS_ANDROID) void writeToAppLogFile(QString logText) diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index e931fe238..33831d396 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -129,6 +129,8 @@ public: bool showPin() const; void setShowPin(bool enable); Q_INVOKABLE void setStatusbarColor(QColor color); + Q_INVOKABLE bool btEnabled() const; + #if defined(Q_OS_ANDROID) void writeToAppLogFile(QString logText); #endif @@ -216,6 +218,8 @@ private: DCDeviceData *m_device_data; QString m_progressMessage; bool m_libdcLog; + bool m_btEnabled; + #if defined(Q_OS_ANDROID) QString appLogFileName; QFile appLogFile; |