Gui: Use QStringLiteral for selected element

This commit is contained in:
tetektoza
2025-09-02 21:48:03 +02:00
parent 644e7ae5af
commit 5a17297f5e

View File

@@ -1048,7 +1048,7 @@ void SelectionMenu::createFlatMenu(ElementInfo &elementInfo, QMenu *parentMenu,
const auto &sel = selections[idx];
QString text = QString::fromUtf8(label.c_str());
if (!sel.element.empty()) {
text += QString::fromLatin1(" (") + QString::fromUtf8(sel.element.c_str()) + QString::fromLatin1(")");
text += QStringLiteral(" (%1)").arg(QString::fromUtf8(sel.element.c_str()));
} else if (elementType == "Object" && !sel.subName.empty() && sel.subName.back() == '.') {
text += QString::fromLatin1(" (Whole Object)");
}