Fix corner case in "up to date" check.

Currently, the timestamps of target artifacts (and only these) are
always retrieved from disk before checking whether artifacts are up to
date. This can lead to problems, for instance in the following scenario:
    - The transformer creating the target artifact has another output
artifact, i.e. the target artifact has a non-target sibling.
    - The sibling is created in a different command that runs after the
one creating the target artifact.
    - While the command creating the target artifact is in progress, a
different, unrelated command running at the same time fails.
As a result, the executor will wait until the in-flight commands have
finished and then cancel the build, not running any commands still
queued for execution. This means that the target artifact will have a
different on-disk timestamps than its sibling.
On the next build, this newer timestamp will be retrieved. Since the
current code assumes that all sibling artifacts have the same timestamp,
it only checks one random output artifact. If that happens to be the
target artifact, the up-to-date check will report that the transformer
does not need to be re-run, even though one artifact is not up to date.
This patch fixes the two closely related subtle bugs that can lead to
this behavior:
    1) Get rid of the "convenvience functionality" that always checks
the timestamp of target artifacts as a service to users that do not know
that they are not supposed to manually touch files in the build
directory. This behavior has been obsolete since the introduction of the
"--check-timestamps" option.
    2) If the "--check-timestamps" option has been given, our invariant
about all output artifacts of a transformer having the same timestamp is
not guaranteed to hold, as they come from an outside source. Therefore,
in this case we must check the timestamps of all output artifacts, not
just one.

Change-Id: I482fe6060c0dee5fef74a9236a787dc7d40f3b24
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Do not leak exceptions from the Profile class.

This is public API.

Change-Id: I37cfd018e350a3ff4cecba34af42bf23a8aaf0fd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Move Qt profile setup into a dedicated library.

Otherwise all changes to the implementation will have to be duplicated
in IDEs.

Change-Id: I61e6d4fa1ee9b724eb5d9de9f233dc915a6c8bc3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix profile test.

We don't throw exceptions anymore.

Change-Id: I4a8baba0b3fd0d6af7adceb4c6ef905f63b84efd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Tighten sanity check.

Check for the same file appearing as different artifacts in a child
list. See QBS-491 for an example.

Change-Id: Ie93268c05386ccfae2a57097a19e5ec7d135902a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Merge remote-tracking branch 'origin/1.1'

Change-Id: I7319a1deea008c9f4df077eaecf3147872fc4a21
Use a qbs-specific group for the settings.

Otherwise, non-qbs settings from fallback locations will add noise for
users. This patch is in effect an addendum to commit 065d89fa2c, which
assumed that this happened only on OSX. However, we have now seen such
problems also on Linux.

Change-Id: If4e40d5941c8e1bd249cf75096b59d4b10880d00
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix "clean" autotest on OSX.

Dynamic library names are different on Mac.

Change-Id: I451d61765a91213e5d2e6141848cb2f00cb0d2d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Take source artifact properties into account when change tracking.

When properties on source files change, rules might have to be re-
applied and the installation of the respective source file may
have to be re-done. The current code catches none of that.

Change-Id: I7d87eb1d6bbb9918f2633ec8cbb9640ca23b90a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix build data rescuing.

The old implementation allowed more than one connection
to a child with the same file path represented by
different artifact objects.

Change-Id: I38db86c50f0f671fdcb05d481f51fb512442cbfd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
rename Rule::script to prepareScript

Rule might get another script besides the prepare script.
This will reduce the diff size for a future patch.

Change-Id: I28755cc0bb30d429108b63c9e9db4cc4c93573b1
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
remove dead method declaration

Change-Id: Ic9fda65275ecc01d62dc6f6acefac97c6ce3a68b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix API test.

The test project now has more than one installable file, so we can no
longer assume that the first one is the application.

Change-Id: I6059362c691912cafa46caa948d6b22baa9a289e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Prepare for using QT_NO_CAST_FROM/TO_ASCII.

Change-Id: Ib39e49e896cbddf5a5bd851088500991d962355a
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Merge remote-tracking branch 'origin/1.1'

Conflicts:
	tests/auto/blackbox/testdata/trackExternalProductChanges/project.qbs
	tests/auto/blackbox/tst_blackbox.cpp

Change-Id: I7b5e72e0a360d7e5e814a1f6e344bf11eac767e6
Make it possible to link with unresolved symbols.

Task-number: QBS-476

Change-Id: I697cc562b4212a5aa89ba973081571f99c08ba37
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
rename Rule::outputFileTags to staticOutputFileTags

This will reduce the size of a future patch.

Change-Id: I8787dde8bf332ec383c2be5d2fed45fd24e846b0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
rename ArtifactList to ArtifactSet

Now the name reflects reality.

Change-Id: I3997b99de86819c973434240103d25d6915d838b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix ResourceRules Rule condition for iOS.

Change-Id: I15d27730b8ca7bc5bd0afdc01b126339209f4438
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Rename provisionFile property to provisioningProfile.

This is what these are actually called.

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