Commit Graph

679 Commits

Author SHA1 Message Date
Oswald Buddenhagen
2129a3e2d2 make-gcc-happy variable-may-be-uninitialized (but-is-not) commit
Change-Id: If214d3bce7fd23e2c30b6b9bc1bfec2e9fff3958
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-04 19:50:00 +01:00
Oswald Buddenhagen
c91f12f9e9 fix initialization order warnings
Change-Id: Ia12973f7c4cabff77133ef4b9a840b76e8881759
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-04 19:49:57 +01:00
Oswald Buddenhagen
033bc07fb4 fix signedness warnings
Change-Id: I86952c06176dd334a3f029c34b74260ea43434cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-04 19:49:55 +01:00
Oswald Buddenhagen
14f261a28c kill dead code
Change-Id: I713c5504126fab40389ecb3a248b6c10048fc6c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-04 19:49:52 +01:00
Richard Moe Gustavsen
7be6438bad xcode generator: warn if QMAKE_INFO_PLIST is not valid
Warn the user if QMAKE_INFO_PLIST is set, but file not found.
An iOS application will not run or deploy without an
Info.plist present, and the error message given by
xcodebuild is not very informative.

Change-Id: I54f0e06de320a43c9f3261fe88761c41e3ccd022
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-01 18:07:08 +01:00
Joerg Bornemann
392054d311 fix VS version selection
On machines where multiple versions of VS are installed, the VS version
for the vc(x)proj generator is selected by the entries in the PATH
variable. The first VS installation that's found in PATH is used.

The former logic printed a warning if multiple VS installations were in
PATH and also fell back to the lowest version if a VS version was
registered with multiple install paths.
That's the case for VC 2012 express and prevented its usage.

Task-number: QTBUG-34357
Change-Id: Ia5c66a1aea0c40e4b7460b3aa6c7daee6673da44
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-31 12:33:55 +01:00
Tor Arne Vestbø
f9a8cf99bc qmake: Pick up default bundle prefix from Xcode preferences
But still fall back to 'com.yourcompany', just like Xcode does for the
initial launch.

Change-Id: I89afadefafc254a0014aca197741d42a0199943e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-31 12:33:55 +01:00
Richard Moe Gustavsen
a959beeeec xcode generator: resolve QMAKE_INFO_PLIST from source dir
If QMAKE_INFO_PLIST is set, check if the file it
points to is located inside the project source dir
rather than the build dir.

Change-Id: I6fb176349dae8e841b5e2dfdb9f9cb87f51a1e76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-10-30 16:24:22 +01:00
Chris Gilbert
ae52bba5d4 Fix msvc project dependencies as specificed by .depends
Previously, the full path to the qmake project file was specified as the
key for projGuids when inserting the project GUID into this hash table.

The only place that items are inserted into projGuids is in
VcprojGenerator::collectDependencies at:

	projGuids.insert(val.first, newDep->target);

In this case, val.first contains the full path for the given project being
processed at this point. (e.g.: c:\testproject\testproject.pro)

Further in sln/vcproj generation, projGuids is queried with the contents
of <TARGET>.depends so that users may specify another qmake project as a
dependency for a given target.

This occurs in two places, in two ways:

1) In VcprojGenerator::collectDependencies() at:
	QString depend = dep.toQString();
	if (!projGuids[depend].isEmpty()) {
	...

In this case QString depend contains whatever is put into <TARGET>.depends.
Typically this is the plain name of the project you depend on.
(e.g.: testproj)

2) In VcprojGenerator::writeSubDirs(QTextStream &t) by proxy of
   extraSubdirs which is a QStringList of the project depends should the
   mapping in case 1 fail.

This case works much like the above case, attempting to use each
QString entry of the extraSubdirs list as a key in projGuids.

If either of the above two attempts are successful, the msvc solution is
configured in a way that creates a project dependency, ensuring correct
compilation order and other related behavior.

The fix here stores the target project (e.g.: testproject) as opposed to the
full project path, as that is what is expected in the <TARGET>.depends
statements contained in the qmake project.

