> -----Original Message-----
> From: interest-bounces+kai.koehne=digia....@qt-project.org
> files =\
>    foo.cpp \
>    foo.h \
>    bar.cpp \
>    bar.h
> 
> for(file, files) {
>    contains(file, '.*.h') {
>       message(header = $$file)
>       HEADERS *= $$file
>    }
>    contains(file, '.*.cpp') {
>       message(source = $$file)
>       SOURCES *= $$file
>    }
> }
> 
> [...]
> However, the problem is that all the files are added to both HEADERS and
> SOURCES. It appears that the HEADERS and SOURCES assignments simply
> ignore the contains()-check, even though they are placed inside the scopes
> of these checks?

I guess you mean that headers/sources appear twice within Qt Creator project 
tree, both under 'Headers' and 'Sources'?

The reason is that Qt Creator takes the liberty to ignore scopes when parsing 
the project file. This is to ensure that it shows all sources, even one's that 
e.g. are not applicable on the current platform ... when you're e.g. 
refactoring you want to see references in Mac files too, even when you're under 
Windows. That's different from what qmake will do.

Regards

Kai
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to