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>
This commit is contained in:
parent
a7c87be888
commit
3ab7b7e230
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user