Qt Creator在代码编辑期间100%CPU [英] Qt Creator 100% CPU during code edit
问题描述
我有Qt Creator项目。它使用 boost
和 Point Cloud库
。当我编辑包含来自这些库的包含的文件时,Qt Creator会在每个代码激活后大约30秒挂起(添加行,更改变量类型等)。 TaskManager在我的双核处理器上显示100%的CPU。
I have Qt Creator project. It uses boost
and Point Cloud library
. When I edit file that contains includes from these libraries, Qt Creator hangs about 30 seconds after each code channge (line added, variable type changed etc.). TaskManager shows 100% CPU on my two-core procesor.
请注意:它不是在解析或索引时,即没有绿色进度条。
Please note: it is not during parsing or indexing, i.e. no green progress bar appears.
Qt Creator是2.8.0。
Qt Creator is 2.8.0.
推荐答案
我发现的唯一方法是禁用boost和Eigen头解析。要做的事情
the only way I found is to disable boost and Eigen header parsing. To do it
- 从
的
部分
中排除它们.pro
file -
添加以下行:
- Exclude them from
HEADERS
section of.pro
file Add these lines:
QMAKE_CXXFLAGS + = / I .. / 3rdparty / eigen / I ../3rdparty/boost / DCOMPILE_TIME
QMAKE_CXXFLAGS += /I ../3rdparty/eigen /I ../3rdparty/boost /DCOMPILE_TIME
现在QtCreator将显示未知文件
警告,但编译就可以了。
Now QtCreator will show you Unknow file
warning, but compilation will be OK.
祝你好运,
Ilya
Best regards, Ilya
这篇关于Qt Creator在代码编辑期间100%CPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!