Surface: Use QStringLiteral

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-09 18:28:50 +01:00
parent 017156ce44
commit e09698ee47
5 changed files with 42 additions and 46 deletions

View File

@@ -326,8 +326,8 @@ void SectionsPanel::setEditedObject(Surface::Sections* fea)
QListWidgetItem* item = new QListWidgetItem(ui->listSections);
ui->listSections->addItem(item);
QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8(obj->Label.getValue()),
QString::fromStdString(edge));
QString text = QStringLiteral("%1.%2").arg(QString::fromUtf8(obj->Label.getValue()),
QString::fromStdString(edge));
item->setText(text);
// The user data field of a list widget item
@@ -475,9 +475,9 @@ void SectionsPanel::onSelectionChanged(const Gui::SelectionChanges& msg)
ui->listSections->addItem(item);
Gui::SelectionObject sel(msg);
QString text = QString::fromLatin1("%1.%2").arg(
QString::fromUtf8(sel.getObject()->Label.getValue()),
QString::fromLatin1(msg.pSubName));
QString text =
QStringLiteral("%1.%2").arg(QString::fromUtf8(sel.getObject()->Label.getValue()),
QString::fromLatin1(msg.pSubName));
item->setText(text);
QList<QVariant> data;