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

Incorrect code completion after pressing return on an 'if() {'

    XMLWordPrintable

Details

    Description

      How to reproduce

      • Open creator, qmljseditor.cpp
      • Paste snippet at the beginning of the file:
        void f(bool a, bool b) {
            if (a
                && b) {
                return;
            }
        }
        
      • Place cursor after opening bracket
      • Press OK
      • Result:
        void f(bool a, bool b) {
            if (a
                && b) {
                
            }
                return;
            }
        }
        
      • Expected:
        void f(bool a, bool b) {
            if (a
                && b) {
                
                return;
            }
        }
        

      Note that this isn't always reproducable for random files, for whatever reason.

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes