QErrorMessage: add some strategic qMove()s

Saves 56 bytes in text size on my machine.

Change-Id: Ic92943356e0e27620346854e02c129cdfa00f894
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Marc Mutz 2015-04-05 21:10:47 +02:00
parent 414dd4bf12
commit 3cb7a1b957

View File

@ -307,9 +307,9 @@ QErrorMessage * QErrorMessage::qtHandler()
bool QErrorMessagePrivate::nextPending() bool QErrorMessagePrivate::nextPending()
{ {
while (!pending.empty()) { while (!pending.empty()) {
const QPair<QString,QString> &pendingMessage = pending.front(); QPair<QString,QString> &pendingMessage = pending.front();
QString message = pendingMessage.first; QString message = qMove(pendingMessage.first);
QString type = pendingMessage.second; QString type = qMove(pendingMessage.second);
pending.pop(); pending.pop();
if (!message.isEmpty() && ((type.isEmpty() && !doNotShow.contains(message)) || (!type.isEmpty() && !doNotShowType.contains(type)))) { if (!message.isEmpty() && ((type.isEmpty() && !doNotShow.contains(message)) || (!type.isEmpty() && !doNotShowType.contains(type)))) {
#ifndef QT_NO_TEXTHTMLPARSER #ifndef QT_NO_TEXTHTMLPARSER
@ -317,8 +317,8 @@ bool QErrorMessagePrivate::nextPending()
#else #else
errors->setPlainText(message); errors->setPlainText(message);
#endif #endif
currentMessage = message; currentMessage = qMove(message);
currentType = type; currentType = qMove(type);
return true; return true;
} }
} }