aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Use input handlers and controls wherever appropriateVenugopal Shivashankar2018-11-012-193/+195
| | | | | | | | In addition, changed the \section titles to sentence case. Change-Id: If62cc8f2a3f6a99123ccfb4d030d3f58a2fe8dea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: make QML type naming rules more searchableMitch Curtis2018-11-011-1/+12
| | | | | | | | | It is possible to find the rules via a web search, but it can be made easier by giving the section its own descriptive name. Task-number: QTBUG-71505 Change-Id: Ibbf8768c7570d09b0a4bc3026632730f7e8c1c02 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a brief section about security of JavaScript with QtSimon Hausmann2018-10-301-0/+12
| | | | | | | | | Emphasize that the model is the same as with C++ (or QML for that matter), in the sense that only trusted code should be evaluated. Change-Id: Idd377af76ac7ebeb9f92a9ccc359c612f73e8bef Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-10-301-0/+2
|\ | | | | | | | | | | | | | | | | Conflicts: src/imports/settings/qqmlsettings.cpp src/quick/items/qquickwindow.cpp tools/qmlplugindump/main.cpp Change-Id: I3e5dae4de25b2da961a572b3a4bd151181d211c9
| * Document that aliases cannot point to attached propertiesMitch Curtis2018-10-091-0/+2
| | | | | | | | | | Change-Id: I0acef28542e5322cf3de23ec7fcb571513ccb673 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Use a macro to resolve the QML import versionTopi Reinio2018-09-143-18/+19
| | | | | | | | | | | | | | | | | | | | | | QDoc now supports macros for its command parameters, as well as passing parameters to \code and \qml commands. Use these together with the new \QtMinorVersion macro to automate bumping the QML import versions within documentation. Task-number: QTBUG-67818 Change-Id: I8b5300749880421a0d7cdacc1b2c0f96b3b7ef67 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-111-0/+4
|\| | | | | | | Change-Id: Ieaf0811cf045af1e6df4db4ab67d7c38ba0d1fbf
| * Doc: Fix broken linkPaul Wicking2018-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | Add missing external page reference to resolve link. Fixes: QTBUG-70130 Change-Id: I3af162c619ba88d425a7714fbf20f45f7b3213ab Task-number: QTBUG-70130 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Provide option to skip registration of enum classes unscopedRainer Keller2018-08-211-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enums classes are registered unscoped which leads to clashes in the following cases: 1. Two different enums contain the same values 2. The name of an enum class is the same as an enum value In the 2nd case you can not even access the scoped enum at all because it will be overwritten by the primitive type. Users can now add a class info to the meta type to disable the unscoped registration which solves all clashes. The default is kept as is. class MyClass : public QObject { Q_OBJECT Q_CLASSINFO("RegisterEnumClassesUnscoped", "false") public: ... }; [ChangeLog][QtQml] Added option to disable unscoped registration of enum classes. Change-Id: Ifa4197a14a252575e8a25ae56fb6ee479addf80b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-011-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I654a2a4b34dadc7cb7d85625b86f54691ad5904a
| * Doc: Use [] instead of new Array() in snippetPaul Wicking2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | This change removes warning about using new Array() as constructor with the snippet in Qt Creator. Task-number: QTBUG-65891 Change-Id: I858601c21d703e4226db4f4c4d9ef52ec6418ed8 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: bump import version to 2.12Shawn Rutledge2018-07-242-5/+5
| | | | | | | | | | | | | | | | | | This is important since 2.12 is LTS and because Input Handlers are now included. Change-Id: I09417eb873ed7971fc768dddb916954d46091a6b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-162-9/+11
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickloader.cpp tests/auto/quick/qquickanimations/tst_qquickanimations.cpp Change-Id: I0cb9f637d24ccd0ecfb50c455cc210119f744b02
| * Doc: Update QTime to JavaScript Date conversion descriptionPaul Wicking2018-07-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * Update description as the behavior changed with 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68. * Remove implementation details from description (the specific date), as it may be subject to change. * Simplify a needlessly complicated explanation. Task-number: QTBUG-68516 Change-Id: Ibc25a9923d8c996c47927964cd69b5bd7bbe0240 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Mark the \snippet statements with a .pro fileVenugopal Shivashankar2018-07-021-0/+2
| | | | | | | | | | | | | | | | | | Conditionally excluding such statements is required to avoid irrelevant content in documentation in some cases. Change-Id: If6751608dc438de6f7cc0376ffc36f8d994afba6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-291-9/+18
|\| | | | | | | Change-Id: I800f39ea59efd6049d3226ec27b8ecb3f6e9ae28
| * 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: Remove hint to use not recommended constructorRainer Keller2018-06-251-3/+0
| | | | | | | | | | | | | | | | | | The documentation of QQmlListProperty states that this constructor should not be used in production code. Removing this statement prevents users from unintentional usage. Change-Id: I19130204384d5dbef79cec828de49a628af60c02 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-254-10/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
| * Doc: Move literal codeblocks to snippet filesVenugopal Shivashankar2018-06-221-6/+2
| | | | | | | | | | Change-Id: Iff45ea6cf414717fd1cb0a194eef390a9f153838 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-194-4/+4
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Provide API to access singletons associated with a QQmlEngineRichard Weickelt2018-06-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds allows C++ code to retrieve the instance of a registered singleton type. Until now this required a deturn via QML expression. Two methods are added to QQmlEngine: A generic one that encapsulates all singleton objects in a QJSValue and a template function for QObject-derived singleton types. An additional convenience function is added to query the QML type id. This function may also be used for other purposes in the future. [ChangeLog][QtQml][QQmlEngine] Added API to access singletons associated with a QQmlEngine. Task-number: QTBUG-39970 Change-Id: I67c132ede35f80b9aaf1c5e5456715cf4f1b0848 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Ensure identical behavior for singleton types defined in C++ and QMLRichard Weickelt2018-06-081-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Singleton types defined in C++ have no QML context. Therefore, both qmlContext(obj) and qmlEngine(obj) return zero. Although documented, this behavior is surprising and inconsistent with singleton types defined in QML. The current behavior was decided upon in QTBUG-23116. This patch puts C++ singleton types into a sub-context of the root context by default, just like it is the case for QML-defined singleton types. This doesn't cause any harm, but avoids surprises. It also fixes a bug in QmlTypeWrapper that returned an invalid QVariant for QJSValue singletons. Task-number: QTBUG-38583 Change-Id: Id1d48ecdc49f0e22714857a1b49b457885889e5e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Minor tweak to the docs for sequence typesSimon Hausmann2018-05-021-2/+2
|/ | | | | | | | | | Let's clarify that they behave like arrays but aren't strictly arrays. The paragraph further down emphasizes that as well, but it makes sense to soften the wording in the introduction sentence. Task-number: QTBUG-67775 Change-Id: I7cce6a21acde0a69858bbc9d41cea6674c488228 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Document latest QtQml.StateMachine import version to be 2.11Kai Koehne2018-04-201-1/+1
| | | | | | | | | Since commit 214fbaa57b73296a0 the latest minor version of the import is automatically the Qt minor version, so let's also document this. Change-Id: I61a1015d74beaeac9d7a2aecd73e3f05c8a545c9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Document latest QtQml import version to be 2.11Kai Koehne2018-04-202-4/+4
| | | | | | | | | Since commit 214fbaa57b73296a0 the latest minor version of the import is automatically the Qt minor version, so let's also document this. Change-Id: I232dcef923f3dfa5a6a2377bc8297b07fbe01f37 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Bump QtQuick import to 2.11Kai Koehne2018-04-191-1/+1
| | | | | | Task-number: QTBUG-67786 Change-Id: Ie371d4c931ce31f728cdd960ad454e26c40cc4ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Fix missing \endcode errorKai Koehne2018-04-191-1/+1
| | | | | | | This got introduced in commit 67c9f735ce. Change-Id: I61a9a3886125cebe64f9eaa5ae1c7b8d226b2e1c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add note about revisions for grouped and attached property objectsMitch Curtis2018-04-161-0/+2
| | | | | | | If they're not supported, it should be documented. Change-Id: I9219db1c9d31666e005074a863b04438052b3f05 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Document QObject::setProperty()'s behavior in relation to bindingsMitch Curtis2018-04-161-2/+17
| | | | | | | | | Make it clear that setting a property via QObject::setProperty() will not break any binding already set on that property. Task-number: QTBUG-67451 Change-Id: Id032c2217a46133d1d6728598f79682dff459897 Reviewed-by: Simon Hausmann <simon.hausmann@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 for qmlRegisterType<Foo>()Mitch Curtis2018-04-051-0/+68
| | | | | | | | Explain when it should be used. Task-number: QTBUG-67332 Change-Id: I759a192778a0370831f44b871e58c5ee49d3fe3c Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Link to C++ => QML flowchart in QML registration function docsMitch Curtis2018-04-051-4/+13
| | | | | Change-Id: I684bf2c461be5ebc78df06c816a0717d5958e0de Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Add a section on scalable application UIVenugopal Shivashankar2018-04-051-3/+2
| | | | | | | | Also fixed a grammar issue and a few broken links. Change-Id: I807da06536d6a9101e67fd73858cbbfe90d00663 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: add a flowchart to aid choosing the correct C++ => QML integrationMitch Curtis2018-04-051-0/+6
| | | | | | | | | | | http://doc.qt.io/qt-5/qtqml-cppintegration-overview.html is currently a scary wall of text. A flowchart is something that is very easy to follow, making it much easier for users to choose the correct C++ => QML integration method for their situation. Change-Id: If684126395054c69e4583844aa0d7c0ff525c7a1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Add Qt Quick usage guidelinesVenugopal Shivashankar2018-03-131-0/+29
| | | | | | Task-number: QTBUG-15757 Change-Id: I9193ed459ced63cceb819a66f5a8c76042f455b6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Improve documentation on component creation contextMichael Brasser2018-03-081-1/+1
| | | | | Change-Id: I55adc9c261529ee4b88fbb5591b3955e396437a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* doc: Correct mostly linking errorsMartin Smith2018-02-232-3/+3
| | | | | | | | | This update corrects many qdoc warnings, mostly of the "Can't link to..." variety, but there were also a few qdoc comments added. As of this update, the qdoc warning count is 46 in QtDeclarative. Change-Id: Icf2d34c7ce7010ebfd9b474feacfe8af42f3fd5f Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-023-0/+29
|\ | | | | | | Change-Id: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
| * Doc: add C++11 lambda examples for qmlRegisterSingletonType()J-P Nurmi2018-02-021-0/+25
| | | | | | | | | | | | Change-Id: I444137fd10041781df232447b8e2bf712582f079 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Disallow registration of types beginning with lowercase lettersMitch Curtis2018-01-312-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allowing types with lowercase names causes ambiguity, as can be seen in QTBUG-43567 and the comment in IRBuilder::visit(), which explains that "the grammar can't distinguish between two different definitions" whose only difference is casing of the first letter. - Prevent registration (return -1 with e.g. qmlRegisterType()) when a type name doesn't begin with an uppercase letter. - Document the uppercase type name rule in more places. Change-Id: I4e522c65990f418eaafa45a256e3cb07a3e01ba4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-2/+3
|\| | | | | | | Change-Id: I37bc7afea415261639b71e7b8dfc9177fdd4cb62
| * Doc: Do make 'Licenses and Attributions' valid for multiple Qt versionsKai Koehne2018-01-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | The Qt documentation is supposed to be valid for older Qt versions too. Anyhow, the generated attributions are only valid for the exact version the documentation was generated from, so make this explicit. Also mention since when the libraries are under LGPL3/GPL3. Change-Id: Iec8f67e5e43be456cc77283ca6d2a7ebe142f501 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-242-7/+90
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| * Doc: state that property aliases do not work with grouped propertiesMitch Curtis2018-01-041-7/+32
| | | | | | | | | | | | | | | | | | | | It seems to have been the case since the beginning (a bug report linked to from the report referenced here is from 2010), so we should document it until the opposite becomes true. Task-number: QTBUG-65011 Change-Id: I9de0836e024df35968c85c7136cec04b6b4a741c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Allow QQmlComponent::loadUrl() to load absolute URLs with relative pathsMitch Curtis2018-01-041-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, QQmlTypeLoader::getType() will assert if passed a relative URL, because it needs absolute URLs in order to ensure that it can use them as keys for its cache. After dc6b73390 was merged, URLs like QUrl::fromLocalFile("main.qml") (which are currently used in examples of how to load a QQmlComponent) started causing the assertion to fail. As mentioned in the comments of the bug report, some patches have already been applied to QQmlComponent's QString-based constructors, but both the constructors taking a QUrl and loadUrl() itself need fixing. This patch puts the fix into loadUrl() (the constructors call this function) so that every operation involving URLs is successful when using the documented methods. Task-number: QTBUG-58837 Change-Id: Ib54ca52eddce6e7781cf96015f4c15af604233d3 Reviewed-by: David Faure <david.faure@kdab.com>
* | Doc: Move the warning about manipulating QML objects from C++Venugopal Shivashankar2017-11-033-11/+9
| | | | | | | | | | | | | | | | | | | | Manipulating QML objects from C++ is not a best practice when integrating QML and C++, except for testing and prototying. So its apt to warn the reader about such an approach much earlier. Task-number: QTPM-425 Change-Id: Iebb93d099008ff3ebcefe6af25364afe379b7fcf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update to new QRandomGenerator APIThiago Macieira2017-11-031-1/+1
| | | | | | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-2447-235/+235
|\| | | | | | | | | | | | | | | | | | | 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-1747-235/+235
| | | | | | | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>