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

QLineEdit and QTextEdit do no append pastes to the undo stack

    XMLWordPrintable

Details

    • 1e36e3917cae1e6b55cce46dc7e0e8a0b336cd01

    Description

      When using a QLineEdit or QTextEdit, doing a paste operation does not append the change to the undo stack. This is not standard behavior as each pastes are appended to an undo stack separately on Windows, Mac or GTK applications.

      How to reproduce:
      1) Compile and run simple application

      #include <QApplication>
      #include <QLineEdit>

      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);
      QLineEdit mainWin(NULL);
      mainWin.show();
      return app.exec();
      }

      2) Enter 1,2,3 into line edit
      3) Select '123' and press 'copy' from popup menu (or press Ctrl+C).
      3) Press Ctrl+V to paste from clipboard (don't use Paste from popup menu!)
      4) Press Ctrl+V to paste from clipboard (don't use Paste from popup menu!). After this step line edit should contain '123123123' text
      5) Press Ctrl+Z . Line edit should contain '123123', but contain '123'

      Attachments

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

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes