Remove broken wild card list from QMake's help output

The description of the project mode looked like this:

  -project       Put qmake into project file generation mode
                 In this mode qmake interprets files as files to
                 be built,
                 defaults to *; *; *; *.ts; *.xlf; *.qrc

The list of wildcards is incomplete. Unfortunately the file extensions
are defined in QMAKE_EXT_* variables in mkspecs, and the help display
code has no access to that data. This went unnoticed for quite some
time, and fixing this is too involved considering the gain.

Replace the text above with the static text below:

  -project       Put qmake into project file generation mode
                 In this mode qmake interprets [files] as files to
                 be added to the .pro file. By default, all files with
                 known source extensions are added.

Change-Id: I815a50957c05dccc45e1cd6657f568599d1911f6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Joerg Bornemann 2019-08-16 22:01:09 +02:00
parent 29b1ac0697
commit 09bfc52dde
2 changed files with 5 additions and 6 deletions

View File

@ -36,7 +36,7 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QString project_builtin_regx() //calculate the builtin regular expression.. static QString project_builtin_regx() //calculate the builtin regular expression..
{ {
QString ret; QString ret;
QStringList builtin_exts; QStringList builtin_exts;

View File

@ -122,7 +122,6 @@ static QString detectProjectFile(const QString &path)
return ret; return ret;
} }
QString project_builtin_regx();
bool usage(const char *a0) bool usage(const char *a0)
{ {
fprintf(stdout, "Usage: %s [mode] [options] [files]\n" fprintf(stdout, "Usage: %s [mode] [options] [files]\n"
@ -134,9 +133,9 @@ bool usage(const char *a0)
"\n" "\n"
"Mode:\n" "Mode:\n"
" -project Put qmake into project file generation mode%s\n" " -project Put qmake into project file generation mode%s\n"
" In this mode qmake interprets files as files to\n" " In this mode qmake interprets [files] as files to\n"
" be built,\n" " be added to the .pro file. By default, all files with\n"
" defaults to %s\n" " known source extensions are added.\n"
" Note: The created .pro file probably will \n" " Note: The created .pro file probably will \n"
" need to be edited. For example add the QT variable to \n" " need to be edited. For example add the QT variable to \n"
" specify what modules are required.\n" " specify what modules are required.\n"
@ -184,7 +183,7 @@ bool usage(const char *a0)
" -nomoc Don't generate moc targets [makefile mode only]\n" " -nomoc Don't generate moc targets [makefile mode only]\n"
" -nopwd Don't look for files in pwd [project mode only]\n" " -nopwd Don't look for files in pwd [project mode only]\n"
,a0, ,a0,
default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "", project_builtin_regx().toLatin1().constData(), default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "",
default_mode(a0) == Option::QMAKE_GENERATE_MAKEFILE ? " (default)" : "" default_mode(a0) == Option::QMAKE_GENERATE_MAKEFILE ? " (default)" : ""
); );
return false; return false;