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

@@ -216,7 +216,7 @@ GeomFillSurface::GeomFillSurface(ViewProviderGeomFillSurface* vp, Surface::GeomF
// Create context menu
QAction* remove = new QAction(tr("Remove"), this);
remove->setShortcut(QString::fromLatin1("Del"));
remove->setShortcut(QStringLiteral("Del"));
ui->listWidget->addAction(remove);
connect(remove, &QAction::triggered, this, &GeomFillSurface::onDeleteEdge);
@@ -307,8 +307,8 @@ void GeomFillSurface::setEditedObject(Surface::GeomFillSurface* obj)
}
ui->listWidget->addItem(item);
QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8((*it)->Label.getValue()),
QString::fromStdString(*jt));
QString text = QStringLiteral("%1.%2").arg(QString::fromUtf8((*it)->Label.getValue()),
QString::fromStdString(*jt));
item->setText(text);
QList<QVariant> data;
@@ -486,9 +486,9 @@ void GeomFillSurface::onSelectionChanged(const Gui::SelectionChanges& msg)
ui->listWidget->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;