mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-31 00:01:07 -05:00
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:
parent
18fd20f898
commit
a67a574b89
8 changed files with 30 additions and 40 deletions
|
|
@ -36,9 +36,9 @@ void CsvParserModel::setFilename(const QString& filename)
|
|||
QString CsvParserModel::getFileInfo()
|
||||
{
|
||||
QString a(tr("%1, %2, %3", "file info: bytes, rows, columns")
|
||||
.arg(tr("%n byte(s)", nullptr, getFileSize()))
|
||||
.arg(tr("%n row(s)", nullptr, getCsvRows()))
|
||||
.arg(tr("%n column(s)", nullptr, qMax(0, getCsvCols() - 1))));
|
||||
.arg(tr("%n byte(s)", nullptr, getFileSize()),
|
||||
tr("%n row(s)", nullptr, getCsvRows()),
|
||||
tr("%n column(s)", nullptr, qMax(0, getCsvCols() - 1))));
|
||||
return a;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue