Qt Creator Clang Code Model problems collection
-
@aha_1980
ohho, where to start ?Let me list the 2 major ones, why I turned the plugin of by default on my working pc.
- speed
- Classes with large line count ( could thousand < 15000 in my case ) Slow down horribly. Auto complete, ctrl-left-click etc can take up about 30 secs to happen. -> Meanwhile Clang backend process takes up 1 core to 100% load (noticed on a 2016 iMac) - Completely disappears with a deactivation of the plugin
- Auto complete is worse with the new code model
- Especially noticeable during
QObject::connect
writing. In the old model, writing a&
would call forth the auto complete of the correct class name - connect(this, &...) - where as with the new model all included classes are listed - The new code model also does not differentiate between signals and slot during the auto complete, and simply lists everything
-
Speed and blocked cores are certainly a problem.
Therefore, it would be handy to have a fast switch for the code model. Basically a definable key stroke for de- and activation would be great. If there a time limit for either settings would be wonderful.
Or is the key stroke already possible with some macro? -
I've already created QTCREATORBUG-21407 for that, so please comment and vote there.
For me, that would really be helpful as I have some projects that definitely not work with Clang.
My other observation is, that Clang overall works better and faster on Linux than in Windows. However, with every Creator update some of my projects break in one or another use case and it's no fun finding the reason for that again and again.
-
One more for the list, turning clang code model off helped here as well
https://forum.qt.io/topic/100408/qt-creator-strange-behaviour-how-to-fix-it/10
-
I had the same problem as this one:
And I solved it by turning clang code model off.
-
I had issue with autocompetion of inherited function parameters here:
https://forum.qt.io/topic/101748/autocompletion-doesn-t-suggest-function-parameters-inherited-from-parent-classAnd it is solved by turning off clang code model.
-
Hi @Maxxii,
thanks for adding your problem here. I think your specific problem can be turned in a report at bugreports.qt.io - as we already have a reproducible example. Would you mind doing that? (and adding a link here?)
Thanks!
-
https://forum.qt.io/topic/102198/many-incomprehensible-errors looks like another candidate...
-
https://forum.qt.io/topic/102272/using-qt-project-code-with-earlier-versions/10 also looks like a candidate
-
-
-
And another one: https://forum.qt.io/topic/102999/strange-variable-has-incomplete-type-and-forward-declaration-of-qapplication-issues
oh! I run into that as well, didn't think about turning off the code model as potential solution.
I ended up forwarding a class instance pointer several levels up in the hierarchy ....
This is stupid.
-
Hi @J.Hilk,
oh! I run into that as well, didn't think about turning off the code model as potential solution.
Well I don't think turning off the code model is a solution. But most of these problems collected here have in common, that Clang has parse problems in a header which then propagate in every file that is including the header.
Tracking down these problems, however, is a tedious task.