Fix potential assertion in Executor.

In the CommandExecutor and ExecutorJob classes, we follow QProcess'
glorious example and report error() and finished() separately. In the
case of a process crashing, the current code can lead to a slot in the
Executor being called twice, the second time in an unexpected state.
This patch fixes that particular bug.

Change-Id: I2f75a5426bc8e14912d0c796fea5c905afd0e628
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix WiX test and turn it into an autotest.

Change-Id: Ifd1cdfc54e7566146a478cf0833a6f67196735cd
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix linking of MSIs built from multiple WiX source files.

Task-number: QBS-541
Change-Id: I177c755ee203df1018039683da860b26dd9ec820
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
WiX: Fix the "cultures" property handling

Task-number: QBS-542
Change-Id: I4ec5bf6020732155ab1a20583861e4bbadd196d9
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Make AbstractJob::cancel() a slot.

Because it is useful and cannot hurt.

Change-Id: I44b49c61931bf7e7db6bd7bf12c283a4fb4504ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Add (failing) autotest for QBS-552.

Change-Id: Idea84b324ddccc62721ff0025ffb85c55dd82a80
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
support internal extensions in loadExtension

Internal extensions like qbs.File are now supported by loadExtension.

Task-number: QBS-302

Change-Id: I2b51fec90145afbe18f48cfdd5c0becc9472e90c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
load PropertyList extension in bundle-tools.js

Task-number: QBS-549
Change-Id: I1a02ec28aa1be4191b8e6070674b3407154cfc98
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix compilation on Windows.

Change-Id: I39e0e268bdcfdae16dd9fb9c4a44261513c9ba60
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Make "infinite-loop" test app not actually run infinitely.

Otherwise, a failing test will leave a CPU-burning process behind.

Change-Id: Ie9cb2e608f0cb3f1e1ad7491948666f8ac6fc87c
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
fix usage of deprecated function

Change-Id: Iee7ff9b0409a7d2b6b43be4f071eabb7d46fe950
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
fix environment of JS Process

The environment of the JS class Process is empty if the build environment
has not been initialized yet. This can happen if one uses Process on the
RHS of a binding like Group.name.

Task-number: QBS-547
Change-Id: I1341c8dbbc677adcc3e3f5842a95d6f8aeebf09b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
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>