diff options
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.cpp')
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index c036fc3b7..1b43c8471 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -152,7 +152,7 @@ void BtDeviceSelectionDialog::on_save_clicked() QBluetoothDeviceInfo remoteDeviceInfo = currentItem->data(Qt::UserRole).value<QBluetoothDeviceInfo>(); // Save the selected device - selectedRemoteDeviceInfo = QSharedPointer<QBluetoothDeviceInfo>(new QBluetoothDeviceInfo(remoteDeviceInfo)); + selectedRemoteDeviceInfo.reset(new QBluetoothDeviceInfo(remoteDeviceInfo)); QString address = remoteDeviceInfo.address().isNull() ? remoteDeviceInfo.deviceUuid().toString() : remoteDeviceInfo.address().toString(); saveBtDeviceInfo(address.toUtf8().constData(), remoteDeviceInfo); @@ -460,9 +460,8 @@ QString BtDeviceSelectionDialog::getSelectedDeviceAddress() QString BtDeviceSelectionDialog::getSelectedDeviceName() { - if (selectedRemoteDeviceInfo) { + if (selectedRemoteDeviceInfo) return selectedRemoteDeviceInfo.data()->name(); - } return QString(); } |