mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-23 15:00:47 -04: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
|
@ -309,10 +309,10 @@ void KMessageWidget::setMessageType(KMessageWidget::MessageType type)
|
|||
"}"
|
||||
".QLabel { color: %6; }"
|
||||
))
|
||||
.arg(bg0.name())
|
||||
.arg(bg1.name())
|
||||
.arg(bg2.name())
|
||||
.arg(border.name())
|
||||
.arg(bg0.name(),
|
||||
bg1.name(),
|
||||
bg2.name(),
|
||||
border.name())
|
||||
// DefaultFrameWidth returns the size of the external margin + border width. We know our border is 1px,
|
||||
// so we subtract this from the frame normal QStyle FrameWidth to get our margin
|
||||
.arg(style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, this) - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue