Sanitize error/finished handling in executor jobs and command executors.

The classes as they are now specify different signals for signaling
failure and finishing. Some of these error() signals are followed by a
finished() signal, others are not, which is just asking for trouble.
Under certain circumstances there can also be several error() signals
for one and the same process. In fact, there is almost certainly a race
condition there regarding executor job re-use.
This patch changes the design so that there is always exactly one
finished() signal that carries an error status. For some non-fatal
problems that higher-level code cannot sensibly handle, we now log a
warning instead of emitting an error signal.

Change-Id: I9e3df11564e7337ad766ca0d009303367d43c4ec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
fix module property cache

When caching module properties, we must take into account whether
we're requesting one or multiple values. Otherwise we might get
the wrong cached result.

Task-number: QBS-539

Change-Id: I9ca17d3a537922f37dc70be4dbfd73416b6bdfc3
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Work around braindead QFileInfo::exists() behavior for symbolic links.

Change-Id: If8002fc7be0cc6af954ebb28ccbcb7bee1031e1c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Allow long-running commands to be canceled.

At the moment, canceling a build waits for the current
command to finish, which means that a badly behaving process
or piece of JavaScript code can block qbs indefinitely.

Task-number: QBS-552
Change-Id: I8ac23f068dd6083905a9681097da6b970c0b646b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix "inifiniteLoop" test for Qt 4.

QThread::sleep() is protected there.

Change-Id: If7b6dbabd594c0a0eaf4ea2b7c691c7e9c00c55a
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
fix collecting defines in moc.js

We cannot call the moduleProperties function to retrieve
cpp.platformDefines and cpp.compilerDefines because it
combines all found values of this property. We're only
interested in the values that are set in the product's
instance of the cpp module.

Task-number: QBS-539
Change-Id: I2edbbf44b2cbc3051a0f0abec42d5d385fbb106e
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix warnings when compiling with Qt 4.

Change-Id: I8f2f3d2215811a949456bf8a5e982d75149f6244
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
setup-qt: fix help text

Change-Id: I15341377851a0ccfc8377f381192b9f6a9e51f5d
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Bump version number to 1.2.1.

Better late than never.

Change-Id: Ie222ea5d0535f5d28e6dd0f1bc97e5b25b61770b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Remove left-over function declaration.

Change-Id: I9c7be07b195eee08736394801f6b0aabc0f24231
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Prevent user code from hanging qbs during resolving.

Long-running commands are handled already, but badly written project
files could still hang qbs with e.g. infinite JS loops on the right
hand side of a binding. Such code can now also be interrupted.

Change-Id: Ie0d114bd37d540e764d5ec5bb323c91bfd64a67a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Increase timeout in tests.

Some build machines take a bit longer.

Change-Id: I65fba2c024e95350c427286b5bcfa0feb2a7ee04
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Add script for creating a source package for a release.

It's only a one-liner, but tedious and error-prone anyway.

Change-Id: I2fd71f393e49737bf002f0ca93ed157be3fc1438
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Allow to set the archive format in packaging script.

For Windows, we use zip.

Change-Id: I0e28a284d2be0b071106a3e124fba9c187305887
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
API: Do not present all root artifacts as target artifacts.

E.g. Transformer outputs are roots, but not target artifacts.

Task-number: QBS-557
Change-Id: Ia2ab5567344911b0751deed465722deb182e4aaf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fuzzy tester: Print error message also for clean build failures.

This will help us find false positives (e.g. "disk full").

Change-Id: I5db9d333809f7067dc5dff81544e9e5f0206ee8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
fix XcodeProbe::compareVersions

Task-number: QBS-556
Change-Id: I1f38394a8b60aae3185901176dce9439d6ad111a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qbs build: Fix type of project.libRPaths.

This must be the same as cpp.rpaths, which is a string list.

Change-Id: I61f18e4dbb0c81d093c22e7d0ecb62e6381030a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
add missing loadFile call from msvc.js

Change-Id: I9eba26d3b66056b21ca78ccb6eb9406cc43a7288
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Remove invalid assertion.

The asserted condition is actually not required to be true.

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