aboutsummaryrefslogtreecommitdiffstats
path: root/doc/reference/jsextensions
Commit message (Collapse)AuthorAgeFilesLines
* Remove documentation for outdated JS extensions to Array and StringChristian Kandeler2023-02-161-24/+0
| | | | | | | | | | | String.{starts,ends}With() are part of ECMAScript 6 and supported directly by QuickJS. {String,Array}.contains() are superseded by ECMAScript's includes(). Deprecating them would needlessly annoy users, but we shouldn't encourage their use either. Change-Id: Ie0828ba0f78b0235e4b0a3127e56dc8fc2cc46dd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Merge branch '1.23' into masterIvan Komissarov2022-08-221-4/+4
|\ | | | | | | Change-Id: I1640aa670bd12be70b794286deda4d420bb491df
| * doc: fix types in Host serviceIvan Komissarov2022-08-151-4/+4
| | | | | | | | | | | | | | This amends 54ec5e8851f0573beb466ddec2e20a1f3c2b7f7a. Change-Id: Ie2b5d7fa18b2df1776e8c33ab84c6e3c72322a2a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add executableSuffix to the FileInfo serviceRaphael Cotty2022-08-081-0/+7
|/ | | | | Change-Id: I86c24c6ad1ea0daf298b71501a6719c8b2650c1c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Create Host service and update FileInfoRaphael Cotty2022-02-012-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to use PathProbe and BinaryProbe in module providers, the qbs properties used in the probes will be replaced by the Host and the FileInfo services. The new Host service implements these host related properties: architecture, os, platform, osVersion, osBuildVersion, osVersionParts, osVersionMajor, osVersionMinor, osVersionPatch, nullDevice The FileInfo service implements these properties: pathSeparator, pathListSeparator Task-number: QBS-1612 Change-Id: Icecde3d82a531a5b143ce150ffd544ee674e6f4d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* doc: add a note about timestamps in File.copyIvan Komissarov2021-02-261-0/+3
| | | | | | Task-number: QBS-1634 Change-Id: I8098253e3858e114028017e7543494f9ba519160 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix documentation warningsRichard Weickelt2020-10-2511-11/+0
| | | | | | | | | | | The \contentspage command is obsolet without replacement. It has not been working since Qt5.2. The link to the Qt resource system does not work locally and should point to the online page instead. Change-Id: Ib065cfd26c90b60d3cd3d72820b16c6601e80ad4 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Add atEnd() function to the Process serviceOla Røer Thorsen2019-01-031-0/+7
| | | | | | | | | | | | This makes it possible to use readLine in a while loop until the complete stream is read, even when reading empty lines. [ChangeLog] Added atEnd() function to the Process service, to make it possible to use readLine() in a while loop until the complete stream is read. Change-Id: Ie5f047651977195d6a93c4575bd7a8796b83ab5d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add FileInfo.canonicalPathJoerg Bornemann2018-12-201-0/+12
| | | | | | | | | [ChangeLog] Added the canonicalPath() function to the FileInfo extension. Task-number: QBS-742 Change-Id: I8490b1bbdb3ac4ce84b80e82ca9f37bd2816e150 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add FileInfo.suffix and FileInfo.completeSuffixJoerg Bornemann2018-05-021-0/+14
| | | | | | | | [ChangeLog] Added FileInfo.suffix and FileInfo.completeSuffix. Change-Id: Ic74a2fcff2f3f1271fa60ac33b96a4c5a4d0e93d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Doc: Fix documentation for the Xml serviceJoerg Bornemann2018-04-181-37/+37
| | | | | | | | | | Document the Xml service instead of the deprecated XmlDom* imports which were not working with the require() syntax. This amends commit 9f6ee4c3. Change-Id: Ib7e85dea7e0d1bdc77170e95a2a79e9a1a294284 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Doc: Add docs for the DomXml JavaScript extensionLeena Miettinen2018-02-131-0/+342
| | | | | | Task-number: QBS-1281 Change-Id: I56f2fb8e75dd0eb8e1da7a8478dcacc53cbbda5a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add documentation for FileInfo.{to,from}NativeSeparatorsChristian Kandeler2018-02-121-0/+14
| | | | | | | Task-number: QBS-1279 Change-Id: I9465777e9fa70394ed0ae6721f6fd368d2e49dfe Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Add docs for Utilities.cStringQuote and Utilities.versionCompareLeena Miettinen2018-02-091-3/+29
| | | | | | Task-number: QBS-1289 Change-Id: I303edb0c0dabde6c78791a943faaaa325e613171 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add BinaryFile service to manipulate binary filesDenis Shienkov2017-11-071-0/+114
| | | | | | | | | [ChangeLog] Added the BinaryFile service for reading and writing binary data files. Change-Id: I93378c448a367472c4dd9ad5e715f70d88d7f58e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add TextFile.Append for appending data to text filesJoerg Bornemann2017-08-211-1/+3
| | | | | | | | [ChangeLog] The TextFile.OpenMode TextFile.Append was added to enable appending data to text files. Change-Id: I431e8652033d632fe6a85dafc7dc8bcd5e6d0279 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix FileInfo autotest and documentationChristian Kandeler2017-07-141-1/+1
| | | | | | | | Our choice for an example was a bit unfortunate, as leading slashes have a special meaning on Windows. Change-Id: I0efeb9618751e54409952dd0c3e173348eb48ccd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add FileInfo::cleanPath()Christian Kandeler2017-07-131-0/+7
| | | | | | | [ChangeLog] Added the FileInfo::cleanPath() function. Change-Id: Iff3cab134530a6a726bb346dbaa492469f6d90ad Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add TextFile::filePath()Christian Kandeler2017-07-131-0/+6
| | | | | | | | | | When we pass a TextFile object around, we want to be able to refer to its file name without dragging this information along. [ChangeLog] Added the TextFile::filePath() function. Change-Id: If99dd11eaae7607d26dcac2e7c3cedf57679591e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix copy/paste error in TemporaryDir documentationChristian Kandeler2017-02-241-1/+1
| | | | | Change-Id: I42ff395753e9e0efd1412e76f9df2ce47b09727a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Deprecate loadFile and loadExtension in favor of requireJake Petroules2017-02-151-17/+10
| | | | | | | | | | | | This is more in line with mainstream JavaScript (especially node.js) which uses the CommonJS/RequireJS scheme for loading external modules. [ChangeLog] The loadFile and loadExtension functions are deprecated in favor of the new require function, which accepts arguments of either form accepted by the deprecated functions. Change-Id: Icc00aa3eb7c136a5be787f28ef38435e4ce261bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Update license headersIikka Eklund2016-08-299-153/+125
| | | | | | | | | | Patch-set 3 includes rest of the files. Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: I55ed96910b5cb13513f80eb118feafcdaa32e8b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Do the OS X to macOS rename.v1.5.2Jake Petroules2016-06-271-1/+1
| | | | | | | | | | | | | | | | | [ChangeLog] The "osx" value in qbs.hostOS and qbs.targetOS has been replaced with "macos". For backwards compatibility, qbs.hostOS will still contain "osx" in addition to "macos", and an error will be printed if qbs.targetOS contains "osx" but not "macos". Specifying "macos" without "osx" is allowed. These checks are subject to be removed in a future version of qbs, so update your hostOS and targetOS checks accordingly. [ChangeLog] cpp.minimumOsxVersion has been deprecated and replaced with cpp.minimumMacosVersion. cpp.minimumOsxVersion is subject to be removed in a future version of qbs, so update your projects accordingly. Change-Id: I479891829dff6eb6750cb2a04e1395f085896f63 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-069-9/+9
| | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Introduce Array.containsAll and Array.containsAny.Jake Petroules2016-03-251-0/+14
| | | | | | | Use where appropriate. Change-Id: Iaade46eab682e32d490dc718ec637930f4611c6c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Roll the global getEnv and currentEnv functions into Environment.Jake Petroules2015-12-012-14/+72
| | | | | | Change-Id: Ife3f9c53ad3fb43364c53fe7c6c08aa3983b9221 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Move global auxiliary functions into a new Utilities extension.Jake Petroules2015-11-272-17/+59
| | | | | Change-Id: If0f12b9d28b83080f4435d91b55d70d5cff5d42e Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Implement some of the non-standard yet common Console API.Jake Petroules2015-09-151-0/+51
| | | | | | | | | | | | | | | This solves the problems with print() going to unredictable streams on some platforms due to possible QtScript bugs. It also provides logging integration with IDEs, and stylizes error and warning output with "ERROR: " and "WARNING: " prefixes and colors in color-capable terminals. Refactor autotests to accommodate. Task-number: QBS-548 Change-Id: I11767d51d3c2e7a97ca2b67e54377350aec2458d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Implement the FileInfo extension in C++.Jake Petroules2015-08-241-2/+6
| | | | | | | | This provides additional functions and reduces code duplication and implementation behavior divergence. Change-Id: I5ef216c6314208a03ab33bd5f38646307fdcb7fd Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* File extension: add rename functionality.Jake Petroules2015-08-121-0/+9
| | | | | Change-Id: Ia7356e283cad26efcd7b320077055f80545f4c64 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* TemporaryDir extension: turn off auto remove.Jake Petroules2015-08-101-1/+1
| | | | | | | | This fits better with the JS try..finally idiom, as opposed to RAII in C++. Change-Id: I9c9ecca2f4d17fa1ecf8e085423561c03c3108f4 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Merge branch 1.4 into master.Christian Kandeler2015-07-311-0/+71
|\ | | | | | | Change-Id: I2ff37ef7c00063f738f7691071c4b638dd2dc7c8
| * Introduce the TemporaryDir JS extension.Jake Petroules2015-07-281-0/+71
| | | | | | | | | | | | | | Essentially a mirror of the QTemporaryDir API. Change-Id: Iaf436ba67cddc4c62027da4dabd3c7bb3442a6f4 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge branch 1.4 into master.Christian Kandeler2015-07-243-2/+9
|\| | | | | | | Change-Id: I79f2638a024a807151a12d1f0b701d6533a3311f
| * Doc: Use passive formOrgad Shaneh2015-07-172-2/+2
| | | | | | | | | | Change-Id: I714911fb825a366491a18904b7cc2f30233a135e Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| * Initialize qbs.commonRunEnvironment from the current environment.Christian Kandeler2015-07-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | We used to start with an empty map, which leads to modules' setupRunEnvironment scripts overwriting the environment instead of enriching it. For instance, when an application built with qbs was run from Qt Creator, it did not get the environment specified by the user, but only what qbs' scripts set up. Change-Id: I13bcba8f051d773cc135dc7bb91440a88b2c18c4 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Add a File.directoryEntries function to list directory contents.Jake Petroules2015-06-101-0/+7
| | | | | | | | | | Change-Id: I5470ecfa79d93207858ab661ff8e5e2cf80b75c8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge branch 1.4 into master.Christian Kandeler2015-06-041-0/+7
|\| | | | | | | Change-Id: Ifafb8cbfbbf7a94738c302c79727de2d8cdf64d5
| * Introduce, document, and use File.makePath.Jake Petroules2015-05-291-0/+7
| | | | | | | | | | Change-Id: I423d2019ce471c071605b36d2f36dcb59a0fb22c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Added method closeWriteChannel to Process classSergey Belyashov2015-04-271-0/+8
|/ | | | | | | | This method is required for programs which reads stdin until EOF. Change-Id: Ic86bfc4cd18d01049669f5d5480b83d618ae4baa Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* update license headersJoerg Bornemann2015-03-026-12/+12
| | | | | Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Merge remote-tracking branch 'origin/1.3'Joerg Bornemann2015-02-061-0/+8
|\ | | | | | | | | | | | | | | | | Conflicts: doc/doc.pri tests/auto/blackbox/tst_blackbox.cpp tests/auto/blackbox/tst_blackbox.h Change-Id: Ic69a6e87ff6f1cf74cb43ec76ac1a6e4a1c02c8d
| * Add documentation for Process::setCodec().Christian Kandeler2015-02-021-0/+8
| | | | | | | | | | Change-Id: I9898bc60abda04cdec42d91d0c5f3c9cdd934600 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Merge branch '1.3' into 'master'Christian Kandeler2015-01-286-37/+37
|\| | | | | | | | | | | | | | | | | Conflicts: doc/reference/jsextensions/jsextensions-general.qdoc src/lib/corelib/language/evaluatorscriptclass.cpp src/lib/corelib/language/evaluatorscriptclass.h Change-Id: Ic9b77b56e8fc8bf93e0a553930757de8c93fed22
| * Update LicenseEike Ziller2015-01-266-36/+36
| | | | | | | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Use a hashing function to construct output artfact file paths.Christian Kandeler2014-11-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Modules like cpp need a way to construct unique locations for output artifacts, but the current approach of duplicating the path to the input file in the build directory can lead to excessively long file paths that hit the limit on Windows. So let's hash the path to the input file instead. Change-Id: I47dcd242d0ee90c377f2a6df8e270bbefbaf082f Reviewed-by: Thomas Epting <thomas.epting@stryker.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Support converting a PropertyList object directly to/from JSON.Jake Petroules2014-11-061-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | This is more efficient as there is no longer a need to convert back and forth between strings when attempting to access the plist data. As a side effect, this allows GUI applications to be built on OS X < 10.7 (not that it matters). Task-number: QBS-364 Change-Id: Ice716a2cc257efc5377049992267b927c0424d65 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Consolidate "safe identifier" code by introducing qbs.rfc1034identifier.Jake Petroules2014-11-041-0/+8
| | | | | | | | | | | | | | | | | | | | Instead of duplicating this logic in three places across two languages, it's now implemented in a central location in C++ and exposed to JavaScript. As an intentional side effect, build directory naming now uses - instead of _ as per the RFC 1034 name charset. Change-Id: I1a7c3ec45efc5b29f9a05067e4c2cf640af4a7aa Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | remove qbs.getHostOS()Joerg Bornemann2014-10-291-8/+0
| | | | | | | | | | | | | | | | The weird hostOS: getHostOS() indirection isn't needed anymore. I'm feeling lucky, therefore I claim that nobody used getHostOS(). Change-Id: I77f365ec2d736b0c37ce979da761f9f9ae250a31 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Merge remote-tracking branch 'origin/1.3'Joerg Bornemann2014-10-166-43/+48
|\| | | | | | | | | | | | | | | Conflicts: qbs_version.pri version.js Change-Id: I645b2f37bae9d36d4bca54b267d57df8b0b7fd21