Qt Creator 14: C++ Code Model Update
Qt Creator 14:C++代码模型更新
July 29, 2024 by Christian Kandeler | Comments
2024年7月29日 克里斯蒂安·坎德勒发表|评论
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.
在本文中,我们将看看自上次更新以来Qt Creator的C/C++支持的一些更有趣的改进。
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.
- 另一个新的quickfix根据声明顺序重新排序成员函数实现。
- 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.
- “添加卷曲花括号”快速修复得到了极大的改进。它现在处理所有适用的控制语句,并考虑整个if-else链,而不仅仅是单个if语句。
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.
- 类型层次结构功能现在由clangd支持。
- As announced in our previous update, we have bumped the minimum clangd version to 17.
- 正如我们在之前的更新中宣布的那样,我们已经将最低cland版本提升到了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.
- 自上次更新以来,修复了大约50个错误。