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

"Add Local Declaration" quickfix does not work correctly with class templates

    XMLWordPrintable

    Details

    • Commits:
      5d8f13bfd4 (qt-creator/qt-creator/8.0) 5d8f13bfd4 (qt-creator/qt-creator/master)

      Description

      Consider this snippet:

      QStringList list;
      it = list.cbegin();

      If you place the cursor just after "it" and hit Alt+Return and select "Add Local Declaration", the code becomes

      QStringList list;
      QList::const_iterator it = list.cbegin(); 

      That's wrong. It should be

       QList<QString>::const_iterator it = list.cbegin(); 

        Attachments

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

          Activity

            People

            Assignee:
            artem.sokolovskii Artem Sokolovskii
            Reporter:
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes