summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcommandlineparser.cpp
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-10-02 16:51:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-08 00:46:27 +0200
commit4533cc994484a2308297e64e99af005fb4dca065 (patch)
treebc66283d11cdad100a1aec03f4e1d86bedc9a79e /src/corelib/tools/qcommandlineparser.cpp
parent50dd0232b61d8ea3fb9aab18972c6e19678656e6 (diff)
Doc: Adding mark-up to boolean default values.
Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/corelib/tools/qcommandlineparser.cpp')
-rw-r--r--src/corelib/tools/qcommandlineparser.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/tools/qcommandlineparser.cpp b/src/corelib/tools/qcommandlineparser.cpp
index e2e410c059..8054542333 100644
--- a/src/corelib/tools/qcommandlineparser.cpp
+++ b/src/corelib/tools/qcommandlineparser.cpp
@@ -242,7 +242,7 @@ void QCommandLineParser::setSingleDashWordOptionMode(QCommandLineParser::SingleD
/*!
Adds the option \a option to look for while parsing.
- Returns true if adding the option was successful; otherwise returns false.
+ Returns \c true if adding the option was successful; otherwise returns \c false.
Adding the option fails if there is no name attached to the option, or
the option has a name that clashes with an option name added before.
@@ -370,7 +370,7 @@ void QCommandLineParser::clearPositionalArguments()
Most programs don't need to call this, a simple call to process() is enough.
parse() is more low-level, and only does the parsing. The application will have to
- take care of the error handling, using errorText() if parse() returns false.
+ take care of the error handling, using errorText() if parse() returns \c false.
This can be useful for instance to show a graphical error message in graphical programs.
Calling parse() instead of process() can also be useful in order to ignore unknown
@@ -379,7 +379,7 @@ void QCommandLineParser::clearPositionalArguments()
Don't forget that \a arguments must start with the name of the executable (ignored, though).
- Returns false in case of a parse error (unknown option or missing value); returns true otherwise.
+ Returns \c false in case of a parse error (unknown option or missing value); returns \c true otherwise.
\sa process()
*/
@@ -390,7 +390,7 @@ bool QCommandLineParser::parse(const QStringList &arguments)
/*!
Returns a translated error text for the user.
- This should only be called when parse() returns false.
+ This should only be called when parse() returns \c false.
*/
QString QCommandLineParser::errorText() const
{
@@ -453,7 +453,7 @@ void QCommandLineParserPrivate::checkParsed(const char *method)
/*!
\internal
Looks up the option \a optionName (found on the command line) and register it as found.
- Returns true on success.
+ Returns \c true on success.
*/
bool QCommandLineParserPrivate::registerFoundOption(const QString &optionName)
{
@@ -476,7 +476,7 @@ bool QCommandLineParserPrivate::registerFoundOption(const QString &optionName)
\param argument the argument from the command line currently parsed. Only used for -k=value parsing.
\param argumentIterator iterator to the currently parsed argument. Incremented if the next argument contains the value.
\param argsEnd args.end(), to check if ++argumentIterator goes out of bounds
- Returns true on success.
+ Returns \c true on success.
*/
bool QCommandLineParserPrivate::parseOptionValue(const QString &optionName, const QString &argument,
QStringList::const_iterator *argumentIterator, QStringList::const_iterator argsEnd)
@@ -620,7 +620,7 @@ bool QCommandLineParserPrivate::parse(const QStringList &args)
/*!
Checks whether the option \a name was passed to the application.
- Returns true if the option \a name was set, false otherwise.
+ Returns \c true if the option \a name was set, false otherwise.
The name provided can be any long or short name of any option that was
added with \c addOption(). All the options names are treated as being
@@ -711,7 +711,7 @@ QStringList QCommandLineParser::values(const QString &optionName) const
\overload
Checks whether the \a option was passed to the application.
- Returns true if the \a option was set, false otherwise.
+ Returns \c true if the \a option was set, false otherwise.
This is the recommended way to check for options with no values.