consistent help output from tools

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-01-25 17:12:36 +02:00
parent 941b3ac6f0
commit b1a72333fc
19 changed files with 312 additions and 209 deletions

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "MOC 1"
.TH MOC 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH MOC 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -90,56 +90,68 @@ with the implementation of the class (or it can be #included into the class's
source file).
.SH "OPTIONS"
.IX Header "OPTIONS"
.Vb 1
\& \-o<file> write output to file rather than stdout
.Vb 2
\& \-o<file>
\& Write output to file rather than stdout.
\&
\& \-I<dir> add dir to the include path for header files
\& \-I<dir>
\& Add dir to the include path for header files.
\&
\& \-E preprocess only; do not generate meta object code
\& \-E
\& Preprocess only; do not generate meta object code.
\&
\& \-D<macro>[=<def>] define macro, with optional definition
\& \-D<macro>[=<def>]
\& define macro, with optional definition.
\&
\& \-U<macro> undefine macro
\& \-U<macro>
\& Undefine macro.
\&
\& \-i do not generate an #include statement
\& \-i
\& Do not generate an #include statement.
\&
\& \-p<path> path prefix for included file
\& \-p<path>
\& Path prefix for included file.
\&
\& \-f[<file>] force #include, optional file name
\& \-f[<file>]
\& Force #include, optional file name.
\&
\& \-nn do not display notes
\& \-nn
\& Do not display notes.
\&
\& \-nw do not display warnings
\& \-nw
\& Do not display warnings.
\&
\& @<file> read additional options from file
\& @<file>
\& Read additional options from file.
\&
\& \-v display version of moc
\& \-v
\& Display version of moc.
.Ve
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"
moc returns 0 on success and other on unexcepted failure.
.SH "BUGS"
.IX Header "BUGS"
.Vb 3
\& The moc does not expand #include or #define, it simply skips any
\& preprocessor directives it encounters. This is regrettable, but is normally
\& not a problem in practice.
\&
\& The moc does not handle all of C++. The main problem is that class
\& templates cannot have signals or slots. This is an important bug. Here is
\& an example:
\&
\& class SomeTemplate<int> : public QFrame {
\& Q_OBJECT
\& ....
\& signals:
\& void bugInMocDetected( int );
\& };
\&
\& Less importantly, the following constructs are illegal. All of them have
\& have alternatives which we think are usually better, so removing these
\& limitations is not a high priority for us.
The moc does not expand #include or #define, it simply skips any
preprocessor directives it encounters. This is regrettable, but is normally
not a problem in practice.
.PP
The moc does not handle all of \*(C+. The main problem is that class
templates cannot have signals or slots. This is an important bug. Here is
an example:
.PP
.Vb 6
\& class SomeTemplate<int> : public QFrame {
\& Q_OBJECT
\& ....
\& signals:
\& void bugInMocDetected( int );
\& };
.Ve
.PP
Less importantly, the following constructs are illegal. All of them have
have alternatives which we think are usually better, so removing these
limitations is not a high priority for us.
.SS "Multiple inheritance requires QObject to be first."
.IX Subsection "Multiple inheritance requires QObject to be first."
.Vb 3

View file

@ -16,29 +16,41 @@ source file).
=head1 OPTIONS
-o<file> write output to file rather than stdout
-o<file>
Write output to file rather than stdout.
-I<dir> add dir to the include path for header files
-I<dir>
Add dir to the include path for header files.
-E preprocess only; do not generate meta object code
-E
Preprocess only; do not generate meta object code.
-D<macro>[=<def>] define macro, with optional definition
-D<macro>[=<def>]
define macro, with optional definition.
-U<macro> undefine macro
-U<macro>
Undefine macro.
-i do not generate an #include statement
-i
Do not generate an #include statement.
-p<path> path prefix for included file
-p<path>
Path prefix for included file.
-f[<file>] force #include, optional file name
-f[<file>]
Force #include, optional file name.
-nn do not display notes
-nn
Do not display notes.
-nw do not display warnings
-nw
Do not display warnings.
@<file> read additional options from file
@<file>
Read additional options from file.
-v display version of moc
-v
Display version of moc.
=head1 EXIT STATUS
@ -46,24 +58,24 @@ moc returns 0 on success and other on unexcepted failure.
=head1 BUGS
The moc does not expand #include or #define, it simply skips any
preprocessor directives it encounters. This is regrettable, but is normally
not a problem in practice.
The moc does not expand #include or #define, it simply skips any
preprocessor directives it encounters. This is regrettable, but is normally
not a problem in practice.
The moc does not handle all of C++. The main problem is that class
templates cannot have signals or slots. This is an important bug. Here is
an example:
The moc does not handle all of C++. The main problem is that class
templates cannot have signals or slots. This is an important bug. Here is
an example:
class SomeTemplate<int> : public QFrame {
Q_OBJECT
....
signals:
void bugInMocDetected( int );
};
class SomeTemplate<int> : public QFrame {
Q_OBJECT
....
signals:
void bugInMocDetected( int );
};
Less importantly, the following constructs are illegal. All of them have
have alternatives which we think are usually better, so removing these
limitations is not a high priority for us.
Less importantly, the following constructs are illegal. All of them have
have alternatives which we think are usually better, so removing these
limitations is not a high priority for us.
=head2 Multiple inheritance requires QObject to be first.

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "QDBUS 1"
.TH QDBUS 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH QDBUS 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -90,21 +90,21 @@ big picture.
.IX Header "OPTIONS"
.Vb 2
\& \-\-help
\& Display this information and exit.
\& Display this information and exit.
\&
\& \-\-system
\& Connect to the system bus.
\& Connect to the system bus.
\&
\& \-\-address <address>
\& Connect to the given bus.
\& Connect to the given bus.
\&
\& \-\-literal
\& Print replies literally.
\& Print replies literally.
\&
\& servicename the service to connect to (e.g., org.freedesktop.DBus)
\& path the path to the object (e.g., /)
\& method the method to call, with or without the interface
\& args arguments to pass to the call
\& servicename the service to connect to (e.g., org.freedesktop.DBus)
\& path the path to the object (e.g., /)
\& method the method to call, with or without the interface
\& args arguments to pass to the call
.Ve
.PP
With 0 arguments, qdbus will list the services available on the bus.

