aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/javascript
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Improve shared javascript resources phrasingPaul Wicking2018-06-251-9/+18
| | | | | | | | | | | Make the text less ambiguous. Reformat comments in code examples, as they mess up formatting in rendered content. Task-number: QTBUG-56028 Change-Id: I296839e4e102d25d1a943a5766f37ba5521bdb81 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-193-3/+3
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Remove erroneous examplePaul Wicking2018-04-091-10/+8
| | | | | | | | | | The current documentation is not current anymore. Removed faulty example and added link to relevant page for more information. Task-number: QTBUG-67082 Change-Id: Ic2d29ab358b227289480d9986679676048a35821 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve documentation on component creation contextMichael Brasser2018-03-081-1/+1
| | | | | Change-Id: I55adc9c261529ee4b88fbb5591b3955e396437a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-2412-60/+60
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix outdated FDL license headerKai Koehne2017-10-1712-60/+60
| | | | | | | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | qml: Override the new Object::instanceOf hook to allow QML type checkingRobin Burchell2017-03-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml] The instanceof keyword in JavaScript has been extended to work on QML types and instances. This means that you are now able to use it to verify that a var is indeed the type you expect (e.g. someVar instanceof Rectangle). Note that one of the added tests revealed a slight shortcoming in the QML type system (QTBUG-58477). For now, we should keep consistency and work to address the problem universally in the future. Change-Id: I7d9bf9b64cfd037908de1ae51b01065eacb95abe Task-number: QTBUG-24799 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-281-4/+4
|\| | | | | | | Change-Id: I92b13a9c1727644d63e125c1e6f1fdac72720ad7
| * Doc: added requirement for importing JavaScript resourcesNico Vertriest2017-02-211-4/+4
| | | | | | | | | | Change-Id: I4426eb90ad4d87d63e0f0353dfbea88298e263c9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add String.prototype.repeat from ECMAScript 6Robin Burchell2017-02-091-0/+1
|/ | | | | Change-Id: I0ec59436e2dd1cd2e20e14434bc9753b09882238 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-4/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderers added in 5.8 had to be adapted to the changed profiling macros from 5.6. Conflicts: src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp src/quick/util/qquickprofiler_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
| | * Doc: fix incorrect syntax in "Code-Behind Implementation Resource"Mitch Curtis2016-11-251-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ie86302f12d4ad65ff46335a1ea248bbb4c5559f3 Task-number: QTBUG-56008 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Add ECMAScript 6 Array find and findIndex methodsKai Uwe Broulik2016-11-101-0/+2
| | | | | | | | | | | | | | | Change-Id: I318fa243ab68b8a714923ab816d62e8c544fca8c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Remove a statement from the documentation that is now false.Jake Petroules2016-10-041-1/+1
|/ / | | | | | | | | | | | | Change-Id: Iccee5621ab1ed436d7c07093fd7ad91857a4075b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-171-1/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h src/qml/qml/qqmlobjectcreator.cpp Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
| * Clarify doc on modification of the global object in JS imported by QMLMitch Curtis2016-08-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, reading the documentation for modification of the global object in JavaScript can be confusing. http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html says: JavaScript code cannot modify the global object. In QML, the global object is constant - existing properties cannot be modified or deleted, and no new properties may be created. ... Any attempt to modify the global object - either implicitly or explicitly - will cause an exception. If uncaught, this will result in a warning being printed, that includes the file and line number of the offending code. http://doc.qt.io/qt-5/qjsengine.html#globalObject says: Returns this engine's Global Object. By default, the Global Object contains the built-in objects that are part of ECMA-262, such as Math, Date and String. Additionally, you can set properties of the Global Object to make your own extensions available to all script code. Non-local variables in script code will be created as properties of the Global Object, as well as local variables in global code. If QQmlEngine "is-a" QJSEngine, and QJSEngine can have its global object modified, it might seem reasonable to expect that imported JavaScript code should be able to modify the global object. This patch aims to be more explicit about the restrictions and give examples of how libraries should expose their APIs correctly for use by QML code. Change-Id: I11beb894a88d52038be90ffe6baa9337943810db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-091-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlcomponent.cpp tests/auto/quick/scenegraph/tst_scenegraph.cpp Change-Id: Ibc811b95a57f175ca53337db7bbd1f575a745937
| * Fix grammar in JavaScript Host Environment docMitch Curtis2016-08-041-2/+2
| | | | | | | | | | | | Change-Id: Ib7bc3f62fc27e982f59f1c8b2c2e0cf26306c3b9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Document Number value properties in functionlistKai Uwe Broulik2016-04-281-0/+11
| | | | | | | | | | Change-Id: I07db1549332759e2b1fb6ee70de18092862f328c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Add some ECMAScript 6 Number and Math methods and propertiesKai Uwe Broulik2016-04-281-0/+10
| | | | | | | | | | | | | | | | | | This adds the Number.EPSILON property, the Number.isFinite, Number.isNaN, and Math.sign methods introduced in ECMAScript 6. Change-Id: Ib16408a63c202a4ef30a14334f65ac3a1a13cfaf Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Add string search functions from ECMAScript 2015.Michael Brasser2016-04-251-0/+3
|/ | | | | Change-Id: I46d5e42186d9f1b2994778de967610725b0e0633 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Missing early n in co[n]version.Edward Welbourne2015-10-211-1/+1
| | | | | Change-Id: I7ca28b42797a8f0781706af4ffd3e8f0dac41aa3 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: solved various qdoc errors qtdeclarativeNico Vertriest2015-10-201-7/+7
| | | | | | Task-number: QTBUG-43810 Change-Id: I2e9fa91d63c5998df50f3678e485135e8518916d Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+3
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Link to JavaScript Environment Restrictions doc from Global Object docsMitch Curtis2015-09-141-2/+2
| | | | | | | | | | | | | | | | I added the note to the global object documentation in 81dad6e, but I wasn't aware that a more detailed section existed elsewhere. Change-Id: I2b8c1c6ade0d9f27d489a246839ade89ee868a28 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| * Document that modifying the globalObject of QQmlEngine is not supportedMitch Curtis2015-09-091-1/+3
| | | | | | | | | | | | Change-Id: I62feb04ae26b6988c6e392b27bd1c3b7f630fd57 Task-number: QTBUG-48175 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Doc: replaced \keyword with \target when not at top of pageNico Vertriest2015-09-281-1/+1
|/ | | | | | | Change-Id: I20bc53c71d6c3217ec51a3fd5ad8e5a38bb2043b Task-number: QTBUG-48482 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: resize tables with overflowNico Vertriest2015-06-251-2/+2
| | | | | | Task-number: QTBUG-46475 Change-Id: Iebb2f7677f8b514d2b3e08480abfc98a0e155c1c Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Doc: document work-around for static builds using dynamic object creationRichard Moe Gustavsen2015-06-181-0/+9
| | | | | | | | | Currently we have no system to detect import dependencies that are not explicitly added to a QML file (other than qmldir "depends", which is for plugins only). Until we do, document the work-around. Change-Id: Ic7244728b63bd1f2eb4bf9734474b3e6e48e26fe Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1212-72/+72
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* support XMLHttpRequest sync modeTasuku Suzuki2014-12-261-1/+0
| | | | | | | [ChangeLog][QtQml][XMLHttpRequest] Supported synchronous requests Change-Id: Ia38fcf97f212a14657bb519240d8406368a72390 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Document behavior of JavaScript Date with negative yearsUlf Hermann2014-12-121-0/+19
| | | | | | Task-number: QTBUG-29491 Change-Id: Icc9620abc3bc606f1cd0ab89762f370ac259893e Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Doc: Updated the code snippets for the toLocalexxx functionsVenu2014-10-241-3/+3
| | | | | | | | | | Using Date() as a regular function without the new operator returns a string and not a date object. Change-Id: I083bb62c0cb3041a053d43e3085c3d0d10423db6 Task-number: QTBUG-41712 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Doc: Add a keyword for XMLHttpRequestTopi Reinio2014-08-121-1/+1
| | | | | | | | | | To make the search term 'XMLHttpRequest' return relevant results in the Assistant, add a keyword for it. Task-number: QTBUG-40240 Change-Id: I44b0d397cd014d2468e6302d4293c959ec8c8802 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Doc: Remove duplicated wordsTopi Reinio2014-08-121-1/+1
| | | | | | | | Removes duplicated (repeated) words and fixes other minor documentation issues. Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Doc: Clarify where JavaScript fits in QML codeSze Howe Koh2014-06-132-47/+42
| | | | | | | | | | | | | | | | | - Rewrite the introductory list. - Rewrite the section about application startup code. - Flatten sections. Previously, there were two \section1 headings: "JavaScript Expressions in QML Objects" and "Running JavaScript at Startup". This split wasn't very natural, as startup code needs to be called from an object, while imported JS files aren't in objects. - Some minor formatting/wording changes in unrelated areas. Change-Id: Ie08f94e2ea77ca84f80491c782bc30612f7ef698 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Updated "Qt Quick Examples" pages.Jerome Pasion2014-06-051-3/+4
| | | | | | | | | | | -added instructions about running the example (using \include) -used the example names as sections in the collection pages -general editing and documentation polishing -updated copyright information Change-Id: I044f29fcc1921a541040505d5821acb06dc4cb35 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Describe property bindings in terms of relationshipsSze Howe Koh2014-05-162-24/+21
| | | | | | | | | | | | | | | | | | | | | | | - This patch aims to help readers think about bindings more "declaratively" by introducing a new (albeit very leaky) level of abstraction: Treat bindings as finitary relations, rather than mere JavaScript expressions. - In essence, property bindings are for describing relationships between properties. The fact that the QML engine reactively updates a property's value when its dependencies change, and the fact that arbitrarily complex expressions are valid bindings, are simply implementation details. - Discourage the use of side effects in property bindings. They are not essential for the main purpose of property bindings, they break the finitary relation model, and their use can reduce code readability/maintainability/toolability. - Discourage complex property bindings for similar reasons. Change-Id: I5a0a03bd02768d4c504797a0f86569f3ac066e96 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Document signals (not handlers) under \qmlattachedsignalSze Howe Koh2014-03-281-2/+2
| | | | | | | | | | - They're not "attached properties" either. - Append the handler names to the end of the corresponding signal doc. - Update descriptions and links Task-number: QTBUG-35846 Change-Id: I54e93187b3209546ec344a20e0482c98d7f14109 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix broken \qmlsignal linksSze Howe Koh2014-03-181-5/+5
| | | | | | | | Fix the breaks caused by the re-categorizing of \qmlsignal pages Task-number: QTBUG-35846 Change-Id: I528ae16ec522fc902133e22d8f53c87a7f0d56ad Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-12-301-1/+1
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-052-4/+4
| | | | | | Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Revert commit d818575966e2e2000fe2b7ee390c620f595d9825Simon Hausmann2013-10-211-9/+0
| | | | | | | | | | | | This reverts the commit that deprecated the with statement and added a note to the docs that binding expressions will be compiled in strict mode in Qt 5.2. It turns out that we had to keep the with statement and enabling strict mode breaks just too much unfortunately. Change-Id: Id38c27f684fbfcb6b6b848be8f691658089d1adb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-024-22/+22
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Updated imports, \qmlmodule, and \inqmlmodule versions in src/qml.Jerome Pasion2013-09-273-3/+3
| | | | | | | | | | | | -QDoc ignores the version in \inqmlmodule so its better to remove them to avoid confusion. -Qt QML import version is 2.2 for 5.2 release -Qt Quick import version is 2.2 for 5.2 release Task-number: QTBUG-32172 Change-Id: I15df270f1fb4df0476a9ddd854fb9ddf58e9fc7c Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Import QtQml instead of QtQuick now that Locale is available there.Mitch Curtis2013-09-251-1/+1
| | | | | | | 97feace2aaaf08075c17ea175a5ed0c12aa40a0d made it available. Change-Id: I4a263a26c1db164f410c49fe0fca776aed53f7e8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Improve QML Date object documentation.Mitch Curtis2013-09-171-7/+97
| | | | | | | | | | | | | | | | | Carrying on from https://codereview.qt-project.org/#change,61255, I've added documentation for the from*String() functions, as they weren't actually documented. I've also formatted some arguments and linked to Locale documentation where the format enums are mentioned. Note that, because of QTBUG-32505, I can't link to the format enum directly, so I just link to the Locale page itself. The import QtQuick 2.0 should also be removed from the documentation when that bug is fixed. Task-number: QTBUG-32492 Change-Id: I19c6c8450746ef2a68bc55fd3ef7db776f4acc35 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Move properties of Locale QML type to correct moduleTopi Reinio2013-09-172-2/+2
| | | | | | | | | Moves property and method documentation for QML Locale type from Qt Quick to Qt Qml module, and fix a number of broken links in locale-related docs. Change-Id: Id9e01314ea867987f5159ca3bffcc40abb27b289 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Link between "QML Basic Type: date" and QML Date object documentation.Mitch Curtis2013-07-231-1/+2
| | | | | | | | | | The basic date type seems useless if you don't know it can be used as as JavaScript date (with QML extensions). Task-number: QTBUG-32492 Change-Id: I14962f4e57522f5515f0e78d484aa59fcd9dff3c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>