Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67633

QUndoStack does not execute obsolete undo command despite what the docs say

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.4
    • None

    Description

      The docs for QUndoStack::undo says:

       After the command is undone, if QUundoCommand::isObsolete() returns true, then the command will be deleted from the stack.

      But that doesn't line up with the source code:

      if (!cmd->isObsolete())

          cmd->undo()

      which means that the command is not undone at all if it's obsolete.

       

      It's useful to be able to undo and delete a command in one step. One example use case for this is when you're creating a macro and something goes wrong in the middle.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            joey.tran Joey Tran
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes