Gui: Use QStringLiteral

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-09 18:33:01 +01:00
parent bad9499d50
commit f647d4a1eb
83 changed files with 519 additions and 520 deletions

View File

@@ -282,7 +282,7 @@ QString ButtonModel::getLabel(const int &number) const
GetGroup(numberString.toLatin1())->
GetASCII("Description",""));
if (desc.length())
desc = QString::fromUtf8(" \"") + desc + QString::fromUtf8("\"");
desc = QStringLiteral(" \"") + desc + QStringLiteral("\"");
return tr("Button %1").arg(number + 1) + desc;
} else
return tr("Out Of Range");
@@ -492,7 +492,7 @@ CommandNode* CommandModel::nodeFromIndex(const QModelIndex &index) const
void CommandModel::goAddMacro(const QByteArray &macroName)
{
QModelIndexList indexList(this->match(this->index(0,0), Qt::UserRole, QVariant(QString::fromLatin1("Macros")),
QModelIndexList indexList(this->match(this->index(0,0), Qt::UserRole, QVariant(QStringLiteral("Macros")),
1, Qt::MatchWrap | Qt::MatchRecursive));
QModelIndex macrosIndex;
if (indexList.empty())
@@ -500,7 +500,7 @@ void CommandModel::goAddMacro(const QByteArray &macroName)
//this is the first macro and we have to add the Macros item.
//figure out where to insert it. Should be in the command groups now.
QStringList groups = orderedGroups();
int location(groups.indexOf(QString::fromLatin1("Macros")));
int location(groups.indexOf(QStringLiteral("Macros")));
if (location == -1)
location = groups.size();
//add row