Change-Id: Iee05661a64d7a3e4467c5ade48d801fbbfe981b5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Chris Gilbert <cgilbert@knaldtech.com>
2013-10-29 19:59:17 +01:00
Joerg Bornemann
175489f102 fix /SAFESEH linker option for VS >= 2010
In VS 2010 and newer the /SAFESEH linker option is not passed as
additional option but is represented by the property
ImageHasSafeExceptionHandlers.

Task-number: QTBUG-34392
Change-Id: I3bd19078e695716050dd20736b6bc589bcb1cefd
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-10-29 16:17:55 +01:00
Konstantin Ritt
d5a16e4a3c Add QMAKE_PKGCONFIG_VERSION variable to allow version overriding
Change-Id: Ibba50c74f308d81e0058e4dacec7ed84e738473e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-28 00:37:15 +01:00
Tor Arne Vestbø
910573f8e6 xcode: Move Qt preprocessor steps to separate target
Xcode resolves dependencies at the beginning of each target, so if a
Qt preprocessor such as moc or rcc updates a cpp file Xcode will not
rebuild the cpp file until the next build.

We solve this by moving the Qt proceprocesor handling to a separate
aggregate build tool target, which the main application target then
depends on.

Change-Id: I8f9225b9603dc5f279b1cb60976fe709bd97963e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-10-25 14:51:30 +02:00
Andrew Knight
07ee43142b qmake: Support MSVC2013 for WinRT builds
Change-Id: I1c102f0b029616997d72933a90c0f9a2a3a9e222
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-10-25 09:00:37 +02:00
Tor Arne Vestbø
1cdbe4752b 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>
2013-10-24 20:20:59 +02:00
Konstantin Ritt
7627f6739b Skip extra PKGCONFIG variables with empty value
The fallback value is an empty string anyways.

Change-Id: I77a2d3ad275321cb8b2e059fb6359f921cbc697c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-22 00:22:17 +02:00
Tor Arne Vestbø
b5fe1ed172 qmake: Add support for QMAKE_{PRE,POST}_LINK in the Xcode generator
Change-Id: I038cf0aebb74d7ecfe6cb3ed868287042342eb7e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-10-17 13:25:58 +02:00
Morten Johan Sørvig
89ef515177 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>
2013-10-17 08:07:25 +02:00
Tor Arne Vestbø
5c92a8b70a Xcode: Dynamically choose release/debug libs based on current configuration
Non-framework builds would automatically link to whatever Qt library
matched the config at the time of running qmake, eg hard-coded to
libQtCore_debug, while Xcode itself allowed the user to switch between
release and debug configurations.

We now append an Xcode settings variable to the library path, which gets
resolved at build time depending on the current config in Xcode.

Change-Id: I12873e38a28d9595ef3fd0ae0ad849e6744833a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-10-16 19:33:15 +02:00
Oswald Buddenhagen
40d4c1b2ed make sure that installed meta files are always postprocessed
the problem is that there is no sed command on windows ... so build it
into qmake and invoke that from the generated makefiles. cmake does the
same, after all. ^^

Task-number: QTBUG-33794
Change-Id: Ib7077e18acbc5edd79f714c5779a5ed31ea6c093
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-11 21:04:04 +02:00
Oswald Buddenhagen
58de01b54b fix setting of output directory of SUBDIRS with -tp vs
amends ec145129c.

Investigated-by: Nikolai Tasev
Task-number: QTBUG-32375
Change-Id: Iff27c03c0bb4f739dad9d10bae9576946948041b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-11 21:03:21 +02:00
Tor Arne Vestbø
a9bad65b09 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>
2013-10-11 21:01:27 +02:00
Tor Arne Vestbø
40ad539787 qmake: Allow QMAKE_MAC_XCODE_SETTINGS to be limited to debug or release
The Xcode generator does not support exclusive builds, but still
generates projects that contain both debug and release configurations,
each with hard-coded differences such as whether or not to strip or
to generate debug symbols.

As a stop-gap solution we allow projects and mkspecs to add extra
settings that are limited to a given build. Long term we want to
rewrite the Xcode generator to support exclusive builds, but that
is a much bigger task.

Change-Id: I85056164bb1b3c8c6e0cf66410348cca7138eca5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-10-11 18:49:03 +02:00
Tor Arne Vestbø
0e96e47deb qmake: Centralize TARGET sanitization in default_post.prf
Shared between UNIX and Win generators, and allows prfs after
default_post to rely on sane TARGET and DESTDIR values.

This allows us to clean up the DESTDIR logic in testcase.prf,
which was completely busted. Doing the two in separate commits
is unfortunately not possible as the old testcase.prf logic
was so broken it would barf if only looked at.

Change-Id: Ibf21216195c760ee46ae679c162b207b77a9d813
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-11 18:47:27 +02:00
Tor Arne Vestbø
eea1c359c9 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>
2013-10-11 18:47:27 +02:00
Tor Arne Vestbø
8e7dc25380 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>
2013-10-11 18:47:27 +02:00
Katja
8d2c6206fd *.sln not generated correctly for VS2012 and VS2010
msbuild fails to build project since sln not generated correctly

Task-number: QTBUG-33446
Change-Id: If92ea743b1b407446873210090aa8591a491abad
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-09 13:52:58 +02:00
Mitch Curtis
dee55b026b Mention that the c++11 CONFIG flag sometimes has no effect.
It has no effect when the compiler doesn't support it.

Task-number: QTBUG-33952
Change-Id: I23b1fcdf4ec31924b1b59987846f7e0fbf17c6c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-10-09 13:52:58 +02:00
Mitch Curtis
b14d761f49 Document c++11 CONFIG flag.
Task-number: QTBUG-33952
Change-Id: I752c85ba1a6d42d9794c18fb3f3198df50952c61
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-10-08 16:02:10 +02:00
Oswald Buddenhagen
86163308e4 clarify intended operator precedence
Change-Id: I176bf225d4cb388f1d328ac140741fe32667e89c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-07 21:01:31 +02:00
Oswald Buddenhagen
1627ddbbed add default branch to switch in platformToolSetVersion()
Change-Id: Icf399ffd7e41aca207ea3b4b08b9e3dead7c821a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-07 21:01:31 +02:00
Oswald Buddenhagen
50a90720be make setting a bad $$[QMAKEFEATURES] not crash qmake
Task-number: QTBUG-29642
Change-Id: I9cc209eb313f03bf342bcb64b1de3005755700a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-07 21:01:31 +02:00
Joerg Bornemann
7c3efdfb6a make it possible to disable debug information in vcxproj files
Task-number: QTBUG-32885

Change-Id: I53a2208935a1c52bc7ca757651df6a0125979787
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-10-01 11:10:44 +02:00
Tor Arne Vestbø
413ec67fc4 qmake: add $$title() function to convert strings to title case
Change-Id: Ic535a8f7cc2ab7b7f1948b2d0237ebe9a71c7ec7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-24 14:33:00 +02:00
Tor Arne Vestbø
2ff3cbbb56 Xcode: Quote variable names with invalid characters in them
Allows us to have scoped variables such as eg FOO[arch=armv7].

We could quote all variables, but Xcode doesn't, and we try to stay
close to the native behavior.

Change-Id: Ia6634a33e42031fe7e69c4f680803fa347e5de4a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-09-24 02:50:37 +02:00
Sergio Ahumada
642ebccaad Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-09-21 02:59:14 +02:00
Tor Arne Vestbø
09205d5734 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>
2013-09-21 01:25:19 +02:00
Tor Arne Vestbø
8aefa4dc46 qmake: Don't create OBJECTS_DIR and friends for TEMPLATE = subdirs
A bunch of empty and never-to-be-used directories makes the build tree
noisy and harder to navigate.

Change-Id: Iebef91c82d58a8d6a0047fb5439d50eb6806f557
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-21 01:25:19 +02:00
Tor Arne Vestbø
e582d742cc Sanitize QMAKE_EXTRA_COMPILERS paths in makefiles
There was a mismatch of how we sanitized paths for dependencies of the
target and how those dependencies were sanitized (or not sanitized),
resulting in the target depending on 'some/path/foo.o' while the
extra compiler target was named 'some/path//foo.o', with an extra
slash. This confused 'make' enough to decide that it didn't know
how to build the dependencies for the target.

Change-Id: I181b86c291286cbbbb1f7b4c3b929a5f1dc163a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-21 01:25:19 +02:00
Tor Arne Vestbø
15e9c3301c Strengthen check for combined QMAKE_EXTRA_COMPILER with variable output
The pattern ${QMAKE_ needs to be at the beginning of the line, or not
start with a $ (which would make it a regular qmake variable).

Also, it's fine that the variable is of the QMAKE_VAR_foo type, as
these variables are resolved at generator time, but are constant
and do not depend on the inputs. This means we have to replace
extra variables in the output.

Change-Id: I21ad24ae770f2137e2d5d92a20ee54e2f3f4ca06
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-21 01:25:19 +02:00
Kamil Trzcinski
898b8d05c5 qmake: added WMAppManifest generation for winphone target
Platform specific qmakespec needs to enable: autogen_wmappmanifest and winphone. Manifest will be generated once and only for the application template.

The Manifest will generated from following variables:
* PRODUCTID - the GUID (application specific)
* PUBLISHERID - GUID (publisher specific)
* TARGET - short application name (executable)
* AUTHOR
* PUBLISHER
* DESCRIPTION - application description

Change-Id: I225c24dc256c57451775e37658080e88b842a7d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-17 23:09:24 +02:00
Frederik Gladhorn
8c6755aeec Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/tools/qstring.cpp

Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
2013-09-16 14:52:40 +02:00
Kamil Trzcinski
4bbbe06bef qmake: added file deployment support for winrt and winphone targets
The user needs to specify the DEPLOYMENT variable. The syntax
is the same as previously used for DEPLOYMENT. For more info
please refer to the qmake documentation. The change adds
a new itemgroup, "Deployment Files". All files in this
itemgroup are marked as DeploymentContent and are then
packaged with the application either as XAP or the WinRT
specific file format.

Change-Id: Icf85887287c1c97eb782704340eaa3f8dde6719e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 18:18:46 +02:00
Kamil Trzcinski
083b5b503c qmake: added support for WindowsMetadataFile
In order to be able to use the linker's /WINMD
and /WINMDFILE options

Change-Id: I2673e20aa073c6b807e8c9f191fd408c7976efc4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:16:07 +02:00
Kamil Trzcinski
6008eb525e qmake: added CompileAsWinRT switch to the VCCLCompilerTool (the cl /ZW option)
Change-Id: I2a67779bcb38af85a2c43d3e9a15aa3ba45b4788
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:15:44 +02:00
Oliver Wolff
1d4e1e12d8 Use correct toolset version for winphone builds
Change-Id: I9ecd9f632d0201e060de5cce4782912efdc6bd32
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:14:49 +02:00
Kamil Trzcinski
7c8ef213b5 qmake: enable default reference for all winphone targets
The change adds a new ItemGroup with a single library reference:
platform.winmd.

Change-Id: I0c7f4c46654b520afb79b6c6f49b5f2d1af400d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:14:40 +02:00
Kamil Trzcinski
48ba0389ee qmake: added VCPROJ_ARCH variable.
It's a generic way to configure the Visual Studio Solution
architecture. It's added to support different project
architectures, ARM specifically. It may be a good idea
to replace the Win32 and x64 with VCPROJ_ARCH=Win32
and VCPROJ_ARCH=x64 defined in corresponding qmakespecs.

Change-Id: I9b23f7393bf248a629c425187d6dd8859092c45c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:14:28 +02:00
Kamil Trzcinski
036cfadcc6 qmake: added WinRT and WinPhone configuration switch
qmakespec for either WinRT or WinPhone have to specify
QMAKE_PLATFORM with winrt and/or winphone.

Change-Id: I87e0063881e6edd65de14adb006949247ce49904
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:13:59 +02:00
Andrew Knight
ede5be6ea0 Create clean makefiles for winrt builds
Change-Id: I33b74b98e04c1a9ca15ae07fad88f88dd4ce0669
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 13:25:25 +02:00
Tor Arne Vestbø
3e3297242a Xcode: Resolve extra compiler (e.g qrc) dependencies
The Xcode generator relies on the generic makefile generator for extra
compilers such as qrc and moc, by generating makefiles that are then
executed as separate build steps in the Xcode build.

These makefiles are generated by entering a special mode in the Xcode
generator, in which case we _do_ want to resolve dependencies, so that
e.g. the files referenced inside a qrc file are added as dependencies
to the makefile rule that generates the qrc-cpp file.

Change-Id: I96bdcb165e9774a6328ae1980986fa2c6b00c6d9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-09-13 21:43:38 +02:00
Sergio Ahumada
f7837e28b5 Merge branch 'stable' into dev
Conflicts:
	src/concurrent/qtconcurrentmedian.h
	src/corelib/itemmodels/qabstractitemmodel.cpp

Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
2013-09-13 18:04:17 +02:00
Topi Reinio
0b9e39100b Doc: Add a dependency to qtdoc for qmake manual
qmake manual needs to be able to link to pages in qtdoc module,
for example, to information about Third Party Libraries.

Change-Id: I6ccaa0c3aecc54bd5d76c6b1573c797423048207
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-11 10:30:23 +02:00
Oswald Buddenhagen
6a41fa832e fix finding qmake.exe when called on the command line as ... qmake.exe
Task-number: QTBUG-33333
Change-Id: I026659fc779d1cf2fde46b5bcb4990b151b8c51e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 11:16:33 +02:00
Sergio Ahumada
2346ae1675 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
2013-09-07 16:18:32 +02:00
Andy Shaw
0278310f9e Ensure the input file is first in the list of dependencies
When building a project in VS then it would cause a rebuild
under certain situations even though a rebuild is not
actually required.

The root problem exists in VS in the following configuration:
1. A file has a custom build tool specified
2. The custom build tool has additional dependencies
3. The input file is specified in the additional dependencies
4. There are files in the additional dependency list

This is the situation with form files in Qt that have include hints
specified in Qt Designer. The include hints get specified in the
additional dependencies for the custom build tool.

What happens is that VS will process files in the additional
dependency list differently based on where they appear in the list
relative to the input file.

If a dependency appears before the input file, VS will require the
file as a build input. If you just specify a file name, VS looks in
the project directory (and only the project directory) for that file.

You have to specify the path (relative or absolute) to get VS to look
elsewhere. If VS does not find the dependency, VS thinks the project
is out of date (since the missing dependency is a required build
input) and will rebuild the input file.

If the dependency appears after the input file and the file doesn't
exist, VS does not include the dependency as a build input. Since the
file is not a build input, no rebuild is required.

Change-Id: I5af460d21ad049ed7819746fd60c98677b810692
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-03 08:23:08 +02:00
Frederik Gladhorn
190fa97c83 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	examples/widgets/doc/src/addressbook-fr.qdoc

Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
2013-08-27 22:51:09 +02:00
Oswald Buddenhagen
b7f7edfae4 de-duplicate code for writing dummy makefiles
as a side effect, this fixes the generators that were more bitrotted
(nmake and even more mingw).

Task-number: QTBUG-30644 #close
Change-Id: Iefa3f07125884412d091aa12b44935e5b1fb858a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Leena Miettinen
ad4bda8b75 Doc: update Project Options section in qmake Manual
Explain which mkspecs have the configuration option
precompile_header set.

Task-number: QTBUG-25683

Change-Id: I9b11eafad16b65523cbb90897fe88829add58bea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-27 19:12:06 +02:00
Oswald Buddenhagen
e0f2603f49 avoid deadlock in cache() during spec/cache loading
sync up; this doesn't actually do anything in qmake.

if we end up calling cache() from within the initialization of the base
context, we cannot wait for for the completion of that initialization
before we proceed, obviously.

Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/b64b4431c20afd9e39c1463e736f998ef450688f)
2013-08-27 13:36:34 +02:00
Oswald Buddenhagen
652bdb8894 lock baseEnv in cache()
sync up; this doesn't actually do anything in qmake.

