elementTerminals(): keep a "%3" or "%4" in a terminal's name as written

Review of the previous commit: the line was built with chained arg()
calls, so a "%3" in a terminal's name was replaced by the conductor
count -- as before -- and now a "%4" by the uuid as well. One
multi-argument arg() substitutes each placeholder of the pattern once.

percentInNameKept renames a terminal of perceuse.qet "x%3y%4": listed as
"x1y{uuid}" before, "x%3y%4" now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-09-29 10:49:24 +13:00
parent 9fdd6ac333
commit 3112727ee7
3 changed files with 43 additions and 5 deletions
+6 -4
View File
@@ -773,11 +773,13 @@ QStringList QetScriptApi::elementTerminals(int folioIndex, const QString &elemen
for (int i = 0 ; i < terminals.count() ; ++i)
{
Terminal *t = terminals.at(i);
//One multi-argument arg(): chained ones would also replace a
//"%3" or "%4" inside the terminal's name
list << QStringLiteral("%1: %2 (%3 conductor(s)) %4")
.arg(i)
.arg(t->name().isEmpty() ? QStringLiteral("-") : t->name())
.arg(t->conductorsCount())
.arg(t->stableUuid().toString());
.arg(QString::number(i),
t->name().isEmpty() ? QStringLiteral("-") : t->name(),
QString::number(t->conductorsCount()),
t->stableUuid().toString());
}
return list;
}