aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Handle digits in merged short options as option parameterJoerg Bornemann2017-04-031-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | The argument list ["-a123b987"] becomes ["-a", "123", "-b", "987"]. Merged short options cannot be digits, e.g. ["-7j1"] is an error. This way we can support the "-j8" option that everybody knows and loves from make and other make'ish tools. Task-number: QBS-196 Change-Id: I574d77e8f85a708708ebed43668bb3c6ca916233 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix size_t -> int conversion warnings on MSVC (64bit)Orgad Shaneh2017-04-033-3/+3
| | | | | | | | | | Change-Id: I410e531fa3cebffb282350904a4caa3e5002fce2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Cumulate delayed product errorsJoerg Bornemann2017-04-034-5/+45
| | | | | | | | | | | | | | | | | | | | | | If a delayed error leads to other errors later on, we would output the later errors without showing the original - more important - delayed errors. Cumulate delayed product errors and pass them up the stack. Change-Id: Ibdfc6d3e301a80ef265792907b3e4a150a22ef8b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Allow running qbs without a profileChristian Kandeler2017-03-316-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | When no profile is given and no default one exists, simply use the modules' default values. The most relevant effect of this is that users can now build for the host platform by simply typing "qbs" without having done any manual setup, if there is a compiler in the PATH. [ChangeLog] It is no longer strictly required to provide a profile. Change-Id: Ifee09d2653dfbd4ea06c59248d78e376da2f217b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Replace all uses of QVector with std::vectorJake Petroules2017-03-2932-181/+188
| | | | | | | | | | Change-Id: Idd41fc4d9819649a85739f984862bed6480fddd5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Support readonly propertiesJoerg Bornemann2017-03-294-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog] The attempt of setting a read-only property within a qbs file now yields an error. It is still possible to override read-only properties from the command line. Task-number: QBS-1064 Change-Id: I0afe4272ac2fc14e51d5797da0bf1e2d7f3a3438 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove PropertyDeclaration::ListProperty flagJoerg Bornemann2017-03-292-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This was never used, and the check was wrong such that every property that did *not* have the list<> type modifier was flagged. [ChangeLog] Properties with the list<> type modifier are not silently ignored anymore but yield an error. Change-Id: I6453f9f178f61fe6b0303d35f80e4fa8f14cb729 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Make Item::Modules an std::vectorJoerg Bornemann2017-03-233-14/+15
| | | | | | | | | | | | | | Item::Module is too big for being kept efficiently in a QList. Change-Id: I56d160a05cbf1d24038367969e89e8ee5e1b2110 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Add Item::ownProperty for symmetry and use it where appropriateJoerg Bornemann2017-03-235-5/+11
| | | | | | | | | | Change-Id: I721f0db1dde46eea9bf8de74a3052f76bd52dd4b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use Item::hasOwnProperty where appropriateJoerg Bornemann2017-03-232-2/+2
| | | | | | | | | | Change-Id: I5a0108e4433f119d82e72b81e828ad0146a9ad74 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add support for QNX and the QCC toolchainJake Petroules2017-03-221-3/+15
| | | | | | | | | | | | | | [ChangeLog] Added support for QNX and the QCC toolchain Change-Id: Id5b1c451d3ca7c3a1445f2481af3bc4caf90798f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Make JsImports an std::vectorJoerg Bornemann2017-03-224-5/+13
| | | | | | | | | | | | | | JsImport is too big for being kept efficiently in a QList. Change-Id: I8bfc68a44d0feea498435b78a3d2de9977351857 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Support serialization of std::vectorJoerg Bornemann2017-03-221-2/+3
| | | | | | | | | | Change-Id: I6e2b780e1565a99162bfda999ef7361c250978c3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add stlutils.hJoerg Bornemann2017-03-223-0/+75
| | | | | | | | | | | | | | Add a common header file to collect STL-related utilities. Change-Id: Id4bccf68aea2e87a2637988e992615f8681f799a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Replace all uses of QSet with Internal::SetJake Petroules2017-03-2215-51/+73
| | | | | | | | | | Change-Id: I0ba0a39b4f7d8c7c76b869584317b53b85cffc81 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace all uses of QPair/qMakePair with std::pair/std::make_pairJake Petroules2017-03-2220-44/+59
| | | | | | | | | | Change-Id: I1cde37fcf30b066130b9f5ff13743af009a6cb4f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace all uses of QMutex/QMutexLocker with std::mutex/std::lock_guardJake Petroules2017-03-228-17/+23
| | | | | | | | | | | | Change-Id: I5b4518cb241d556f062f85cadd6c8f61887c8ae6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/1.7'Joerg Bornemann2017-03-201-1/+1
|\| | | | | | | Change-Id: Ia6259b79572d7b8b01787f01ec7f40f15dd8f615
| * ModuleLoader: Fix access to temporary objectChristian Kandeler2017-03-201-1/+1
| | | | | | | | | | | | Change-Id: I91a902a438a7fd014f518c351b19d617af1f4707 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace all uses of qMin and qMax with std::min and std::maxJake Petroules2017-03-203-4/+8
| | | | | | | | | | Change-Id: Ia8900b9ff007e4e619772a427d31b3e2c92147df Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/1.7'Joerg Bornemann2017-03-171-9/+57
|\| | | | | | | Change-Id: I93ba9e1596e57f35295771054a2f2ac02055a203
| * Fix setup-toolchains for Visual C++ Build ToolsJoerg Bornemann2017-03-161-9/+57
| | | | | | | | | | | | | | | | | | | | The VC Build Tools can be found in a slightly different location than the Visual Studio registry entries. Task-number: QBS-1114 Change-Id: Ib7dea5e5883271f55371383996e0641e270f3585 Reviewed-by: Yuchen Deng <loaden@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix build on Unix platforms without clock_gettimeChristian Kandeler2017-03-093-18/+47
| | | | | | | | | | | | | | Such as macOS < 10.12. Change-Id: I4ca1b75e16af625ee2d40be3df00f5ca6a99a682 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Re-work linking library dependenciesJoerg Bornemann2017-03-091-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Traverse the dependency graph and collect library dependencies top-down. Do not "push" library information "upwards" when building a library. For gcc, differentiate between "public" and "private" library dependencies. Public library dependencies are added to the command line with -l. Private library dependencies are transitive shared object dependencies of shared objects. Those are added with -rpath-link. Change-Id: I4c0015910b746fb2d996fc9cf3074050512f02d5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ModuleLoader: Fix scope of module child instancesChristian Kandeler2017-03-094-7/+27
| | | | | | | | | | | | | | | | It needs to be the scope of the module instance, not the one of the product. Change-Id: I1502c6299ad0c4b7a3cbb95c0b57f19ef9785b72 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Simplify moc.jsJoerg Bornemann2017-03-091-18/+13
| | | | | | | | | | | | | | | | | | Remove calls to moduleProperty and modulePropertiesFromArtifacts, and replace them with the new syntax. Then the ModUtils import can also go. Change-Id: I705be0d76bd8c03db0f027c22cc2f778132364a8 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Revert "Match a rule's input tags against root artifacts of dependencies"Christian Kandeler2017-03-091-4/+3
| | | | | | | | | | | | | | | | | | | | This reverts commit 4d22a69b8c82c5f1e4cc746a95afc43be7e66893. It's incompatible with how cpp and bundle rules currently interact. Let's revert it for now to get rid of the regressions and investigate whether the rules can be re-written. Change-Id: I38d059e1ca81ace00cd8f10d38fe8bdd9cecc78d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | QRegExp include cleanupSamuel Gaist2017-03-082-0/+3
| | | | | | | | | | | | | | This patch fixes missing QRegExp includes Change-Id: I4d096d80d33f6c15cec8d70e989c69656e55c676 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Handle sub-second timestamps correctly on UnixChristian Kandeler2017-03-085-60/+78
| | | | | | | | | | | | | | | | | | | | | | | | There are file systems that support a more fine-grained resolution than the traditional second. [ChangeLog] Sub-second timestamp resolutions are now supported on Unix systems. Task-number: QBS-1110 Change-Id: I7c819882497511462d868584eb059ac392b155d9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix error message about conflicting artifactsChristian Kandeler2017-03-081-1/+1
| | | | | | | | | | | | | | We printed the wrong code location for one of the products. Change-Id: I62364947220deccd2c176fe979dab4a1e58caa4b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Match a rule's input tags against root artifacts of dependenciesChristian Kandeler2017-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For instance, if you make an object file the target artifact of your product, you want the depending product's linker rule to pick it up, without the need to explicitly add the tag to "inputsFromDependencies". Otherwise, you'd basically have to duplicate the contents of "inputs" in all rules then, which is silly. [ChangeLog] A rule's "inputs" property is now matched against the file tags of target artifacts of products that the current product depends on, in addition to artifacts in the current product. Change-Id: I814cb49f5d8135b7482777dce73f1fa56a44724b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remove usage of moduleProperty() from Qt.core templateJoerg Bornemann2017-03-071-20/+18
| | | | | | | | | | Change-Id: Iffc92f3c2c5205f7e33271ee0ac04ab8f9692538 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add a convenient replacement for moduleProperty()Joerg Bornemann2017-03-074-19/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In rules we can now write product.cpp.defines instead of product.moduleProperty("cpp", "defines") Before requesting a module's property one must check for module existence: if (product.xcode && product.xcode.sdkName === "TheBestSDK") ... The same syntax also works for artifact objects (e.g. from inputs). The old way of requesting module properties via moduleProperty stays intact for the time being. [ChangeLog] Added a convenient replacement for product.moduleProperty("module", "property"), namely product.module.property. Task-number: QBS-889 Change-Id: Ibf78329b8988b2ad632578848f4606dcc82f551c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Clean up [q]fileinfo.h includesJoerg Bornemann2017-03-0610-12/+2
| | | | | | | | | | Change-Id: I9bc57750cf67d20f7c4fc7291c38de406078e339 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Do not yet emit deprecation warnings for loadFile() and loadExtension()Christian Kandeler2017-03-061-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This will flood our users' non-trivial projects with warnings, and fixing them will prevent the project from building with 1.7. Our approach for this kind of thing should probably be: Version x: Public announcement of deprecation Version x+1: Deprecation warning Version x+n: Removal (n == 2, if possible) Change-Id: Id04372074866259e92b92cb11e762828a1ef8efd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Fix QbsProcess::cancel()Christian Kandeler2017-03-022-1/+15
| | | | | | | | | | | | | | | | | | Do proper state checking. In particular, only send a stop packet to the launcher if we are in the running state. This fixes a potential null pointer access when doing dry run builds. Change-Id: Ib3efdd09c4094190c746464718d642b353ae7566 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix detection of default QPA plugin with Qt >= 5.8Jake Petroules2017-03-021-12/+41
| | | | | | | | | | | | | | | | | | QT_DEFAULT_QPA_PLUGIN is no longer written to qconfig.pri, so detect the default plugin using QT_QPA_DEFAULT_PLATFORM_NAME from qtgui-config.h. Change-Id: I64e4b5576784eaa338d14be873300274d7e1f8fb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix FreeBSD host buildsJake Petroules2017-03-021-0/+9
| | | | | | | | | | | | | | | | Clang requires the system component of the target triple to have a specific version number suffix for this platform. Change-Id: I9e02060aec0ea3f7002cc0a86fe75ed0bc265572 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Do not emit warnings for properties set on non-present modulesChristian Kandeler2017-03-011-0/+2
| | | | | | | | | | | | | | | | | | Either the dependeny is required, in which case there will be an error anyway, or it is not, in which case it is implied that setting the property is intended for the success case. Change-Id: I54269ee62e5aea94b11899846e6b5b1abddd323a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Prevent files from getting installed outside the install rootChristian Kandeler2017-03-012-1/+7
| | | | | | | | | | | | | | | | | | That was possible by using ".." in install dir or install prefix. Task-number: QTCREATORBUG-17790 Change-Id: Ib947b11fe361bc061c40b651a0f4a5a4dd7b3074 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix tst_tools::set_reserve for Qt >= 5.7Joerg Bornemann2017-02-281-0/+4
| | | | | | | | | | | | | | Since Qt 5.7 QVector::clear preserves the capacity. Change-Id: I8b67925f331b128557c5962863cbdee333fbe92b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Small code clean-up in ModulePropertiesJoerg Bornemann2017-02-281-13/+11
| | | | | | | | | | | | | | | | Move artifact-specific code to the artifact-specific function. Change-Id: I411abb4bd5a0a567942fe67794e5aa0d0bd3cee2 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Do not use QDir::canonicalPath() in "homeDirectory" autotestChristian Kandeler2017-02-281-5/+3
| | | | | | | | | | | | | | | | Using the canonical path is neither consistent with the implementation nor within the autotest itself. Change-Id: Ifaf97a4b3c2702ca91ef62fa5bcb982ce7265353 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Bump required Qt version to 5.6Christian Kandeler2017-02-275-46/+4
| | | | | | | | | | | | | | | | | | | | | | It seems natural to use the LTS release as the minimum required version, and we get rid of a number of #ifdefs. [ChangeLog] Building qbs now requires Qt 5.6 Change-Id: I327ebb179a20e6372fa5ae765e0f3753fb9e9efa Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Make calls to ScriptEngine::newFunction type-safeJake Petroules2017-02-266-33/+51
| | | | | | | | | | Change-Id: I73a18457f549a5c460540f9f8602ad0805c05d88 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix detection of framework builds of QtJake Petroules2017-02-241-7/+2
| | | | | | | | | | | | | | | | | | This fixes detection of static builds of Qt on Apple platforms, for example. Qt 5.8 broke this since qt_no_framework no longer exists. The else case was never *really* necessary anyways. Change-Id: I038108ccd0f977d71c7fd656e83f4864aab3393e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix Transformer::translateFileConfig signatureJoerg Bornemann2017-02-242-3/+3
| | | | | | | | | | | | | | | | This function should take a const Artifact pointer as it is not supposed to modify the artifact. Change-Id: Ia4fc6d015b0b59b06876c57bde1df6216bb4c4aa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Un-duplicate code in UserDependencyScanner::evaluateJoerg Bornemann2017-02-241-10/+2
| | | | | | | | | | | | | | | | | | Use Transformer::translateFileConfig to create an artifact's JS representation. This removes duplicated code and makes sure that no artifact property is missing. Change-Id: Iba3d5713eb08f2c5a6f1aa84e1cfbe09e3a549f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use range-based for loops instead of iteratorsChristian Kandeler2017-02-2312-73/+58
| | | | | | | | | | | | | | ... where it makes the code simpler. Change-Id: I64cc2bf3c9be80ad7a34529bff2f98f0a466e9f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Command line frontend: Forward process stderr output to stderrChristian Kandeler2017-02-222-6/+8
| | | | | | | | | | | | | | | | Until now, a process' stderr output is printed to stdout if the process did not fail. Fix that. Change-Id: Ica59b486b6b1e4ececcb09e9257bf0e5f9a2ea0d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>