qcommandlineparser: use const method more
to avoid implicit detach Change-Id: If01c2d777ceb61e9f919ff0109d054bb7e74a418 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
a7b50c40a0
commit
2c1fdad76c
@ -508,7 +508,7 @@ QString QCommandLineParser::errorText() const
|
||||
if (!d->errorText.isEmpty())
|
||||
return d->errorText;
|
||||
if (d->unknownOptionNames.size() == 1)
|
||||
return tr("Unknown option '%1'.").arg(d->unknownOptionNames.first());
|
||||
return tr("Unknown option '%1'.").arg(d->unknownOptionNames.constFirst());
|
||||
if (d->unknownOptionNames.size() > 1)
|
||||
return tr("Unknown options: %1.").arg(d->unknownOptionNames.join(QStringLiteral(", ")));
|
||||
return QString();
|
||||
|
Loading…
Reference in New Issue
Block a user