as we modify the environment, it must be properly locked.
this implies that initFrom() also needs to be called with a lock.

Task-number: QTCREATORBUG-9835
Change-Id: I48bae9af9adaa0518e5a9db0ba08ff057ae14f9f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtcreator/d022a2d19cecb00397c2a215fc4e3bf64b1e627b)
2013-08-27 13:36:31 +02:00
Oswald Buddenhagen
957134dc84 always check for baseEnv init failure
sync up; this doesn't actually do anything in qmake.

creator's file watcher can trigger many parallel, entirely
non-hierarchical project reloads. if there is enough of them to exceed
the thread pool size, some will be serialized already by qtconcurrent,
not by our wait condition. these should notice a faulty spec, too.

Change-Id: I8ce40cb90fbc28045127881d57ec94e125df79af
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtcreator/759d0a69dd3973b4785b6f9412f46666a05cdf85)
2013-08-27 13:36:28 +02:00
Leena Miettinen
31e665c7cd Doc: update description of qmake SUBDIRS variable
You can specify a relative path to a .pro file in any directory.

Fixed a capitalization issue and a grammar issue and changed the
visible text in a link target.

Task-number: QTBUG-14139
Change-Id: Ib476bd400c46645709950c582492edcaaba9d7ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-26 13:36:24 +02:00
Joerg Bornemann
788bde071a remove support for Qtopia's QOM_OBJECT macro
That's not been in use for quite a while.

