Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg]

This commit is contained in:
wmayer
2019-02-11 16:12:50 +01:00
parent 92614e5688
commit 110f6f74a4
3 changed files with 8 additions and 10 deletions

View File

@@ -292,8 +292,7 @@ void TDragger::drag()
static_cast<double>(translationIncrementCount.getValue()) * translationIncrement.getValue(), Base::Unit::Length);
QString message = QString::fromLatin1("%1 %2")
.arg(QObject::tr("Translation:"))
.arg(quantity.getUserString());
.arg(QObject::tr("Translation:"), quantity.getUserString());
getMainWindow()->showMessage(message, 3000);
}
@@ -578,8 +577,7 @@ void RDragger::drag()
rotationIncrement.getValue(), Base::Unit::Angle);
QString message = QString::fromLatin1("%1 %2")
.arg(QObject::tr("Rotation:"))
.arg(quantity.getUserString());
.arg(QObject::tr("Rotation:"), quantity.getUserString());
getMainWindow()->showMessage(message, 3000);
}