Project::targetExecutable: return path to the executable within an app bundle

Certain applications rely on the full path to the executable in an app
bundle and cannot use the path of the bundle itself (e.g. lldb).
The qbs run command could use just the bundle path, because QProcess
contains magic to run app bundles.

Task-number: QTCREATORBUG-12833
Change-Id: I270acc141d0482f569e8d983e2d1382c7eb8994a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Fix toJsLiteral(QVariant).

For QVariants of QString type, toJsLiteral(QString) must be called
instead of the simplistic conversion that currently takes place. This
fixes handling of backslashes and double quotes.

Change-Id: I70c1ee4bc2c6b913c6f71fa644671bf33525966f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Link Qt libraries as full file paths.

That is, give the full file path to the linker instead of using the
-L/-l combination that can pull in the wrong version of a library
if one is installed e.g. in /usr/lib.
For this purpose, the patch does two things:
    1) In each Qt module file, add the file path of the respective
       library to cpp.{static,dynamic}Libraries instead of the base
       name.
    2) When reading Qt's prl files, check in all occurrences of
       "-l<lib name>" whether <lib name> matches a Qt library and
       if so, replace <lib name> with the full file path to the library.

Change-Id: Ic02633ae7f820bd2365f8e510f7c16f73d93e584
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
libqtprofilesetup: Complain only once per missing prl file.

The message currently appears up to four times per file, which is
annoying.

Change-Id: I96b7192d81fd0fc9a70903d695b7c000cfef1807
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
libqtprofilesetup: Read prl files also for Qt 4.

If we don't do that, nothing will work, because the qbs modules'
libFilePath property won't be set. Independent of that, it's the right
thing to do.

Change-Id: Ifa946281fd0e7b045bbd30bd166e661cabce7c1d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Apply file tags filter also to Transformer outputs.

This is currently done only for Rule artifacts.

Task-number: QBS-668
Change-Id: Iddeda8a9d567cc8122f3aca2c1c1e3ea878e687c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Do not sync settings after changing a property.

This can get exceedingly slow, particularly for batch updates, e.g.
Creator setting up profiles.

Change-Id: I80977e145efa67bf474530eddb134124827be3f2
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Fix documentation for Artifact item.

The property is called "filePath" now.

Change-Id: I3505bd2d673671c911826a8a2f1c833e99ff8ea0
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
qtprofilesetup: Refactor qt_lib_*.pri file reading.

Move this functionality to a dedicated function. It will get more
complex in a follow-up patch.

Change-Id: I541abbf8e8ffa05190980179ecb0919184f130eb
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Fix run environment setup.

Now Darwin platforms get the same DYLD_* environment variables set as
Xcode (plus Qt) so applications can be developed/tested without
embedding bundles. This brings equivalent behavior to what already
exists on Windows.

This also fixes a regression introduced in
5877328c4dacb1283408083cb3538ea5bc46eae5 with the Node.js module,
causing the working directory to be inappropriately changed by the run
command.

Change-Id: Ic2904f105378eb61d9236367329a2f9c8771a7d3
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix equality operators.

The Standard does not allow to dereference null pointers, even if that
reference is then only used to compare the pointer values. So introduce
a wrapper function that does the pointer-related checks first.

Task-number: QBS-674
Change-Id: I9a14b4871b91102699f09ed922b9ab0e0265209a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
qtprofilesetup: Read qt_lib_*.pri files recursively.

They can contain "include" statements, apparently.

Change-Id: Idc67b7b58c909bdca3ebb2efdf11ee33f06b0b9b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Bump version number in 1.3 branch.

Change-Id: Ib0ca977f5b1cf84b2dd7e9eb687154a1f1bccf8f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
If build fails because no default profile is set, say how to set it.

Task-number: QBS-677
Change-Id: I3b89af584261a6dc00e561bc5eb59de4d6413565
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
setup-qt: Make sure the message about base profiles appears if needed.

We checked for profile keys starting with "cpp." and assumed if one was
present, the profile would have a toolchain set up. But on platforms
like OS X and Windows, we set certain cpp profiles ourselves, so we have
to exclude them from that check.

Change-Id: Iacc6fae5d1675c6b151de37f9b5827c46daf3ddc
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Evaluate Project.minimumQbsVersion earlier.

Currently, this property is evaluated after checking the module
properties and item types, so it cannot fulfill its purpose at all.

Change-Id: I6b84d9af69e1c0147f87eb0fead4409dbb036d5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Try harder not to store inconsistent build graphs.

In particular, try to prevent that nodes of a product that is no longer
part of the project still appear as children of nodes in other products.
While it is not entirely certain that this solves the linked bug (as I
don't know how to trigger it), it is now hopefully no longer possible
that such an inconsistent state is actually written to disk (that is, if
the problem still exists, our sanity checks should now catch it when
storing the build graph, not when loading).

Task-number: QBS-682
Change-Id: Id6d55246ac3de014e6b917abbd6aed1505769968
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Add documentation about how to use custom modules.

We don't explain this anywhere at the moment, and users would very much
like to know.

Change-Id: Icf7c81d5931f1154d8a6fd978b8cfe5054180b4b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Do not clear Artifact::product in removeArtifact().

This is too early in the case of change tracking; we still do a couple
of things with the old build data afterwards.

Change-Id: I843e364288ed7b05bcb7d03386c102212ec18690
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
API: Do not check for file existence when removing.

The caller might have removed the file from the disk already.

Change-Id: I86d079c008b922e7594e7db22638a0d36b71eb6f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>