diff --git a/src/app/settingsview/components/DeviceItemDelegate.qml b/src/app/settingsview/components/DeviceItemDelegate.qml index 352cdae5..73bba9ce 100644 --- a/src/app/settingsview/components/DeviceItemDelegate.qml +++ b/src/app/settingsview/components/DeviceItemDelegate.qml @@ -89,7 +89,7 @@ ItemDelegate { loseFocusWhenEnterPressed: true backgroundColor: JamiTheme.transparentColor - onEditingFinished: { + onAccepted: { AvAdapter.setDeviceName(editDeviceName.text) editable = !editable } diff --git a/src/libclient/devicemodel.cpp b/src/libclient/devicemodel.cpp index b5e9307a..9f377c2c 100644 --- a/src/libclient/devicemodel.cpp +++ b/src/libclient/devicemodel.cpp @@ -105,12 +105,12 @@ DeviceModel::setCurrentDeviceName(const QString& newName) config.deviceName = newName; owner.accountModel->setAccountConfig(owner.id, config); // Update model - std::lock_guard lock(pimpl_->devicesMtx_); + std::unique_lock lock(pimpl_->devicesMtx_); for (auto& device : pimpl_->devices_) { if (device.id == config.deviceId) { device.name = newName; + lock.unlock(); Q_EMIT deviceUpdated(device.id); - return; } }