From f0685992a3412b059a0952ac591f40856ffffb6f Mon Sep 17 00:00:00 2001 From: Konstantin Shegunov Date: Sun, 24 Jul 2016 22:14:49 +0300 Subject: Docs changed to reflect that valueName is required with value parsing When the option expects a value the valueName parameter of the constructor isn't optional; it must be set. This requirement is made explicit in the documentation. Task-number: QTBUG-54855 Change-Id: I190884aff2fa8e96bc5c5e82cdfed85be761d6e3 Reviewed-by: Thiago Macieira Reviewed-by: David Faure --- src/corelib/tools/qcommandlineoption.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qcommandlineoption.cpp') diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp index 8c0ba8cb2b..93d20577c3 100644 --- a/src/corelib/tools/qcommandlineoption.cpp +++ b/src/corelib/tools/qcommandlineoption.cpp @@ -144,7 +144,7 @@ QCommandLineOption::QCommandLineOption(const QStringList &names) The description is set to \a description. It is customary to add a "." at the end of the description. - In addition, the \a valueName can be set if the option expects a value. + In addition, the \a valueName needs to be set if the option expects a value. The default value for the option is set to \a defaultValue. In Qt versions before 5.4, this constructor was \c explicit. In Qt 5.4 @@ -180,7 +180,7 @@ QCommandLineOption::QCommandLineOption(const QString &name, const QString &descr The description is set to \a description. It is customary to add a "." at the end of the description. - In addition, the \a valueName can be set if the option expects a value. + In addition, the \a valueName needs to be set if the option expects a value. The default value for the option is set to \a defaultValue. In Qt versions before 5.4, this constructor was \c explicit. In Qt 5.4 -- cgit v1.2.3