aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/btdeviceselectiondialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/btdeviceselectiondialog.cpp')
-rw-r--r--qt-ui/btdeviceselectiondialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/btdeviceselectiondialog.cpp b/qt-ui/btdeviceselectiondialog.cpp
index 74afda616..40d57314f 100644
--- a/qt-ui/btdeviceselectiondialog.cpp
+++ b/qt-ui/btdeviceselectiondialog.cpp
@@ -609,14 +609,14 @@ void WinBluetoothDeviceDiscoveryAgent::run()
break;
}
- // Save the name of the discovered device and truncate the address
- QString deviceName = QString(pResults->lpszServiceInstanceName);
- deviceAddress.truncate(addressSize / sizeof(wchar_t));
-
// Remove the round parentheses
deviceAddress.remove(')');
deviceAddress.remove('(');
+ // Save the name of the discovered device and truncate the address
+ QString deviceName = QString(pResults->lpszServiceInstanceName);
+ deviceAddress.truncate(BTH_ADDR_PRETTY_STRING_LEN);
+
// Create an object with information about the discovered device
QBluetoothDeviceInfo deviceInfo = QBluetoothDeviceInfo(QBluetoothAddress(deviceAddress), deviceName, 0);