mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-29 05:44:14 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user