core: turn string data in struct divecomputer into std::string

Simplifies memory management.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-18 17:03:19 +02:00 committed by bstoeger
parent cc39f709ce
commit b9a2eff3c9
28 changed files with 114 additions and 147 deletions

View file

@ -681,8 +681,9 @@ void ProfileWidget2::renameCurrentDC()
if (!currentdc)
return;
QString newName = QInputDialog::getText(this, tr("Edit nickname"),
tr("Set new nickname for %1 (serial %2):").arg(currentdc->model).arg(currentdc->serial),
QLineEdit::Normal, get_dc_nickname(currentdc), &ok);
tr("Set new nickname for %1 (serial %2):").arg(QString::fromStdString(currentdc->model)).
arg(QString::fromStdString(currentdc->serial)),
QLineEdit::Normal, QString::fromStdString(get_dc_nickname(currentdc)), &ok);
if (ok)
Command::editDeviceNickname(currentdc, newName);
}