Surface: Use QStringLiteral

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

View File

@@ -125,7 +125,7 @@ FillingVertexPanel::FillingVertexPanel(ViewProviderFilling* vp, Surface::Filling
// Create context menu
QAction* action = new QAction(tr("Remove"), this);
action->setShortcut(QString::fromLatin1("Del"));
action->setShortcut(QStringLiteral("Del"));
action->setShortcutContext(Qt::WidgetShortcut);
ui->listFreeVertex->addAction(action);
connect(action, &QAction::triggered, this, &FillingVertexPanel::onDeleteVertex);
@@ -175,8 +175,8 @@ void FillingVertexPanel::setEditedObject(Surface::Filling* obj)
QListWidgetItem* item = new QListWidgetItem(ui->listFreeVertex);
ui->listFreeVertex->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;
@@ -287,9 +287,9 @@ void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg)
ui->listFreeVertex->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;