From f8f4a75d82b0fdf7cd19ba241c6ea406e7442d22 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 3 Jun 2019 23:08:05 +0200 Subject: QtDBus: use new QLatin1String::arg() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Saves more than 4KiB in text size (~0.7%) on optimized GCC 9.1 Linux AMD64 builds. Change-Id: I5b29eae620370abd91e3a7f98e660c32470aed1c Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne Reviewed-by: MÃ¥rten Nordheim --- src/dbus/qdbusmarshaller.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/dbus/qdbusmarshaller.cpp') diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp index 4ea6cefff6..8e0b3e4598 100644 --- a/src/dbus/qdbusmarshaller.cpp +++ b/src/dbus/qdbusmarshaller.cpp @@ -211,7 +211,7 @@ inline bool QDBusMarshaller::append(const QDBusVariant &arg) qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. " "Use qDBusRegisterMetaType to register it", QMetaType::typeName(id), id); - error(QString::fromLatin1("Unregistered type %1 passed in arguments") + error(QLatin1String("Unregistered type %1 passed in arguments") .arg(QLatin1String(QMetaType::typeName(id)))); return false; } @@ -253,7 +253,7 @@ inline QDBusMarshaller *QDBusMarshaller::beginArray(int id) qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. " "Use qDBusRegisterMetaType to register it", QMetaType::typeName(id), id); - error(QString::fromLatin1("Unregistered type %1 passed in arguments") + error(QLatin1String("Unregistered type %1 passed in arguments") .arg(QLatin1String(QMetaType::typeName(id)))); return this; } @@ -268,14 +268,14 @@ inline QDBusMarshaller *QDBusMarshaller::beginMap(int kid, int vid) qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. " "Use qDBusRegisterMetaType to register it", QMetaType::typeName(kid), kid); - error(QString::fromLatin1("Unregistered type %1 passed in arguments") + error(QLatin1String("Unregistered type %1 passed in arguments") .arg(QLatin1String(QMetaType::typeName(kid)))); return this; } if (ksignature[1] != 0 || !QDBusUtil::isValidBasicType(*ksignature)) { qWarning("QDBusMarshaller: type '%s' (%d) cannot be used as the key type in a D-BUS map.", QMetaType::typeName(kid), kid); - error(QString::fromLatin1("Type %1 passed in arguments cannot be used as a key in a map") + error(QLatin1String("Type %1 passed in arguments cannot be used as a key in a map") .arg(QLatin1String(QMetaType::typeName(kid)))); return this; } @@ -286,7 +286,7 @@ inline QDBusMarshaller *QDBusMarshaller::beginMap(int kid, int vid) qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. " "Use qDBusRegisterMetaType to register it", typeName, vid); - error(QString::fromLatin1("Unregistered type %1 passed in arguments") + error(QLatin1String("Unregistered type %1 passed in arguments") .arg(QLatin1String(typeName))); return this; } @@ -417,7 +417,7 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg) qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. " "Use qDBusRegisterMetaType to register it", QMetaType::typeName(id), id); - error(QString::fromLatin1("Unregistered type %1 passed in arguments") + error(QLatin1String("Unregistered type %1 passed in arguments") .arg(QLatin1String(QMetaType::typeName(id)))); return false; } -- cgit v1.2.3