qcommandlineparser: use string view type more

Change-Id: Ic3a04843d6b73d9489cbce1411453b146842c52f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Anton Kudryavtsev 2023-08-22 13:39:51 +03:00
parent a143158eb1
commit 2da366fbba

View File

@ -1100,7 +1100,8 @@ QString QCommandLineParserPrivate::helpText(bool includeQtOptions) const
QString text; QString text;
QString usage; QString usage;
// executable name // executable name
usage += qApp ? QCoreApplication::arguments().constFirst() : QStringLiteral("<executable_name>"); usage += qApp ? QStringView(QCoreApplication::arguments().constFirst())
: QStringView(u"<executable_name>");
QList<QCommandLineOption> options = commandLineOptionList; QList<QCommandLineOption> options = commandLineOptionList;
if (includeQtOptions && qApp) if (includeQtOptions && qApp)
qApp->d_func()->addQtOptions(&options); qApp->d_func()->addQtOptions(&options);