qt6-bb10/tests/auto/corelib/tools/qcommandlineparser
Marc Mutz 03affacaa3 QCommandLineParser: pluck some low-hanging fruit re: exception safety
Make
  QCommandLineParser::add{Help,Version}Option()
  QCommandLineOption::setDefaultValue()
  QCommandLineOptionPrivate::setNames()
have transaction semantics: either they succeed, or they change nothing.
It's trivial to provide this guarantee, so do it.

Add a test for the surprising property that setDefaultValue("") resets
defaultValues() to an empty QStringList instead of one that contains
the empty string.

Change-Id: I61623019de3c7d2e52c24f42cc2e23ec5fddc4da
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-06 08:44:31 +01:00
..
testhelper QCommandLineParser: add word-wrapping algorithm 2013-11-17 00:45:03 +01:00
qcommandlineparser.pro Long live QCommandLineParser! 2013-08-24 21:33:39 +02:00
tst_qcommandlineparser.cpp QCommandLineParser: pluck some low-hanging fruit re: exception safety 2013-12-06 08:44:31 +01:00
tst_qcommandlineparser.pro Long live QCommandLineParser! 2013-08-24 21:33:39 +02:00