diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-07-12 04:14:24 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-12 04:14:24 -0700 |
commit | 2c111bb4cc368a3ff1faed38e0d6fade3912d201 (patch) | |
tree | 3c9c30a9233bcc12009387c91722e9279d709f09 /mobile-widgets/qmlmanager.cpp | |
parent | bec5f3c44f4c08a19700bce912c818c2d650a224 (diff) | |
download | subsurface-2c111bb4cc368a3ff1faed38e0d6fade3912d201.tar.gz |
QML UI: make BT state available to QML
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 8 |
1 files changed, 8 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) |