Index: sources/view/VBluetooth.cpp =================================================================== diff -u -r5215e145a0f26a20c99e3f10af6ac8a9c3b67383 -r5600d2133dd0ea6dc1f733aa78bd26e2a4892a38 --- sources/view/VBluetooth.cpp (.../VBluetooth.cpp) (revision 5215e145a0f26a20c99e3f10af6ac8a9c3b67383) +++ sources/view/VBluetooth.cpp (.../VBluetooth.cpp) (revision 5600d2133dd0ea6dc1f733aa78bd26e2a4892a38) @@ -66,6 +66,7 @@ void VBluetooth::doScanForDevices() { notifyStatusUpdate(tr("Scanning...")); + scanInProgress(true); _unpairedDevices.clear(); emit didDevicesChanged(); emit didRequestScanForDevices(); @@ -79,6 +80,7 @@ */ void VBluetooth::onScanForDevicesError(QBluetoothDeviceDiscoveryAgent::Error error) { + scanInProgress(false); switch (error) { case QBluetoothDeviceDiscoveryAgent::PoweredOffError: notifyStatusUpdate(tr("Error: Bluetooth module is powered off.")); @@ -109,6 +111,7 @@ */ void VBluetooth::onScanForDevicesFinished() { + scanInProgress(false); emit didScanFinished(); notifyStatusUpdate(tr("Scan Finished.")); } @@ -336,6 +339,8 @@ */ void VBluetooth::onLoadAndConnectToLastSelectedDevice(const QJsonObject &obj) { + // TODO: Use QSettings instead of QJsonObject + // TODO: Use QSettings::IniFormat and don't set the path so it is loaded from the application folder if (obj.keys().contains(_lastSelectedDeviceAddrKey)) { QJsonObject lastSelectDeviceObj = obj.value(_lastSelectedDeviceAddrKey).toObject(); if (!lastSelectDeviceObj.isEmpty()) { @@ -356,6 +361,8 @@ */ void VBluetooth::onLoadMyDevices(const QString &path) { + // TODO: Use QSettings instead of QJsonObject + // TODO: Use QSettings::IniFormat and don't set the path so it is loaded from the application folder _pairedDevices.clear(); QJsonObject obj; if (!FileHandler::read(path, obj))