[Qt-creator] pro file parsing in cumulative mode really necessary?

Tilman Vogel tilman.vogel at web.de
Sat Apr 17 01:39:19 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I was just debugging very strange errors depending on whether a variable
was set once or multiple times in a pri file and found out that calling

reader->setCumulative(false);

in Qt4Project::createProFileReader() solves all my issues.

I didn't find any negative side effects, so I ask myself whether
cumulative mode here is really beneficial for anything at all?

The symptoms I was seeing were that depending on whether I had

SRCDIR=../src

or something like

SRCDIR=../src
SRCDIR=../src

in my pri file, source files were listed or not listed in the project
tree. Later, there are statements

include($$SRCDIR/abc/def.pri)
include($$SRCDIR/xyz/xyz.pri)

which finally modify the SOURCES and HEADERS variables.

This behaviour very counter-intuitive. I believe this points to some
other bugs in treating the cumulative mode and it could be repaired, but
I didn't dig any further.

Another side-note: qmake seems to accept the following (admittedly
strange) call

OUTPUT=$$replace(INPUT,string,)

and interprets it as to replace "string" by "" in $$INPUT. However, the
implementation in profileevaluator.cpp sets OUTPUT to the empty string
instead.


Tilman






-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkvI9ScACgkQ9ZPu6Yae8ln1gACfewrs879XB44/fVOE1SqRaMI7
YjIAoKgxL/MNHe5f5moL09cIFsE2wncE
=wZE1
-----END PGP SIGNATURE-----



More information about the Qt-creator-old mailing list