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

As announced earlier, we have released Qt Creator 4.14 this week. While a full change log is available, I think it's worthwhile to take a closer look specifically at some of the improvements to our C++ support.

Color-coded search results

When collecting usages of a variable via the "Find References to Symbol" action, one is often interested in the type of usage, for instance whether the variable is read or written. This information is now much easier to spot at first glance, because we analyze the context of each usage and use different colors in the search result window  depending on the type of access. As usual, the colors can be customized in the text editor settings.

usages

Automatic invocation of clang tools

Qt Creator 4.14 brings back the possibility to let the clang-tidy and clazy tools run automatically on the current document. This feature had already been present in earlier versions, but caused unwanted side effects and therefore got removed at some point. It is now back with an improved back-end that does not slow down the code model anymore. Of course, it is still possible to explicitly invoke the analyzers for the whole project (or selected parts thereof) via the "Debug" pane.

clazy

New Quickfixes

  • It is now possible to create implementations for all member function declarations of a specific class in one go.imp-from-decl
  • Similarly, you can now create getters and/or setters for all class members at once.getters-setters
  • In some coding conventions, using-directives are frowned upon. These can now be removed (while keeping the code valid, of course). Thanks to Leander Schulten for this contribution.remove-using
  • Missing class members can now be created on demand from a point of use. This is currently limited to initializations inside a constructor.member-from-init

Other improvements

  • We now detect if a completion request happens at the second argument of a connect() call and in that case offer only signals, as nothing else can legally appear there.connect
  • The "New C++ Class" wizard now has knowledge about the code model and can provide completion for namespaces and class names (when choosing a base class).new-class-wizard
  • When renaming a header file via the project tree, its include guards are automatically adapted (thanks to Miklós Márton for this contribution).
  • In addition to new features such as the ones mentioned above, we also fixed about 50 bugs in areas such as highlighting, completion and refactoring.
  • The official release now ships clang 11, which should result in improvements particularly with modern code bases.

Conclusion

Qt Creator 4.14 comes with noticeably better C++ support, due to a number of useful new features and fewer bugs. Upgrade now for  an improved developer experience. 


Blog Topics:

Comments

Commenting for this post has ended.

Tom Deblauwe
1 point
52 months ago

Fantastic releases again, keep up the good work!

I hope that the focus for the next versions would be a good fast test-driven development flow. Now it is possible, but it's a hassle to select and run individual unittests.

M
Marko Frelih
1 point
52 months ago

Wht is QML Designer constantly crashing in this version?

Ernst Maurer
1 point
51 months ago

some time ago, qt creator was my favorite IDE, but I'm serverside developer and it often requires to develop/debug remotely , other top IDES like VS, VSCode, CLion supports remote development , unfortunately qt creator does not. Is there any plans in this direction?

Artem Razin
0 points
52 months ago

Looks great! A question: it seems that beginning with 4.14 you stopped providing 32-bit builds of Qt Creator. Is it correct?

E
Eike Ziller
0 points
52 months ago

Yes, that is correct.

Flavio Tordini
0 points
52 months ago

The new getter/setter quick-fix is great. What about integrating Q_PROPERTY in it?

A quick-fix for constructors would be useful as well.

L
Leander
2 points
52 months ago

It was already done here, but it missed the QtC 4.14 release by a few days. But if you want to use the feature now you can download a build of the master branch here.

I also thought about a quickfix to generate a constructor. Maybe I will get bored in the days after Christmas and start implementing that :D

Alan Garny
0 points
52 months ago

Not sure where to post this, so here goes: always nice to see improvements to Qt Creator, so thanks a lot for that. However, I can see that the new maintenance tool has also been updated and... I know that green is Qt's colour, but that bright green writing is difficult to read and "hurts" my eyes.

Violet Giraffe
0 points
51 months ago

All of these are very nice improvements, and most of these are really awesome, thank you! I don't remember such a feature-rich update of Qt creator ever before.