Fix preprocessor defines list in Qt profile setup.

For example, now gives the correct QT_GUI_LIB instead of QT_QTGUI_LIB.

Change-Id: I8f77d5f32ed613b6a4b0dfac845e3f582c1db90d
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
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 soname handling on OS X and iOS.

The correct soname (install name) is now generated for frameworks and
other bundle product types, and the prefix no longer requires
(but still permits) a trailing slash, which is the normal convention.

Change-Id: I2de33976352a99eeccc8fa94bf187c36c7968260
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
fix TestApi::buildProject(productNameWithDots) on OS X

The application is supposed to be non-bundled.
The same procedure as every test...

Change-Id: I7dbbdf588385c573504964aa487f110ed6e0ebc0
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Fix handling of cpp.cxxStandardLibrary.

This fixes a bug where -stdlib=libc++ would be added unconditionally,
and makes sure not to add -stdlib=undefined to the CLI invocation.

Also, the Qt.core template has been adapted to use the new property.

Change-Id: I1dd12097edd992d851c52287e86572d6ef21bfac
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Introduce cpp.useObjcAutomaticReferenceCounting.

Very commonly toggled by Apple developers.

Change-Id: Ic17ffb0a2ba050924b8c8ce7ed14a3c8635c994d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.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>
Use modified product names for build directories.

Users should be able to use any product name they want. In particular,
they should not be limited by what the file system supports; this is why
we have the "targetName" property. However, we currently subvert this by
using the product name as-is in the build directory. Instead, we now use
a super-safe version of the product name consisting only of selected
ASCII characters and make it unique by appending a hash of the original
name.

Change-Id: I3acf06d83a1c8a8c0a4716a7ac47a5bf8652075d
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>
Cpp module: Make the compiler version available as properties.

It is conceivable that rules might be interested in this information.

Change-Id: If1a93a226b48c8dfe807c6a3747eaf52580dc378
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Remove strange default flags from iOS cpp module.

- visibility should not be hidden by default; this breaks shared libs.
- optimization, -dead_strip should not be platform specific.
- -g, -fPIE, -headerpad_max_install_names are already handled elsewhere.
- -fstrict-aliasing, -gdwarf-2 are already compiler defaults (redundant).
- -fexceptions has a task for a dedicated property (bad place anyways).
- -fpascal-strings, -fasm-blocks, user can set these if they want 'em.

Change-Id: I856d43f3d3539d0a0569c347615ef59dfc2f20f1
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Set better defaults for cpp.minimumOsxVersion and cpp.minimumIosVersion.

Now, each platform doesn't get both properties set, and the default is
usually the version of the SDK in use. This is both consistent with
Xcode's behavior and necessary to convince the tools that the target is
iOS Simulator and not OS X, as appropriate.

Change-Id: I63037138d38675c5f0cc53e721e42a4d7cc2c3b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Set necessary default compiler flags for iOS Simulator builds.

This is consistent with Xcode and also required for building 32-bit iOS
Simulator binaries that use ARC, since the compiler's default
Objective-C ABI version is 0 ("legacy" runtime) for 32-bit targets.

Change-Id: Ia7575fd9d4788170a6805a8ff8fe5f6426003da9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix symlink generation for Darwin frameworks.

As these three links point to directories, the -n option is needed to
avoid dereferencing the symlink when replacing it. Otherwise, a broken
symlink with the same name as the target is created within the target.

Change-Id: Ibd171e1d174fc5d5d12ff677a83911fc8f7407a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qbs-setup-toolchains: Fix property name.

It's "cpp.compilerVersionPatch", not "cpp.compilerVersionPatchLevel".

Change-Id: I526c2c6b46b31fd27c562a3a8e62c4a316820c06
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Allow compiler defines to participate in Info.plist env replacement.

This is useful to pass through i.e. -DQBS_VERSION="1.4.0" so that:

<key>CFBundleVersion</key>
<string>$(QBS_VERSION)</string>

will work.

Change-Id: Ib289eb7b980561a76423472fe18ffd9b6195f342
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Rename useObjcAutomaticReferenceCounting to automaticReferenceCounting.

This name is more consistent with what other properties are called.

Change-Id: Id5b8a17a41209e40adade1666811589999099f20
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>