Qt Creator 4.14: What's new in C++ support?
December 18, 2020 by Christian Kandeler | Comments
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.
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.
New Quickfixes
- It is now possible to create implementations for all member function declarations of a specific class in one go.
- Similarly, you can now create getters and/or setters for all class members at once.
- 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.
- Missing class members can now be created on demand from a point of use. This is currently limited to initializations inside a constructor.
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.
- 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).
- 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
Subscribe to our newsletter
Subscribe Newsletter
Try Qt 6.9 Now!
Download the latest release here: www.qt.io/download.
Qt 6.9 is now available, with new features and improvements for application developers and device creators.
We're Hiring
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Commenting for this post has ended.
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.
Wht is QML Designer constantly crashing in this version?
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?
Looks great! A question: it seems that beginning with 4.14 you stopped providing 32-bit builds of Qt Creator. Is it correct?
Yes, that is correct.
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.
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
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.
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.