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

Please add a QUndoStack::endMacro(QString) overload

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P2: Important
    • Some future release
    • 4.3.2
    • Other
    • None

    Description

      Currently it is not possible to change the text of a macro once beginMacro() has been called. This makes it impossible to do something like this: (where it would be a very expensive operation to find out the cnt before the actuall computation within the loop)

      ...
      stack->beginMacro();

      int cnt = 0;
      foreach(item, item_list)

      { if (<no_change>) continue; ...; cnt++; }

      stack->endMacro(QString("Modified %1 items").arg(cnt));
      ...

      So either (1) an additonal function endMacro(QString) or (2) a return value (QUndoCommand *) for beginMacro() would be nice.
      #2 is probably not BC. Patch for #1 is attached.

      Attachments

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

        Activity

          People

            bdo Jo Asplin (Inactive)
            ebaak Ed Baak (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes