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

Split Operators into two style categories

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • C/C++/Obj-C++ Support
    • None

    Description

      Background:
      Qt Creator gives all C++ operator and punctuator tokens the same color. See cpphighlighter.cpp’s call to tk.isOperator().

      User story:
      Having logical operators in a bright color makes long if-expressions a bit easier to read (as long as that bright color isn't used elsewhere because then the color looses its "bright" highlighting effect).

      Many other editors, for instance Sublime, does not highlight () {} [] ; , as operators even tough they are C++ operator tokens in the strict sense.

      Solution:
      Divide the C++ operator tokens into (two?) subcategories:

      Arithmetic or logical operators: + - * / & | ++ – < > <= >= == && || ? etc
      Enclosing or separating tokens: () {} <> [] ; , : :: . -> etc

      Notes:
      < > can both be used for comparisons and for templates so we will find them in both categories. Being able to color them differently allows users to "see" their semantics faster.

      Attachments

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

        Activity

          People

            hugoh Hugo Holgersson
            hugoh Hugo Holgersson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes