Qt Creator 14: C++ Code Model Update

In this article, we will take a look at some of the more interesting improvements to Qt Creator's C/C++ support since our last update.

Quickfixes

  • We have added a new quickfix that moves a class into a dedicated set of files: A new header and/or source file  are created, the project file is updated accordingly, and the class is moved over, along with all its out-of-line member definitions. You can see it in action below. 
  • Another new quickfix re-orders member function implementations according to declaration order.
  • The "Add Curly Braces" quickfix was greatly improved. It now handles all applicable control statements and considers entire if-else chains rather than just single if-statements.

extract-class-cropped

Customization

  • The names of header guards are now user-configurable.
  • The code model settings are now available per project.

Clangd

  • The type hierarchy feature is now backed by clangd.
  • As announced  in our previous update, we have bumped the minimum clangd version to 17.

Other

  • For quite some time, we have had functionality that updated corresponding include directives when a header file was renamed. We extended this mechanism to also update includes when a file was just moved. Both included and including files are considered. The video below demonstrates the feature.
  • Around 50 bugs were fixed since the previous update.

move-file

 


Blog Topics:

Comments