[Qt-creator] Creator parsing too much (and incorrectly) qmake files?

Olivier B. perso.olivier.barthelemy at gmail.com
Tue Dec 3 16:49:05 CET 2019


I encountered an issue with QtCreator after a minor modif of my project file

I added in a pri include file a few lines that look like :
SOME_VAR = $$files($$SOME_OTHER_VAR/*, true)

That particular pri file is included under a condition, so it is
actually included only in a 'automated' build, i order to speed up
qmake for normal developper that just run 'make' and don't need to
ruin 'make install'
A 'qmake -r' runs fine in an automated build that is expected to parse
the problematic lines, and in a user build that is expected to not
enter the file
However, because of those lines qtcreator seems to loop or be stuck,
while the status tooltip says that it is scanning the root .pro file.
This takes more and more memory until the computer stops responding

What i think is happening is that creator does an other scan for
himself than the one qmake does, and is going through the include even
though the condition to include it is false. But as it is not supposed
to have parsed that file, it does not know the value of
$$SOME_OTHER_VAR, so it is actually doing multiple recursive scans of
/* (this is on linux) and storing that in variables

I validated with messages that qmake is not entering that pri file,
and just commenting the $$files calls removes the problems.
Same behaviour in versions 4.8 and 4.9

Any hints on how to avoid this issue?


More information about the Qt-creator mailing list