Reduce function call overhead

The arg() function of the QString class has a variable length argument
which allows to reduce the number of chained calls to the same function.
With proper formatting, readability is not affected.
This commit is contained in:
Gianluca Recchia 2018-10-28 12:23:06 +01:00
parent 18fd20f898
commit a67a574b89
No known key found for this signature in database
GPG key ID: 3C2B4128D9A1F218
8 changed files with 30 additions and 40 deletions

View file

@ -65,9 +65,9 @@ AboutDialog::AboutDialog(QWidget* parent)
#endif
debugInfo.append("\n").append(QString("%1\n- Qt %2\n- %3\n\n")
.arg(tr("Libraries:"))
.arg(QString::fromLocal8Bit(qVersion()))
.arg(Crypto::backendVersion()));
.arg(tr("Libraries:"),
QString::fromLocal8Bit(qVersion()),
Crypto::backendVersion()));
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
debugInfo.append(tr("Operating system: %1\nCPU architecture: %2\nKernel: %3 %4")