fix safeConnect function

Make sure we don't visit nodes over and over again in the existsPath
helper function.

Change-Id: I8914cfebeac0f67e9b833b3a21724d0db3c2aba2
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Docs: Capitalization fix.

Change-Id: I54628cce8e2f513c347f0fb7a275b2f597c21fe8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Introduce tool for fuzzy testing.

Incremental builds are the likeliest source of problems, as well as the
one that is the hardest to reproduce. This new tool turns a given project
into a quasi-autotest by checking out random commits and doing incremental
builds on them. In case of a build error that is not reproducible with
a clean build, it aborts and reports the offending sequence of commits.
Any qbs project that comes in a git repository is supported.

Change-Id: I9f6f9172ce03140341ed25859092a8ed32d4a17d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
add tst_blackBox::changeDependentLib

This changes a lib that's used by an application and checks if an
incremental build still works.

Change-Id: I24816aab1ec55e32c6e197f7d28e60c9d1f874ba
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Get rid of "duplicate dependency" nagging.

It's not too useful in general, and also hits in certain situations that
are hard to avoid.

Task-number: QBS-498
Change-Id: I5a7448ee02aa3f1e1497c4ddbf3d47e4f6901ee1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Doc: extend build command documentation

Change-Id: I35b561fbd1fbbc2ccb71656578dddd1d35ac56a9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Let detect-toolchains be used like setup-qt.

Namely, let people specify a specific compiler and profile name
instead of offering only auto-detection.
Also rename to setup-toolchains for even more consistency.

Task-number: QBS-496
Change-Id: I8c144d7b4dd26e38652f10c1fff56af4daf3cecb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Update references to the toolchain setup tool.

s/detect/setup

Change-Id: If9d84c94c89c887fb833540a0e2c9d0da4919ba9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
support transformers with an unknown number of outputs

To support different types of nodes in the build graph, we introduce
the base class BuildGraphNode. Artifact now derives from BuildGraphNode.
A RuleNode class is introduced that represents a rule in the build graph.
Rules are applied in the build phase and not in a pre-build phase
anymore.
The handling of moc has been revisited. The fixed automoc pre-build
phase is no more.

This is the squashed merge of a feature branch.

Task-number: QBS-370
Change-Id: If27cdc51cba8c9542e4282c2caa456faa723aeff
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
unshadow loop variable

This confuses MSVC.

Change-Id: I5751eceef8b7bcf15fe4482ecedad47e0322735c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
build with Qt4

Change-Id: I6a7e9d81b7c354eaf98c159b684cc948db683b07
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Turn struct ScannerPlugin into a class.

To prevent forward declaration problems.

Change-Id: I92f2d4ef5e3a2297136918e4d46b036f62661118
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Add missing Process import in IBModule.qbs.

Change-Id: Ibd467fe6dd835a5bcdc3a6addeb64235ca222a24
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix buildgraph autotest.

This one broke an impressive number of invariants, which finally
resulted in a crash on a build machine.

Change-Id: Ia6dc57a2681b780faa17ebc4f130251da23a89a0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Improve register{Added,Removed}FileTag.

- Do not do double hash look-up.
- Do not leave empty lists in the hash.

Change-Id: I09c6c0917fc4b97032a4a48ba62419d9ebd236e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix restoring product build data.

- The main problem was that the leaf rule/root rule connections were
  done before all product build data was restored, leading to the
  "enabled == true <=> build data != null" invariant being broken,
  which resulted in a crash (only triggerable with release builds).
- In addition, the FindRootRules visitor connected too many rules, as
  it descended into child rules.

Change-Id: I2fd575ed6c41ad29cc20ea651f4388880ef86634
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Condense executor code.

Remove unused function and merge functions that were (nearly) doing the
same thing.

Change-Id: I33276068d5595456832ed44a0ff2d5705a87165a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Move "static Qt" discovery into libqtprofilesetup.

Otherwise the non-trivial detection code would have to be duplicated in
Qt Creator.

Change-Id: I7f0c9e1c578ac23c757efad3da8c301a25649677
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fuzzy test: More verbose output, wait longer for git.

Change-Id: I19baf426bdf81b80d9a5f52adaf7b815d242c65a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Check for dynamic symbols when doing smart re-linking.

By default, nm lists the symbols from the normal symbol table, which get
removed when stripping. As a result, the current implementation fails
for release builds.

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