Qt Creator 4.15: What's new in C++ support?

As announced earlier, we have released Qt Creator 4.15 this week. Let us now take a closer look at some of the improvements to our C++ support that this version brings.

Search result filtering

Since Qt Creator 4.14, the results of the "Find References to Symbol" action are colored differently depending on whether the respective reference is a read or a write access, or something else. Now it is also possible to filter the results according to the access type.


Syntax Highlighting

  • Raw string literals are now properly highlighted even when they contain quotes and newlines.
  • Similar to what was already done for parentheses and square brackets, we now also animate the angle brackets of template declarations and instantiations, as well as the matching "?" and ":" parts of ternary operators.



  • There is now a settings widget for fine-tuning the behavior of various quickfixes. Among the things that can be configured (both globally and per-project) are the default names of getters and setters, whether function bodies should be inline or not, how to deal with namespaces, and many more. Thanks to Leander Schulten for this contribution.quickfix-settings-1
  • There now is a quickfix for generating a constructor, also contributed by Leander Schulten. 
  • Class-level quickfixes, such as the one mentioned above, have become more visible, as they can now be invoked with the cursor almost anywhere within the class definition, rather than just on the class name. Similarly, the "Complete Switch Statement" quickfix no longer requires the cursor to be on the switch keyword.

Other improvements

  • Symbol search via the locator now considers type aliases defined via typedef or using.
  • About 50 bugs were fixed.

What's next?

As you might know, we employ libclang for document-level features such as highlighting and completion, while the global view of a project is still provided by our trusty old built-in code model. We are currently experimenting with using clangd for this job. With a Qt Creator built from our master branch, you can already enable clangd support in the C++ code model settings, which currently means that the results of "Find References" will be provided via clangd. This functionality is still quite rough around the edges, but if you have problems with global symbol search in your projects, it might already be worth checking out.

Blog Topics: