I have two projects in QtCreator, which both include two .pri files in another directory:
[common]
* common.pri
* database.pri
* ...
[projects]
[project1]
* project1.pro
* ...
[project2]
* project2.pro
* ...
Let’s concentrate on one .pro file. It contains the two includes:
COMMONPATH = ../../common
# INCLUDE COMMON FILES
!include($${COMMONPATH}/common.pri) {
error(Failed to include common/common.pri)
}
# INCLUDE DATABASE FILES
!include($${COMMONPATH}/database.pri) {
error(Failed to include common/database.pri)
}
After saving my .pro file, QtCreator didn’t notice the two .pri files in the project manager.
After some time (and I can’t remember what I did to do so) QtCreator showed one of the two .pri files as shown in the screenshot:

I’m now stuck since I can’t tell why QtCreator doesn’t show the second .pri file the same way it shows the first one, neither why it showed the first one only after some time…
I tried to replace the $${COMMONPATH} variable by its value, removed the error handling, restarted QtCreator multiple times, run qmake from the menu multiple times, …
Ok this is weird. I just figured out why Project Manager doesn’t display the second included .pri file:
The file contains an
error(...)statement, which itself contains a'character, which is correctly interpreted byqmake, but incorrectly by the Project Manager! The latter obviously interprets'as a string enclosure token or something similar.From common/database.pri:
Correct version (removed
'):I’m using this QtCreator version: