Updated command to be a single line

This commit is contained in:
KanishkaHalder1771 2025-05-13 12:49:06 +05:30
commit f6fb956552

View file

@ -490,6 +490,12 @@ QString wrapText(const QString &text, const int initialIndentation = USAGE_TEXT_
QString makeUsage(const QString &prgName)
{
const QString indentation {USAGE_INDENTATION, u' '};
#if defined(Q_OS_WIN)
const QString noSplashCommand = u"set QBT_NO_SPLASH=1 && " + prgName;
#else
const QString noSplashCommand = u"QBT_NO_SPLASH=1 " + prgName;
#endif
const QString text = QCoreApplication::translate("CMD Options", "Usage:") + u'\n'
+ indentation + prgName + u' ' + QCoreApplication::translate("CMD Options", "[options] [(<filename> | <url>)...]") + u'\n'
@ -542,11 +548,7 @@ QString makeUsage(const QString &prgName)
"'parameter-name', environment variable name is 'QBT_PARAMETER_NAME' (in upper "
"case, '-' replaced with '_'). To pass flag values, set the variable to '1' or "
"'TRUE'. For example, to disable the splash screen: "), 0) + u'\n'
#if defined(Q_OS_WIN)
+ u"set QBT_NO_SPLASH=1\n" + prgName + u'\n'
#else
+ u"QBT_NO_SPLASH=1 " + prgName + u'\n'
#endif
+ noSplashCommand + u'\n'
+ wrapText(QCoreApplication::translate("CMD Options", "Command line parameters take precedence over environment variables"), 0) + u'\n';
return text;