summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractinterface.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-08 17:09:06 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-04-12 11:48:08 +0200
commite9e43bff2933937eda873ed549e27f909a3b00b7 (patch)
tree1097e7abc4a77977466e239aaf724cf2149a54bb /src/dbus/qdbusabstractinterface.cpp
parent6e77d2a10c2af26f79b3bf89e8a9d005cf2b6512 (diff)
QtDBus: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434 Change-Id: I99d9a82c77d00124ea8953b98406959f1bf9413a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/dbus/qdbusabstractinterface.cpp')
-rw-r--r--src/dbus/qdbusabstractinterface.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index ca374093b0..09263fd82f 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -58,6 +58,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
namespace {
// ### Qt6: change to a regular QEvent (customEvent)
// We need to use a QMetaCallEvent here because we can't override customEvent() in
@@ -163,8 +165,7 @@ bool QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, void *retu
qWarning("QDBusAbstractInterface: type %s must be registered with Qt D-Bus before it can be "
"used to read property %s.%s",
mp.typeName(), qPrintable(interface), mp.name());
- lastError = QDBusError(QDBusError::Failed,
- QLatin1String("Unregistered type %1 cannot be handled")
+ lastError = QDBusError(QDBusError::Failed, "Unregistered type %1 cannot be handled"_L1
.arg(QLatin1String(mp.typeName())));
return false;
}
@@ -182,9 +183,9 @@ bool QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, void *retu
lastError = QDBusError(reply);
return false;
}
- if (reply.signature() != QLatin1String("v")) {
- QString errmsg = QLatin1String("Invalid signature `%1' in return from call to "
- DBUS_INTERFACE_PROPERTIES);
+ if (reply.signature() != "v"_L1) {
+ QString errmsg = "Invalid signature `%1' in return from call to "
+ DBUS_INTERFACE_PROPERTIES ""_L1;
lastError = QDBusError(QDBusError::InvalidSignature, std::move(errmsg).arg(reply.signature()));
return false;
}
@@ -220,8 +221,8 @@ bool QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, void *retu
}
// there was an error...
- const auto errmsg = QLatin1String("Unexpected `%1' (%2) when retrieving property `%3.%4' "
- "(expected type `%5' (%6))");
+ const auto errmsg = "Unexpected `%1' (%2) when retrieving property `%3.%4' "
+ "(expected type `%5' (%6))"_L1;
lastError = QDBusError(QDBusError::InvalidSignature,
errmsg.arg(QLatin1String(foundType),
QLatin1String(foundSignature),