Don't stream QStringLiterals into QDebug

Normal (C) string literals do just as well and use more than twice
less space in the DATA section.

Change-Id: Iafb0682a362c41dfd5b4d8b9137d88014d7992a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2014-10-08 12:45:32 +02:00
parent a5b647804b
commit e5f528fb0e
4 changed files with 10 additions and 10 deletions

View File

@ -954,7 +954,7 @@ QDataStream &operator>>(QDataStream &ds, QTimeZone &tz)
QDebug operator<<(QDebug dbg, const QTimeZone &tz)
{
//TODO Include backend and data version details?
dbg.nospace() << QStringLiteral("QTimeZone(") << qPrintable(QString::fromUtf8(tz.id())) << ')';
dbg.nospace() << "QTimeZone(" << QString::fromUtf8(tz.id()) << ')';
return dbg.space();
}
#endif

View File

@ -974,7 +974,7 @@ QDebug operator<<(QDebug dbg, const QPageLayout &layout)
.arg(units);
dbg.nospace() << output;
} else {
dbg.nospace() << QStringLiteral("QPageLayout()");
dbg.nospace() << "QPageLayout()";
}
return dbg.space();
}

View File

@ -1863,7 +1863,7 @@ QDebug operator<<(QDebug dbg, const QPageSize &pageSize)
.arg(pageSize.id());
dbg.nospace() << output;
} else {
dbg.nospace() << QStringLiteral("QPageSize()");
dbg.nospace() << "QPageSize()";
}
return dbg.space();
}

View File

@ -166,11 +166,11 @@ bool QSpiApplicationAdaptor::eventFilter(QObject *target, QEvent *event)
de.modifiers |= 1 << ATSPI_MODIFIER_META;
#ifdef KEYBOARD_DEBUG
qDebug() << QStringLiteral("Key event text:") << event->type() << de.text
<< QStringLiteral("native virtual key:") << de.id
<< QStringLiteral("hardware code/scancode:") << de.hardwareCode
<< QStringLiteral("modifiers:") << de.modifiers
<< QStringLiteral("text:") << de.text;
qDebug() << "Key event text:" << event->type() << de.text
<< "native virtual key:" << de.id
<< "hardware code/scancode:" << de.hardwareCode
<< "modifiers:" << de.modifiers
<< "text:" << de.text;
#endif
QDBusMessage m = QDBusMessage::createMethodCall(QStringLiteral("org.a11y.atspi.Registry"),
@ -202,7 +202,7 @@ QKeyEvent* QSpiApplicationAdaptor::copyKeyEvent(QKeyEvent* old)
void QSpiApplicationAdaptor::notifyKeyboardListenerCallback(const QDBusMessage& message)
{
if (!keyEvents.length()) {
qWarning() << QStringLiteral("QSpiApplication::notifyKeyboardListenerCallback with no queued key called");
qWarning("QSpiApplication::notifyKeyboardListenerCallback with no queued key called");
return;
}
Q_ASSERT(message.arguments().length() == 1);
@ -218,7 +218,7 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerCallback(const QDBusMessage&
void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error, const QDBusMessage& /*message*/)
{
qWarning() << QStringLiteral("QSpiApplication::keyEventError ") << error.name() << error.message();
qWarning() << "QSpiApplication::keyEventError " << error.name() << error.message();
while (!keyEvents.isEmpty()) {
QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
if (event.first)