From 97e26fd51b5e235d0e60aeac4252f0b1bb0d1dff Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 11 Jan 2020 20:59:08 -0800 Subject: mobile: allow disabling BT support from the command line This is a quick hack to reduce the noise in the log file when chasing other bugs. Maybe this should not be enabled on release builds, but right now I don't think the harm that having this in would do. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 49556646b..4f16cf1d0 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -230,14 +230,16 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), appendTextToLog(getAndroidHWInfo()); #endif setStartPageText(tr("Starting...")); - - // 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(); - connect(&btDiscovery->localBtDevice, &QBluetoothLocalDevice::hostModeStateChanged, - this, &QMLManager::btHostModeChange); - + if (ignore_bt) { + m_btEnabled = false; + } else { + // 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(); + connect(&btDiscovery->localBtDevice, &QBluetoothLocalDevice::hostModeStateChanged, + this, &QMLManager::btHostModeChange); + } // create location manager service locationProvider = new GpsLocation(&appendTextToLogStandalone, this); progress_callback = &progressCallback; -- cgit v1.2.3-70-g09d2