Change-Id: If5a18a54d32f330fe37655516d4b83e5d3d30afc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-26 12:21:40 +02:00
Frederik Gladhorn
c8ca300e49 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/src.pro

Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
2013-08-21 11:03:18 +02:00
Oswald Buddenhagen
b4c0d9166e change reporting of missing files
use the new parser flags to report all i/o errors directly.

as a notable side effect, the "WARNING" prefix is gone (even though
it is still treated like that, which is mildly insane to start with).

Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-20 22:56:12 +02:00
Oswald Buddenhagen
15981b985f complain about absent files to -pro argument (in lupdate)
this doesn't actually do anything in qmake.

Change-Id: I908fc3792bdc321370e51be98adf7a9c81e37a85
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/e1f3732197ef77a29cb7f3c1ce094b3f31a7b689)
(cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
2013-08-20 22:56:07 +02:00
Oswald Buddenhagen
0a1faaa9eb avoid boolean argument trap: introduce QMakeParser::ParseFlag
Change-Id: I26ce032a1aa044e9a4da0c8708a4490b07374992
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/066b08fc62c67d586996ea4e272ef05dd3865fac)
(cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
2013-08-20 22:55:59 +02:00
Leena Miettinen
99e1608c52 Doc: public test functions in function libraries
Task-number: QTBUG-29168

Change-Id: Ife486d65778ee2ac2d6e1e55f26942bda0bbdbb0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-15 15:54:12 +02:00
Thiago Macieira
d5ed6936be Don't compile MD4, MD5, SHA-2 and SHA-3 into qmake
We just need one digest algorithm, any algorithm, to generate a
somewhat unique identifier. SHA-1 will suffice.

Change-Id: I3cb26bf866d616df3ef32feace10934f19daa1a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-15 01:30:54 +02:00
Frederik Gladhorn
5c23199d4e Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/macx-xcode/Info.plist.app
	mkspecs/macx-xcode/Info.plist.lib
	qmake/doc/qmake.qdocconf
	src/corelib/global/qglobal.h
	tests/auto/other/exceptionsafety/exceptionsafety.pro
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
2013-08-14 09:06:31 +02:00
Stephen Kelly
1dcdc506f3 Fix SONAME handling on android
Set the SONAME to the library name without the major
version number appended, as android does not have the versioned
symlinks.

Change-Id: I41c504869019a393a3f112b2f7fc81c7ad5afa1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-13 19:48:15 +02:00
Jerome Pasion
4bea83fe71 Doc: Fixed qmake manual's images and snippets directories.
-corrected qmake.qdocconf file to not read the manual twice
-moved the snippets and images directories to make sure they are not
 in the src directory

Task-number: QTBUG-32580
Change-Id: I7b702ce3b1c8709bbb1f473f70625083242f1a40
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-08-13 01:38:54 +02:00
Leena Miettinen
88083a8159 Doc: fix links to documentation in other modules
Add the depends variable with all modules as values,
because the QT variable value documentation should list
the import statements for all modules.

This patch enables linking to other modules.

Change-Id: I521ac22bac27d79537c14583f6592251288974a4
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-08 15:57:52 +02:00
Leena Miettinen
167a444742 Doc: add winextras to the list of QT variable values
Qt Windows Extras is a new add-on for Qt 5.2.
To make the link work, also added qtwinextras to the
doc configuration file.

Change-Id: Ib7d117908c241812c200ec701b6f2be27fe893c6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-08 12:55:48 +02:00
Oswald Buddenhagen
b215176da3 implement simple VFS to support caching during project parsing
sync up with qt creator - for qmake itself, this is just a minor
refactoring.

Change-Id: I833253f81c3159056fab2ff888f293b36cc2ef56
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/66802ef8bf7989dc025e34bf91d93576189c483c)
(cherry picked from qtcreator/69542826fa643a0fed2fc9e717f072c2852dc017)
(cherry picked from qtcreator/196424115338fb9a535810704b7d814d318b0462)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-07 13:58:41 +02:00
Topi Reinio
85325202af Doc: Add keywords for qmake variable/function reference pages
In the Help mode in Qt Creator, many have accustomed to search e.g.
for 'qmake variable reference' which no longer exists as a title in
the qmake documentation.

