summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove usages of deprecated APIs of corelibSona Kurazyan2019-07-051-0/+2
| | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated APIs of corelib by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, added tests for the replacement. Task-number: QTBUG-76491 Task-number: QTBUG-76539 Task-number: QTBUG-76541 Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QCommandLineParser: Ensure that an option text ends with a newlineAlexander Akulich2018-09-281-0/+1
| | | | | | | | | | | | | | Before this change we inserted newline only if an option has a description and ended up with an arbitrary long line with all options. [ChangeLog][QtCore][QCommandLineParser] Fixed a bug that caused the help output to show two options or more in the same line if the options didn't have a description. Task-number: QTBUG-70174 Change-Id: Id54b9ae13ee596869e4dc14e09301aea19eed2f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QCommandLineOption::Flags containing HiddenFromHelp and ShortOptionStyleOlivier Goffart2016-03-231-1/+5
| | | | | | | | | | | | This patch adds a new option, QCommandLineOption::ShortOptionStyle, which helps applications (such as compilers, so moc and now qdoc) which need to mix long-style and short flags. [ChangeLog][QtCore][QCommandLineOption] Added flags() and setFlags() methods. Added ShortOptionStyle and HiddenFromHelp flags. Change-Id: I944ce56aff2b28ecd6bb9d2d23c4e726e9d06647 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Updated license headersJani Heikkinen2016-01-211-16/+11
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QCommandLineParser: add support for hiding options from --help.David Faure2015-02-231-0/+6
| | | | | | | | | [ChangeLog][QtCore][QCommandLineParser] Added support for hiding options from the --help output, with QCommandLineOption::setHidden(true). Task-number: QTBUG-44298 Change-Id: I62cc2a55428365c0bcc79d2e47c72c0c92104e74 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QCommandLineParser: add word-wrapping algorithmDavid Faure2013-11-171-1/+10
| | | | | | | | Rather than breaking at column 79 precisely, break entire words, to improve readability. Change-Id: Ie30db00f0e6ed95cce87480c3b91804826c6076b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix escape handling in qWinCmdArgsDavid Faure2013-09-101-0/+8
| | | | | | | | | | | | | | | | | | | | | -DKEY="VALUE" was correctly turned into -DKEY=VALUE, but -DKEY=\"VALUE\" was turned into -DKEY=\VALUE" due to the erroneous check ('quote' is still 0 when encountering the first '\' character). This fixes QCoreApplication::arguments() as used by moc.exe after porting to QCommandLineParser. Further investigation shows that double-quotes and single-quotes are handled differently. The tests now ensure that this parser respects what Windows sends in argv, and in particular that QTBUG-15379 doesn't regress, as well as fixing QTBUG-30628. Task-number: QTBUG-15379, QTBUG-30628 Change-Id: I95062c9a6022632b321b2f6fae3089f07be7b5c6 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long live QCommandLineParser!David Faure2013-08-241-0/+93
The QCommandLineParser class provides a means for handling the command line options. QCoreApplication provides the command-line arguments as a simple list of strings. QCommandLineParser provides the ability to define a set of options, parse the command-line arguments, and store which options have actually been used, as well as option values. Done-with: Laszlo Papp <lpapp@kde.org> Change-Id: Ic7bebc10b3f8d8dd06ad0f4bb897c51d566e3b7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>