Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16946

[Regression] Automatic overwrite of closing parenthesis fails when nested

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 4.1.0, Qt Creator 4.3.0
    • Editors
    • Windows 7 64bit

      I found at least one edge case where the automatic overwrite of a closing parenthesis fails. Basically, when autocomplete adds closing punctuation and the nested punctuation is skipped, the outside punctuation "forgets" that it was added.

      Here's what I mean...

      When typing this (| = current cursor location)...
      qCritical("%s: Text here.|")

      If I type the closing double-quote and then type the closing parenthesis, everything works as expected. If, however, I skip the closing double-quote (using the right arrow, for example) and then type the closing parenthesis, the existing closing parenthesis that was automatically added doesn't get overwritten and I end up with this:

      qCritical("%s: Text here.")|)

      The net result is that Qt Creator occasionally, erroneously, and unexpectedly adds an extra parenthesis at the end, introducing a typo that's sometimes hard to track down. This was not a problem with previous versions of Qt Creator.

      See attachment for my text editor environment settings.

        For Gerrit Dashboard: QTCREATORBUG-16946
        # Subject Branch Project Status CR V

            davschul David Schulz
            phlucious Evon Silvia
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: