qt5base-lts/tests/auto/widgets/util
Addison Elliott 00ad7bd5a4 Added isObsolete and setObsolete functions in QUndoStack
Added isObsolete and setObsolete functions to QUndoCommand that signifies
a command is not functional. This is useful for when two commands are
merged in such a way that the merged command does nothing. Another
particular use is with networking commands in which the command fails
due to connection issues. The command is considered obsolete because the
undo/redo functions do nothing since the connection failed.

This property is checked in QUndoStack::push(), QUndoStack::undo(),
QUndoStack::redo(), and QUndoStack::setIndex(). The obsolete flag is
checked after QUndoCommand::undo(), QUndoCommand::redo(), and
QUndoCommand::mergeWith() is called where applicable. This allows the
user to set the obsolete flag within the QUndoCommand class and it will
be deleted directly afterwards.

Task-number: QTBUG-54970
Change-Id: Ia8e962ff3aa16515e8f9e2180aee5e1d726d5ba3
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-02 13:31:25 +00:00
..
qcompleter Update Widgets/Util Tests to Qt5 Connection Syntax 2016-12-22 15:00:23 +00:00
qscroller autotests: use QTest::createTouchDevice() 2016-06-10 13:07:17 +00:00
qsystemtrayicon Update Widgets/Util Tests to Qt5 Connection Syntax 2016-12-22 15:00:23 +00:00
qundogroup Update Widgets/Util Tests to Qt5 Connection Syntax 2016-12-22 15:00:23 +00:00
qundostack Added isObsolete and setObsolete functions in QUndoStack 2017-01-02 13:31:25 +00:00
util.pro