This change provides easier access to the qmake reference by
creating keywords for them, making them appear in search results
for searches starting with 'qmake'.

Task-number: QTBUG-32268
Change-Id: If60a0cdc11464a8aeb50c62ddbde9683326e1384
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-07-30 18:09:44 +02:00
Frederik Gladhorn
084c5b3db7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp

Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
2013-07-23 11:18:11 +02:00
Oswald Buddenhagen
c9568da969 don't install mac bundles atomically
... as that causes debug+release installs to overwrite each other's
postprocessed files.

introduces CONFIG+=sliced_bundle, which instructs qmake to create
file-by-file install commands. we don't know whether people are not
putting files outside qmake's knowledge into the bundle build dir, so
this mode is not necessarily backwards-compatible, and thus off by
default.

Task-number: QTBUG-28336
Change-Id: I23e90985ccd3311f0237ed61aadca6d7ed8325b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
9e4dcbac05 mac frameworks: link target alias to Current version
by convention, $target.framework/$target links to
Versions/Current/$target, not Versions/$version/$target.
Versions/Current already links to $version.
so this adds one indirection, but is otherwise the same.

Change-Id: If3d1a3713712f4221ec31883977e50bce6f91764
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
1cbb228a10 fix target strip-ing inside mac bundles
this went unnoticed so far, because the mac qmakespecs don't define a
strip command to start with.

Change-Id: Iac3e7ffa6f400373552134a44b9713aaf5f44589
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
944e1d7b6a make unescapeFilePath() less inefficient
replace() doesn't detach if there is nothing to do.

Change-Id: I845b585c766f44a670ca3af1fc11ba03e7317622
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
cc0c394682 escape paths coming from prl files
qmake has the rather bizarre logic that QMAKE_LIBS* is escaped rather
early (instead of right before being written out the the Makefile).
consequently, we need to explicitly escape the paths from the prl files
as well.

Task-number: QTBUG-32326
Change-Id: Ieaf81113d3ca3cf5d8a1ef87c83c5721d6b473ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
f216caa52c unbreak use of not-overquoted ICON entries
amends 0e548b5856.

Change-Id: I88a5b8c681f7508aecf02b913e64816b712d97a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
ff6265bfc2 fix c-quoting of strings which contain quotes
escape backslashes before the quotes, as otherwise we'd escape the
backslashes we just used to escape the quotes.

Change-Id: I88e12c0c2cfc53e0ab8dce9807b06dfce6aa6e78
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
f57e2f5667 resolve output of .depend_command relative to $$OUT_PWD
... as that is the CWD of the command (since b139e7e96e5c).
leave the resolution relative to $$PWD as a fallback with a warning.

Investigated-by: Harald Hvaal <hhvaal@cisco.com>
Task-number: QTBUG-19352
Change-Id: I75de9444a647cd9e6f509e3d8eb3382dc985e5ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Teemu Kaukoranta
db5631484b Changed digia contact details to */legal, updated licenses
Scripts are available in internal mkdist repo.
Added license tags, updated licenses and copyrights/contacts

