Skip to content

Commit

Permalink
Remove broken wild card list from QMake's help output
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jobor committed Aug 24, 2019
1 parent 29b1ac0 commit 09bfc52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion qmake/generators/projectgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

QT_BEGIN_NAMESPACE

QString project_builtin_regx() //calculate the builtin regular expression..
static QString project_builtin_regx() //calculate the builtin regular expression..
{
QString ret;
QStringList builtin_exts;
Expand Down
9 changes: 4 additions & 5 deletions qmake/option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ static QString detectProjectFile(const QString &path)
return ret;
}

QString project_builtin_regx();
bool usage(const char *a0)
{
fprintf(stdout, "Usage: %s [mode] [options] [files]\n"
Expand All @@ -134,9 +133,9 @@ bool usage(const char *a0)
"\n"
"Mode:\n"
" -project Put qmake into project file generation mode%s\n"
" In this mode qmake interprets files as files to\n"
" be built,\n"
" defaults to %s\n"
" In this mode qmake interprets [files] as files to\n"
" be added to the .pro file. By default, all files with\n"
" known source extensions are added.\n"
" Note: The created .pro file probably will \n"
" need to be edited. For example add the QT variable to \n"
" specify what modules are required.\n"
Expand Down Expand Up @@ -184,7 +183,7 @@ bool usage(const char *a0)
" -nomoc Don't generate moc targets [makefile mode only]\n"
" -nopwd Don't look for files in pwd [project mode only]\n"
,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)" : ""
);
return false;
Expand Down

0 comments on commit 09bfc52

Please sign in to comment.