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