Change-Id: Ibc734275f3000987eaa4f5c57f19d4e1fda2c479
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-20 11:21:46 +02:00
Oswald Buddenhagen
3fdf69b599 update m_featureRoots less aggressively
it's not necessary to immediately re-calculate the roots after assigning
QMAKE_PLATFORM - it's sufficient to do it on-demand, so merely
invalidate them. this avoids that we re-calculate them multiple times
without ever using them in between while processing specs with
distributed platform assignments.

Change-Id: If508594764811b96a577fc81c5ded34ab0453148
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
(cherry picked from qtcreator/28df27d924bb407791a76de8159c9ffa6efde283)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
3a6a462ad9 cache results of feature search
looking up the same files in the same locations over and over again
is a rather significant waste. in particular, looking up the CONFIG
flags that don't correspond with features has a measurable impact on qt
creator's project loading time.

Task-number: QTCREATORBUG-9154
Change-Id: Ibae3d8b7797e706a6416a7d45c77734ab1281b51
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/fa27cd79e05aed4ebd16d5648480cc7d48fefd43)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
547b7ed29c minor optimization: don't concatenate strings needlessly
Change-Id: Iddec1a818ff9f3ad8b12491100883e433e4b8246
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/12652c20711fd29dcba62b8d5ba71c077d8bd06c)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
4b600bd3c1 don't unnecessarily use QFileInfo::filePath()
just directly use the filename we constructed it from.

Change-Id: Ia428a2cb4b192fea6bde62dfbf35361bcfc4b21e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/571234786a3ff7e8e3a9220f12d22a9f74f7a53c)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
94e42cb772 un-clash iterator names
Change-Id: I96b995c7f6dec06f75a61e109c419c9204744d90
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-15 19:45:49 +02:00
Oswald Buddenhagen
79fcc7787a undo accidental string merge
amends 51980595e1.

Change-Id: Ie4fd4a6d762f4c87dabd7d3124f3397b0f853b77
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-07-15 19:45:49 +02:00
Sergio Ahumada
3ef6cf060e Merge branch 'stable' into dev
Conflicts:
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/json/qjsonwriter.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm

Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
2013-07-11 16:42:01 +02:00
Katja
22d1b3a823 MANIFEST:NO is not written to vcproj
When defining QMAKE_LFLAGS += /MANIFEST:NO to pro file,
it is not written to vcproj in VS2008.
Added MANIFEST:NO generation to vcproj

Task-number: QTBUG-31975

Change-Id: I5f84b30db711bf9c317ca20dc65b207140edb398
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-05 11:36:22 +02:00
Oswald Buddenhagen
51980595e1 merge string literals
makes for less visual noise and a tiny bit more efficient code.

Change-Id: I587707fa4e2dc9bead9435bf5caf3a98ab680725
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 18:13:18 +02:00
Oswald Buddenhagen
d149ceef4a VPATH resolution: don't crash when $(FOO) expands to nothing
Task-number: QTBUG-29988
Change-Id: Ice3dc28002fc70e70fecc5d61bd0b32260ac0d50
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 18:13:05 +02:00
Oswald Buddenhagen
b30273ec4a don't crash if builddir is suffix of sourcedir (or vice-versa)
Task-number: QTBUG-32145
Change-Id: I97a6e2ebd51350cbf39c86efa5c26a376c49da95
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 18:13:01 +02:00
Joerg Bornemann
f1cdd4b297 add support for Visual Studio 2013
Add mkspec win32-msvc2013 and make VS 2013 known to configure and
qmake.

Change-Id: I6e63a4d679727a8a3f068f377956185996d72bce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 12:54:58 +02:00
Oswald Buddenhagen
783181cfc1 make split_value_list() even less sane again
contrary to what one may expect, it's actually *not* supposed to remove
the meta-characters it interprets.

luckily, this function is not used much any more ...

Task-number: QTBUG-31877
Change-Id: I2b60f9b173140da78db2b07b596cc2e5f6e6d555
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-03 21:38:37 +02:00
Tor Arne Vestbø
ffef22cae2 Xcode: Fix defines in OTHER_C/CPLUSPLUSFLAGS for project file output
We were only fixing QMAKE_C/CXXFLAGS, not the defines we then appended.

Change-Id: Iaa4a394738658c45aae83941ebe54470d6d8e250
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-03 21:36:26 +02:00