dumpers: share the code for extractTemplateArgument

Change-Id: Ic1b03d2dffdfb7ba6ead191601127b54af38b3cd
Reviewed-by: hjk <hjk121@nokiamail.com>
qmake: add $$title() function to convert strings to title case

Change-Id: Ic535a8f7cc2ab7b7f1948b2d0237ebe9a71c7ec7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/413ec67fc46ad7049f870cdb8ead35149b215d45)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
qmake: Expose ARGC to qmake functions to be able to check argument count

ARGS already exists, but is a flattened list of the arguments, so both
foo(bar, baz) and foo(bar baz) will give count(ARGS, 2), making it
unreliable for validating arguments to qmake functions.

Change-Id: I0bcc16614c64000169431327da48fd1a26708e67
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/09205d573413da8a2ac3826198fe36bb2dc4349f)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
make setting a bad $$[QMAKEFEATURES] not crash qmake

Task-number: QTBUG-29642
Change-Id: I9cc209eb313f03bf342bcb64b1de3005755700a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/50a90720be7d67dcdfe704a82fb3b1138edd2aab)
qmake: Load extra variables only if also loading pre-files

The extra variables only need to be applied once, when we
are loading the pro file (and hence are loding pre files),
not for every single pri/prf that's loaded as a result of that
(which do not load pre files themselves).

Change-Id: I3118694a8eeccf2dc32c4f62df754033fad13528
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/8e7dc25380dceebca094e092d9feb21ad167ba91)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
qmake: Evaluate extra configs before loading default_pre

Exclusive builds uses setExtraConfigs to apply the particular CONFIG
of each build pass. Unfortunately we were not applying these extra
configs early enough in QMakeEvaluator::visitProFile() for them to
be picked up/usable by default_pre, something that can be useful.

Change-Id: I423a4688250a15f0c1a2cc65a48f0bbc14ad4497
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/eea1c359c9663cec15e7373c065ee06cba151eed)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
qmake: Update internal mkspec on changes to QMAKESPEC

Allows the macx-xcode mkspec to be a wrapper around other mkspecs.

Since QMAKESPEC can now be set in the spec, we have to ensure not
to append to QMAKESPEC.

Change-Id: Idf33ff38147f14c488f14b426c02d9a739fdaecf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/a9bad65b091d15b0446fa141e0a69ebb94b38b70)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
qmake: Expose qmake arguments as QMAKE_ARGS

Allows project files or mkspecs to call qmake recursively using system()
with the right arguments, which we use to fix the ios default_post.prf.

Change-Id: I90d69e2b156bb0f0af1279188b11f81c84c24fb8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/1cdbe4752bef972db5471e811e9a781749cd0380)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Tests: Fix pluginmanager test

Change-Id: Id28825e437d9549016c66e9df6b4438eb827c10b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Tests: Fix pluginspec test

Change-Id: I3ad00ddeeb0f7e9a538af09ccb736fb478d14456
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Add JSON parsing support to qmake.

Add qjson* implementation files from corelib/json
to the qmake build. Add a read-only compile mode,
enabled by defining QT_JSON_READONLY.

Add qmake built-in function parseJson(file, into)
which parses a json file into the given variable.

qmake uses a flat key -> value-list implementation
for storing variables, which means that some hackery
is need to represent arbitrarily nested JSON. Use a
special "_KEYS_" variable for arrays and objects:

Arrays:
["item1", "item2"]
$${array._KEYS_} -> 0 1 2
$${array.0} -> "item1"
$${array.1} -> "item2"

Objects:
{ "key1" : "value1", "key2" : "value2" }
$${object._KEYS_} -> key1 key2
$${object.key1} -> value1
$${object.key2} -> value2

Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
(cherry picked from qtbase/89ef515177fd5a0b5d95dcffd5fd0b0669e3625a)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>