summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbuspendingcall.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/qdbuspendingcall.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/qdbuspendingcall.cpp')
-rw-r--r--src/dbus/qdbuspendingcall.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 74aa1629fa..eb9b21a911 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
/*!
\class QDBusPendingCall
\inmodule QtDBus
@@ -188,7 +190,7 @@ bool QDBusPendingCallPrivate::setReplyCallback(QObject *target, const char *memb
void QDBusPendingCallPrivate::setMetaTypes(int count, const QMetaType *types)
{
if (count == 0) {
- expectedReplySignature = QLatin1String(""); // not null
+ expectedReplySignature = ""_L1; // not null
return;
}
@@ -219,8 +221,7 @@ void QDBusPendingCallPrivate::checkReceivedSignature()
// can't use startsWith here because a null string doesn't start or end with an empty string
if (replyMessage.signature().indexOf(expectedReplySignature) != 0) {
- const auto errorMsg = QLatin1String("Unexpected reply signature: got \"%1\", "
- "expected \"%2\"");
+ const auto errorMsg = "Unexpected reply signature: got \"%1\", expected \"%2\""_L1;
replyMessage = QDBusMessage::createError(
QDBusError::InvalidSignature,
errorMsg.arg(replyMessage.signature(), expectedReplySignature));