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

Object is highlighted when caret placed after comment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4: Low P4: Low
    • Qt Creator 13.0.0
    • Qt Creator 2.3.0-beta, Qt Creator 2.6.0, Qt Creator 3.6.0-beta1
    • Editors
    • None

      Consider the following code:

      enum MyEnum
      {
      	val1,
      	val2 // comment
      };
      
      class MyClass
      {
      public:
      	void doSomething(MyEnum) {}
      };
      
      int main()
      {
      	MyClass myclass // comment
      			;
      	myclass.doSomething(val2);
      	return 0;
      }

      Place the caret on any of the comments, the object/value that appears last in the line is highlighted (see screenshot).

      This only happens when there is no separator (',', ';') between the symbol and the comment.

        1. highlight.png
          8 kB
          Orgad Shaneh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            davschul David Schulz
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes