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

Operator name not included in document highlights

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 16.0.0
    • C/C++/Obj-C++ Support
    • None
    • Kubuntu 24.04
    • Linux/X11

    Description

      In the following code:

      class test
      {
      public:
          static void* operator new(std::size_t);
          static void operator delete(void*);
      };
      

      When you click on `new` or `delete` to place the cursor there, QtCreator highlights the `operator` keyword but not the operator name (i.e. not `new` or `delete`). This is also goes for other operators as well.

      I think, it would be more useful if QtCreator highlighted the operator name as well as the `operator` keyword since the operator name is what is significant to the user, not the `operator` keyword by itself.

      I realize, this may be problematic if the operator definitions spans on multiple lines, e.g.:

      static void* operator
      new
      [](std::size_t);
      

      I guess, in this case it would make sense to highlight each line separately. I.e. separately highlight `operator`, `new` and `[]` words on each line. But the most common case, when the `operator` keyword and the entire name are on the same line, should still look as a single continuous highlight.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            lastique Andrey Semashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes