diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-06-05 11:16:22 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-06-07 10:26:04 +0200 |
commit | 3ab7b7e23023a223392ae67514ff7ec73126ac42 (patch) | |
tree | 6f317f3c90c3f5a1b92b7757ae1090f515241897 | |
parent | a7c87be8883458d151e3fe7fa1a8511212af41d4 (diff) |
Fix deprecation warnings agains u"..."_qs in dnslookup.cpp
Pick-to: 6.5 6.6
Change-Id: I29a177c7d46304c5b494218f5862195eb92c7684
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r-- | examples/network/dnslookup/dnslookup.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/network/dnslookup/dnslookup.cpp b/examples/network/dnslookup/dnslookup.cpp index bfcd60813b..9e74ddcf42 100644 --- a/examples/network/dnslookup/dnslookup.cpp +++ b/examples/network/dnslookup/dnslookup.cpp @@ -80,7 +80,7 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, DnsQuery *qu if (query->nameServer.isNull() || query->nameServer.protocol() == QAbstractSocket::UnknownNetworkLayerProtocol) { return { Status::Error, - u"Bad nameserver address: %1"_qs.arg(nameserver) }; + u"Bad nameserver address: %1"_s.arg(nameserver) }; } } @@ -89,14 +89,14 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, DnsQuery *qu if (std::optional<QDnsLookup::Type> type = typeFromParameter(typeParameter)) query->type = *type; else - return { Status::Error, u"Bad record type: %1"_qs.arg(typeParameter) }; + return { Status::Error, u"Bad record type: %1"_s.arg(typeParameter) }; } const QStringList positionalArguments = parser.positionalArguments(); if (positionalArguments.isEmpty()) - return { Status::Error, u"Argument 'name' missing."_qs }; + return { Status::Error, u"Argument 'name' missing."_s }; if (positionalArguments.size() > 1) - return { Status::Error, u"Several 'name' arguments specified."_qs }; + return { Status::Error, u"Several 'name' arguments specified."_s }; query->name = positionalArguments.first(); return { Status::Ok }; @@ -203,7 +203,7 @@ int main(int argc, char *argv[]) case Status::Ok: break; case Status::Error: - std::fputs(qPrintable(parseResult.errorString.value_or(u"Unknown error occurred"_qs)), + std::fputs(qPrintable(parseResult.errorString.value_or(u"Unknown error occurred"_s)), stderr); std::fputs("\n\n", stderr); std::fputs(qPrintable(parser.helpText()), stderr); |