summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qpushbutton.cpp
diff options
context:
space:
mode:
authorAddison Elliott <addison.elliott@gmail.com>2016-12-02 12:17:07 -0600
committerAddison Elliott <addison.elliott@gmail.com>2017-01-02 13:31:25 +0000
commit00ad7bd5a492ff5bce306c53024714670e59039e (patch)
treeda6451c9ea3d6743039edb4f948f01bdc90860fb /src/widgets/widgets/qpushbutton.cpp
parentafda26ce5d0534d85219a2fe858aa0e05037cf09 (diff)
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>
Diffstat (limited to 'src/widgets/widgets/qpushbutton.cpp')
0 files changed, 0 insertions, 0 deletions