Oswald Buddenhagen
8e726a6d58
next attempt at fixing low-level parsing
...
in particular, fix line continuation processing.
also, reintroduce some error handling. it checks only one condition so
far (malformed assignment statement) and is entirely silent, but that's
all that was necessary for internal robustness.
2009-08-11 20:37:24 +02:00
Oswald Buddenhagen
9efc9ce0e4
make $$_QMAKE_CACHE_ return something useful now that we support it
2009-08-11 20:37:23 +02:00
Oswald Buddenhagen
1b0fbbffad
don't hang in .qmake.cache search when build dir does not exist
...
QDir::cdUp() is strange ...
2009-08-05 12:38:02 +02:00
Oswald Buddenhagen
b972177444
don't report prf inclusions to derived classes
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
81f6001f91
move include recursion check to evaluateFile() where it belongs
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
f4cc46d5de
move qmake property hash to option object
...
that way they are auto-inherited by nested parsers, and it's the right
thing to do anyway.
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
f50952f17a
complain about querying non-existing properties
...
... except where it is expected
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
a89bee6dab
rely on the properties passed into the evaluator
...
fallbacks to values from the qt we were compiled/linked against really
make no sense.
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
f6f8340b8e
improved high-level qmake compat
...
- parse .qmake.cache, remove workaround for not doing it
- look for the mkspecs in all the places qmake would do
- use the passed in properties instead of QLibraryInfo to find the qt
data dir
- fix loading of generic features from within os-specific ones with the
same name
- add multiple inclusion guard for features (including what seems to be
a bug in qmake ...)
- misc cleanups and beautifications
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
dfcf9889a7
look only for mkspec features for the current target platform
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
6b85d482b6
micro-optimizations
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
bcda15ee97
fixEnvVariables => expandEnvVars overload
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
0d0860a0be
set the current work dir even for pri files
...
qmake does so.
of course, in the longer run we need to get rid of this at all, but this
would require quite some reviewing of side effects.
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
980868cee4
make the qmake option object a proper member
...
to be able to share the option object among evaluators, it is passed by
pointer.
only field_sep stays static and becomes a string - that's effectively
just a cache to avoid repeated construction.
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
3739af6c46
make Option a nested class of ProFileEvaluator
...
it's still static at that point, though.
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
c699522bf9
shuffle code around
...
non-inline implementations in a header? feh!
2009-08-04 20:59:28 +02:00
Oswald Buddenhagen
3399e362cc
inline trivial functions
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
9431850fcd
remove remainders of a fairly useless set of asserts
...
(the rest seems to have evaporated over time or never existed in the
first place)
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
5b7c8848e5
don't push top level pro file twice on stack
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
023affc603
get rid of m_origfile
...
it's redundand
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
36bbb3bc0e
initialize TARGET properly instead of fixing it later
...
... which is also what qmake does
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
42ee63384c
refactor pre, post and CONFIG feature inclusion
...
actually use evaluateFeatureFile() instead of hand-crafting stuff
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
2e9a9cfa4a
plug memory leak
...
it's a bad idea to conditionalize a cleanup on a completely unrelated
variable.
2009-08-04 20:59:27 +02:00
Oswald Buddenhagen
28a71cfe7f
fix comment parsing wrt line continuations
2009-07-21 19:41:44 +02:00
Oswald Buddenhagen
ca55ddafc8
make the feature file search do fewer useless stat()s
...
qmake ensures that the file name ends with .prf, so there is no point if
we try it without first.
2009-07-21 14:07:19 +02:00
Oswald Buddenhagen
81baf03476
inline parseLine()
...
this should be marginally faster and it allows turning a few members
into locals.
2009-07-21 14:07:19 +02:00
Oswald Buddenhagen
67e30ed8c9
make excess closing braces non-fatal
...
and as that happens to be the only syntax error we can get during the
parsing stage, remove the fatal error handling alltogether.
2009-07-21 14:07:19 +02:00
Oswald Buddenhagen
5e1a24f75b
whoops - fix parsing of line continuations
2009-07-16 17:41:48 +02:00
Oswald Buddenhagen
4c561414a6
optimize low-level pro reader code
...
avoid qstring functions. instead, use preallocated strings and pointers.
now the majority of the parsing time is spent in qt (qfile and qtextcodec).
2009-07-15 17:31:47 +02:00
Oswald Buddenhagen
3c6793e4f3
less braindead evaluation of ProVariable & ProValue
...
this gives a rather amazing performance boost to the pro reader
2009-07-14 20:49:40 +02:00
Oswald Buddenhagen
3237a07996
move actual replaceInList imlementation back to proparserutils.h
2009-07-14 20:49:40 +02:00
Oswald Buddenhagen
96276c85d8
remove bizarre TARGET hack
...
it was superseeded by using non-cumulative, corrected evalution for
determining the targets.
2009-07-14 20:47:36 +02:00
Alessandro Portale
d3f9757916
Removing some unused semicolons after Q_UNUSED
...
There were both variants, with and without extra semicolon.
2009-07-13 17:35:17 +02:00
Oswald Buddenhagen
b0227ce496
remove linguist-specific functions
2009-07-10 14:04:48 +02:00
Oswald Buddenhagen
a2f40fce2a
implement proper vpath handling for qt4 projects
...
this also removes the bogus special casing of various
filename-containing variables inside the pro parser.
2009-07-10 14:04:48 +02:00
Jarek Kobus
42adcb9116
Add a public method which reads the content of pro file from string
...
Rev-by: Oswald Buddenhagen <oswald.buddenhagen@trolltech.com >
2009-07-07 13:15:39 +02:00
Aaron McCarthy
16286b763d
Support condition scopes in pro files.
...
The CONFIG variable was not being checked when testing conditional
scopes. Resulting in, for example, incorrect executable paths when
those paths depend on a particular CONFIG value being set.
2009-07-03 09:21:33 +10:00
Jason McDonald
884b7af769
Update license headers and sales contact details.
...
Reviewed-by: Trust Me
2009-06-17 00:01:27 +10:00
dt
7594cc5a41
Fixes YACCSOURCES and LEXSOURCES files not visible in the project tree.
...
Task-number: 255267
2009-06-16 14:41:25 +02:00
dt
98f8fc78bc
Fix static leak to make valgrinding easier.
...
Reviewed-By: ossi
2009-06-04 15:25:07 +02:00
dt
4a372ee8d9
Fix memory leak in QtVersions parsing of qmake.conf
...
Reviewed-By: ossi
2009-06-04 15:22:40 +02:00
dt
07730341bd
Fix memory leak in $$system() calls from .pro files
...
Reviewed-By: ossi
2009-06-04 15:18:14 +02:00
Oswald Buddenhagen
3104e4c121
fix gcc 3.3. build
...
the templated friend just doesn't have any effect.
so simply skip the typeinfo. will be slower, but you deserve that if you
use that compiler.
2009-06-04 09:49:23 +02:00
Oswald Buddenhagen
d2a8449bea
ifdef Q_?S_* cleanup
...
- clear up some Q_OS_LINUX vs. Q_OS_UNIX
- clear up Q_WS_* vs. Q_OS_* (relatively theoretical exercise)
- use proper #if-#else cascades instead of free-standing #ifs
2009-06-03 20:54:59 +02:00
Oswald Buddenhagen
e083ad2920
expand arguments to s// operator
2009-06-03 19:11:19 +02:00
Oswald Buddenhagen
93571f7d42
assign right variable
2009-06-03 19:11:19 +02:00
Oswald Buddenhagen
dc0bc58646
micro-optimize: (x.toLower() == y) => !x.compare(y, Qt:: CaseInsensitive)
2009-05-25 18:35:12 +02:00
Oswald Buddenhagen
bd0f0aa182
fix return value of error() & co
2009-05-25 18:35:12 +02:00
Oswald Buddenhagen
a03f8643a7
make message() & co. handling more qmake-like
...
which basically means cutting features. heh
2009-05-25 18:35:12 +02:00
Oswald Buddenhagen
88de3e6a45
support loops: implement for(), next() & break()
2009-05-25 18:35:12 +02:00