the root cause is in the API of parsedProFile(): it discerns
isNull() and isEmpty(), which is of course a time bomb.
but in this case the right solution is not trying to parse
the empty string in the first place.
there is not much point in complaining about internal queries of unknown
properties anyway, so just don't try it.
remove the default value from the complain argument to avoid mistakes
either way in the future.
that's - as usual - making things rather braindead:
- the included files inherit the current context's function defs,
but not the variables
- default_pre.prf is re-loaded for infile()/$$fromfile()
- the entire config is re-loaded for include(file, PREFIX)
the cumulative mode tries hard to never lose already assigned variable
values. the naive implementation turned assignments into additions,
which made the trivial construct "FOO = $$FOO" double the size of the
array each time it would be executed.
so instead let the assignments be assignments, and then re-add the
values that would be dropped.
Reviewed-by: dt
Task-number: QTCREATORBUG-1595
feature files are already generally excluded. add the explicitly
injected files (qmake.conf and .qmake.cache) to that. this makes
path-based exclusion superfluous.
use local8bit instead of latin1 resp. 8bit-passthrough, after all.
the situation was as follows:
- if the pro files and file names were all ascii, everything just worked
- if either contained non-ascii:
- on unix, the evaluator would work as long as the file content
encoding matched the file name encoding, and the ui would work as
long as the file name encoding was latin1 (i.e., on no modern
system)
- on windows, both would work only if the ansi code page was
latin1/cp1252 (i.e., on western systems)
i.e., even in the low-level evaluator, only native latin1 systems with
actual latin1 files worked consistently. given this situation, it makes
little sense to make an encoding adapter between the evaluator and the
ui as originally planned. instead, take the easy way out and use
local8bit - this continues to work for native latin1 systems+files in
the backend, and makes the ui work for everything the backend groks and
some more.
Reviewed-by: dt
Task-number: QTCREATORBUG-930
this fixes the recent appearance of qt_webkit_version.pri in all qt 4.7
based projects.
in fact, the patch does somewhat more: it makes the evaluator provide
the information to the higher layers which is necessary for a truly
hierarchical display of includes. TBD later.
Reviewed-by: dt
Task-number: QTCREATORBUG-1590
the async re-parsing code breaks the assumption that project
parsing only ever starts with a single non-concurrent evaluation
(of the top-level project file), so the population of the base
values in the shared ProFileOption was happily causing crashes.
Reviewed-by: dt
Task-number: QTCREATORBUG-1569
that way the result vector can be pre-allocated - which gives zero
resizes if no expansions are in the expression.
for the joined argument lists of built-in functions, pre-allocate a
fixed 5 elements, which covers all cases and more.
the argument lists of user-defined functions are not pre-allocated
yet.
ProString is almost a QStringRef, except that it keeps a copy of instead
of a pointer to the QString - to make it refcountable. additionally, it
holds a hash so it can be efficiently used for repetetive hash lookups.
this function class just joins each string list argument into a
single string. so instead of first building a list and joining it
right afterwards, create a single string in the first place.