View file

@ -60,17 +60,17 @@ static void showUsage()
" qdbus [options] [servicename] [path] [method] [args]\n\n"
"Options:\n"
" --help\n"
" Display this information and exit.\n\n"
" Display this information and exit.\n\n"
" --system\n"
" Connect to the system bus.\n\n"
" Connect to the system bus.\n\n"
" --address <address>\n"
" Connect to the given bus.\n\n"
" Connect to the given bus.\n\n"
" --literal\n"
" Print replies literally.\n\n"
" servicename the service to connect to (e.g., org.freedesktop.DBus)\n"
" path the path to the object (e.g., /)\n"
" method the method to call, with or without the interface\n"
" args arguments to pass to the call\n\n"
" Print replies literally.\n\n"
" servicename the service to connect to (e.g., org.freedesktop.DBus)\n"
" path the path to the object (e.g., /)\n"
" method the method to call, with or without the interface\n"
" args arguments to pass to the call\n\n"
"With 0 arguments, qdbus will list the services available on the bus.\n\n"
"With just the servicename, qdbus will list the object paths available on\n"
"the service.\n\n"

View file

@ -15,21 +15,21 @@ big picture.
=head1 OPTIONS
--help
Display this information and exit.
Display this information and exit.
--system
Connect to the system bus.
Connect to the system bus.
--address <address>
Connect to the given bus.
Connect to the given bus.
--literal
Print replies literally.
Print replies literally.
servicename the service to connect to (e.g., org.freedesktop.DBus)
path the path to the object (e.g., /)
method the method to call, with or without the interface
args arguments to pass to the call
servicename the service to connect to (e.g., org.freedesktop.DBus)
path the path to the object (e.g., /)
method the method to call, with or without the interface
args arguments to pass to the call
With 0 arguments, qdbus will list the services available on the bus.

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "QDBUSCPP2XML 1"
.TH QDBUSCPP2XML 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH QDBUSCPP2XML 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -87,14 +87,27 @@ qdbuscpp2xml parses the \*(C+ source or header file containing a QObject-derived
class and produces the D\-Bus Introspection \s-1XML.\s0
.SH "OPTIONS"
.IX Header "OPTIONS"
.Vb 7
\& \-p|\-s|\-m Only parse scriptable Properties, Signals and Methods (slots)
\& \-P|\-S|\-M Parse all Properties, Signals and Methods (slots)
\& \-a Output all scriptable contents (equivalent to \-psm)
\& \-A Output all contents (equivalent to \-PSM)
\& \-o <filename> Write the output to file <filename>
\& \-h Show this information
\& \-V Show the program version and quit.
.Vb 2
\& \-p|\-s|\-m
\& Only parse scriptable Properties, Signals and Methods (slots).
\&
\& \-P|\-S|\-M
\& Parse all Properties, Signals and Methods (slots).
\&
\& \-a
\& Output all scriptable contents (equivalent to \-psm).
\&
\& \-A
\& Output all contents (equivalent to \-PSM).
\&
\& \-o <filename>
\& Write the output to file <filename>.
\&
\& \-h
\& Show this information.
\&
\& \-V
\& Show the program version and quit.
.Ve
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"

View file

@ -75,13 +75,20 @@ static const char help[] =
"produces the D-Bus Introspection XML.\n"
"\n"
"Options:\n"
" -p|-s|-m Only parse scriptable Properties, Signals and Methods (slots)\n"
" -P|-S|-M Parse all Properties, Signals and Methods (slots)\n"
" -a Output all scriptable contents (equivalent to -psm)\n"
" -A Output all contents (equivalent to -PSM)\n"
" -o <filename> Write the output to file <filename>\n"
" -h Show this information\n"
" -V Show the program version and quit.\n"
" -p|-s|-m\n"
" Only parse scriptable Properties, Signals and Methods (slots).\n"
" -P|-S|-M\n"
" Parse all Properties, Signals and Methods (slots).\n"
" -a\n"
" Output all scriptable contents (equivalent to -psm).\n"
" -A\n"
" Output all contents (equivalent to -PSM).\n"
" -o <filename>\n"
" Write the output to file <filename>.\n"
" -h\n"
" Show this information.\n"
" -V\n"
" Show the program version and quit.\n"
"\n";
class MocParser

View file

@ -13,13 +13,26 @@ class and produces the D-Bus Introspection XML.
=head1 OPTIONS
-p|-s|-m Only parse scriptable Properties, Signals and Methods (slots)
-P|-S|-M Parse all Properties, Signals and Methods (slots)
-a Output all scriptable contents (equivalent to -psm)
-A Output all contents (equivalent to -PSM)
-o <filename> Write the output to file <filename>
-h Show this information
-V Show the program version and quit.
-p|-s|-m
Only parse scriptable Properties, Signals and Methods (slots).
-P|-S|-M
Parse all Properties, Signals and Methods (slots).
-a
Output all scriptable contents (equivalent to -psm).
-A
Output all contents (equivalent to -PSM).
-o <filename>
Write the output to file <filename>.
-h
Show this information.
-V
Show the program version and quit.
=head1 EXIT STATUS

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "QDBUSXML2CPP 1"
.TH QDBUSXML2CPP 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH QDBUSXML2CPP 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -87,17 +87,36 @@ qdbusxml2cpp produces the \*(C+ code to implement the interfaces defined in the
input file.
.SH "OPTIONS"
.IX Header "OPTIONS"
.Vb 10
\& \-a <filename> Write the adaptor code to <filename>
\& \-c <classname> Use <classname> as the class name for the generated classes
\& \-h Show this information
\& \-i <filename> Add #include to the output
\& \-l <classname> When generating an adaptor, use <classname> as the parent class
\& \-m Generate #include "filename.moc" statements in the .cpp files
\& \-N Don\*(Aqt use namespaces
\& \-p <filename> Write the proxy code to <filename>
\& \-v Be verbose.
\& \-V Show the program version and quit.
.Vb 2
\& \-a <filename>
\& Write the adaptor code to <filename>.
\&
\& \-c <classname>
\& Use <classname> as the class name for the generated classes.
\&
\& \-h
\& Show this information.
\&
\& \-i <filename>
\& Add #include to the output.
\&
\& \-l <classname>
\& When generating an adaptor, use <classname> as the parent class.
\&
\& \-m
\& Generate #include "filename.moc" statements in the .cpp files.
\&
\& \-N
\& Don\*(Aqt use namespaces.
\&
\& \-p <filename>
\& Write the proxy code to <filename>.
\&
\& \-v
\& Be verbose.
\&
\& \-V
\& Show the program version and quit.
.Ve
.PP
If the file name given to the options \-a and \-p does not end in .cpp or .h, the

View file

@ -80,16 +80,26 @@ static const char help[] =
"Produces the C++ code to implement the interfaces defined in the input file.\n"
"\n"
"Options:\n"
" -a <filename> Write the adaptor code to <filename>\n"
" -c <classname> Use <classname> as the class name for the generated classes\n"
" -h Show this information\n"
" -i <filename> Add #include to the output\n"
" -l <classname> When generating an adaptor, use <classname> as the parent class\n"
" -m Generate #include \"filename.moc\" statements in the .cpp files\n"
" -N Don't use namespaces\n"
" -p <filename> Write the proxy code to <filename>\n"
" -v Be verbose.\n"
" -V Show the program version and quit.\n"
" -a <filename>\n"
" Write the adaptor code to <filename>.\n"
" -c <classname>\n"
" Use <classname> as the class name for the generated classes.\n"
" -h\n"
" Show this information.\n"
" -i <filename>\n"
" Add #include to the output.\n"
" -l <classname>\n"
" When generating an adaptor, use <classname> as the parent class.\n"
" -m\n"
" Generate #include \"filename.moc\" statements in the .cpp files.\n"
" -N\n"
" Don't use namespaces\n"
" -p <filename>\n"
" Write the proxy code to <filename>.\n"
" -v\n"
" Be verbose.\n"
" -V\n"
" Show the program version and quit.\n"
"\n"
"If the file name given to the options -a and -p does not end in .cpp or .h, the\n"
"program will automatically append the suffixes and produce both files.\n"

View file

@ -13,16 +13,35 @@ input file.
=head1 OPTIONS
-a <filename> Write the adaptor code to <filename>
-c <classname> Use <classname> as the class name for the generated classes
-h Show this information
-i <filename> Add #include to the output
-l <classname> When generating an adaptor, use <classname> as the parent class
-m Generate #include "filename.moc" statements in the .cpp files
-N Don't use namespaces
-p <filename> Write the proxy code to <filename>
-v Be verbose.
-V Show the program version and quit.
-a <filename>
Write the adaptor code to <filename>.
-c <classname>
Use <classname> as the class name for the generated classes.
-h
Show this information.
-i <filename>
Add #include to the output.
-l <classname>
When generating an adaptor, use <classname> as the parent class.
-m
Generate #include "filename.moc" statements in the .cpp files.
-N
Don't use namespaces.
-p <filename>
Write the proxy code to <filename>.
-v
Be verbose.
-V
Show the program version and quit.
If the file name given to the options -a and -p does not end in .cpp or .h, the
program will automatically append the suffixes and produce both files.

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "QSCRIPT 1"
.TH QSCRIPT 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH QSCRIPT 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -85,13 +85,13 @@ qscript [script\-file]
.IX Header "OPTIONS"
.Vb 2
\& \-d
\& Attach a debugger
\& Attach a debugger.
\&
\& \-i
\& Run interactive.
\& Run interactive.
\&
\& \-
\& Read from standard\-input.
\& Read from standard\-input.
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"

View file

@ -9,13 +9,13 @@ qscript [script-file]
=head1 OPTIONS
-d
Attach a debugger
Attach a debugger.
-i
Run interactive.
Run interactive.
-
Read from standard-input.
Read from standard-input.
=head1 DESCRIPTION

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "RCC 1"
.TH RCC 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH RCC 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -88,41 +88,40 @@ rcc [options] <resource\-file> [<resource\-file>] ...
.IX Header "OPTIONS"
.Vb 2
\& \-o <file>
\& Write output to file rather than stdout.
\& Write output to file rather than stdout.
\&
\& \-name <name>
\& Create an external initialization function with name.
\& Create an external initialization function with name.
\&
\& \-threshold <level>
\& Threshold to consider compressing files.
\& Threshold to consider compressing files.
\&
\& \-compress <level>
\& Compress input files by level.
\& Compress input files by level.
\&
\& \-root <path>
\& Prefix resource access path with root path.
\& Prefix resource access path with root path.
\&
\& \-no\-compress
\& Disable all compression.
\& Disable all compression.
\&
\& \-binary
\& Output a binary file for use as a dynamic resource.
\& Output a binary file for use as a dynamic resource.
\&
\& \-namespace
\& Turn off namespace macros.
\& Turn off namespace macros.
\&
\& \-project
\& Output a resource file containing all files from the
\& current directory.
\& Output a resource file containing all files from the current directory.
\&
\& \-list
\& Lists .qrc file entries.
\& Lists .qrc file entries.
\&
\& \-version
\& Display version.
\& Display version.
\&
\& \-help
\& Display this information.
\& Display this information.
.Ve
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"

View file

@ -13,41 +13,40 @@ TODO
=head1 OPTIONS
-o <file>
Write output to file rather than stdout.
Write output to file rather than stdout.
-name <name>
Create an external initialization function with name.
Create an external initialization function with name.
-threshold <level>
Threshold to consider compressing files.
Threshold to consider compressing files.
-compress <level>
Compress input files by level.
Compress input files by level.
-root <path>
Prefix resource access path with root path.
Prefix resource access path with root path.
-no-compress
Disable all compression.
Disable all compression.
-binary
Output a binary file for use as a dynamic resource.
Output a binary file for use as a dynamic resource.
-namespace
Turn off namespace macros.
Turn off namespace macros.
-project
Output a resource file containing all files from the
current directory.
Output a resource file containing all files from the current directory.
-list
Lists .qrc file entries.
Lists .qrc file entries.
-version
Display version.
Display version.
-help
Display this information.
Display this information.
=head1 EXIT STATUS

View file

@ -49,30 +49,30 @@ void showHelp( const QString &error)
" rcc [options] <resource-file> [<resource-file>] ...\n\n"
"Options:\n"
" -o <file>\n"
" Write output to file rather than stdout.\n\n"
" Write output to file rather than stdout.\n\n"
" -name <name>\n"
" Create an external initialization function with name.\n\n"
" Create an external initialization function with name.\n\n"
" -threshold <level>\n"
" Threshold to consider compressing files.\n\n"
" Threshold to consider compressing files.\n\n"
" -compress <level>\n"
" Compress input files by level.\n\n"
" Compress input files by level.\n\n"
" -root <path>\n"
" Prefix resource access path with root path.\n\n"
" Prefix resource access path with root path.\n\n"
" -no-compress\n"
" Disable all compression.\n\n"
" Disable all compression.\n\n"
" -binary\n"
" Output a binary file for use as a dynamic resource.\n\n"
" Output a binary file for use as a dynamic resource.\n\n"
" -namespace\n"
" Turn off namespace macros.\n\n"
" Turn off namespace macros.\n\n"
" -project\n"
" Output a resource file containing all files from the\n"
" current directory.\n\n"
" Output a resource file containing all files from the\n"
" current directory.\n\n"
" -list\n"
" Lists .qrc file entries.\n\n"
" Lists .qrc file entries.\n\n"
" -version\n"
" Display version.\n\n"
" Display version.\n\n"
" -help\n"
" Display this information.\n");
" Display this information.\n");
}
void dumpRecursive(const QDir &dir, QTextStream &out)

View file

@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "UIC 1"
.TH UIC 1 "2021-01-01" "Katie 4.9.2" "Katie Manual"
.TH UIC 1 "2021-01-25" "Katie 4.9.2" "Katie Manual"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -91,29 +91,29 @@ generates an image file that embeds raw image data in \*(C+ source code.
.Vb 3
\& \-h
\& \-help
\& Display this help and exit.
\& Display this help and exit.
\&
\& \-v
\& \-version
\& Display version.
\& Display version.
\&
\& \-d
\& \-dependencies
\& Display the dependencies.
\& Display the dependencies.
\&
\& \-o <file>
\& Place the output into <file>.
\& Place the output into <file>.
\&
\& \-tr <func>
\& Use func() for i18n.
\& Use func() for i18n.
\&
\& \-p
\& \-no\-protection
\& Disable header protection.
\& Disable header protection.
\&
\& \-n
\& \-no\-implicit\-includes
\& Disable generation of #include\-directives.
\& Disable generation of #include\-directives.
.Ve
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"

View file

@ -16,29 +16,29 @@ generates an image file that embeds raw image data in C++ source code.
-h
-help
Display this help and exit.
Display this help and exit.
-v
-version
Display version.
Display version.
-d
-dependencies
Display the dependencies.
Display the dependencies.
-o <file>
Place the output into <file>.
Place the output into <file>.
-tr <func>
Use func() for i18n.
Use func() for i18n.
-p
-no-protection
Disable header protection.
Disable header protection.
-n
-no-implicit-includes
Disable generation of #include-directives.
Disable generation of #include-directives.
=head1 EXIT STATUS

View file

@ -53,23 +53,23 @@ void showHelp()
"Options:\n"
" -h\n"
" -help\n"
" Display this help and exit.\n\n"
" Display this help and exit.\n\n"
" -v\n"
" -version\n"
" Display version.\n\n"
" Display version.\n\n"
" -d\n"
" -dependencies\n"
" Display the dependencies.\n\n"
" Display the dependencies.\n\n"
" -o <file>\n"
" Place the output into <file>.\n\n"
" Place the output into <file>.\n\n"
" -tr <func>\n"
" Use func() for i18n.\n\n"
" Use func() for i18n.\n\n"
" -p\n"
" -no-protection\n"
" Disable header protection.\n\n"
" Disable header protection.\n\n"
" -n\n"
" -no-implicit-includes\n"
" Disable generation of #include-directives.\n");
" Disable generation of #include-directives.\n");
}
int runUic(int argc, char *argv[])