aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml
Commit message (Collapse)AuthorAgeFilesLines
* Clarify ownership around QQmlEngine::setNAMFMårten Nordheim2018-04-261-1/+2
| | | | | | | | | | | We were leaking an instance of MyNetworkAccessManagerFactory in the "NetworkAccessManagerFactory"-example. To add to this the documentation around QQmlEngine::setNetworkAccessManagerFactory did not specify whether or not it took ownership, causing confusion. Change-Id: Ic9eee2c45682c752bcb4aa98943fc0af2b630795 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Examples: remove bogus returnv5.11.0-beta3J-P Nurmi2018-04-031-1/+1
| | | | | Change-Id: I653974c80c6767d9af95b9157a73c09dbdeb76cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-272-4/+4
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-2614-15/+15
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-176-31/+31
| | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-17117-348/+1518
| | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Doc: Fix capitalization in section titlesTopi Reinio2017-08-291-1/+1
| | | | | | | | ...and fix some section titles to be less confusing. Change-Id: If83c3faffead9e2e9be7fc0fb360f1c5b8b1bb51 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Fix GCC 7 warnings in examplesFriedemann Kleint2017-06-211-1/+1
| | | | | | | | | | | | | plugin.cpp: In member function 'virtual void MinuteTimer::timerEvent(QTimerEvent*)': plugin.cpp:85:28: warning: ignoring return value of 'QTime QTime::addSecs(int) const', declared with attribute nodiscard [-Wunused-result] time.addSecs(60); main.cpp: In function 'int qMain(int, char**)': main.cpp:71:1: warning: no return statement in function returning non-void [-Wreturn-type] Task-number: QTBUG-60630 Change-Id: I0c0002533aa28c480a4d9eb45856dd10753d2476 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: make screen xmlhttprequest compatible with DesignerNico Vertriest2017-05-036-40/+150
| | | | | | Change-Id: Ieaf45a817d4568bd2cd7c3cbbfee62435c2e2594 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-03-151-9/+9
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmltypecompiler_p.h src/qml/qml/qqmltypeloader.cpp src/qml/qml/qqmltypeloader_p.h Change-Id: I4894555ab7a0879b56bbda7a46d16d1c40c19e7c
| * Doc: added snippets to Extension Objects ExampleNico Vertriest2017-03-131-9/+9
| | | | | | | | | | Change-Id: Icbd2393d4b8523e24328f765e76869c86afb3e72 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Replace QList<Person*> with QVector<Person*> and function pointersMichael Winkelmann2017-03-072-2/+39
|/ | | | | | | | | | The usage of the QQmlListProperty QList constructor is discouraged since QList violates QML's memory management rules. Replaced the QList with a QVector and passed the function pointers to the QQmlListProperty constructor instead, as officially recommended. Change-Id: I6d28a43530cc3edd5e7d89c351bad70deb721689 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: added specs to Extending QML - Methods ExampleNico Vertriest2017-01-092-2/+11
| | | | | | | Change-Id: I7386c2bd738776455a71bde8cffdcedb9e292b24 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Rearranged order of Extending QML ExamplesNico Vertriest2017-01-092-4/+19
| | | | | | | Rearranged in logical order of example build up Change-Id: I6af8e39bd900d4ce058de46e0b3ebd5e368222c8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: minor grammar mistakeNico Vertriest2016-12-211-1/+1
| | | | | Change-Id: If3aebd27e886181ebe0d41532935afdfb974586c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-8/+8
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Turn the no-network support into a configurable featureLars Knoll2016-10-101-2/+3
| | | | | | Change-Id: Ic70f60c124fe166b37fbe9b853735be3c5e0d46d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-022-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * PieChart examples: initialize membersEdward Welbourne2016-07-152-2/+2
| | | | | | | | | | | | | | | | | | | | Coverity (CID 161680, 161678) pointed out that constructors don't initialize some members; getters would have returned drivel if called before setters. Unimportant but we should set a good example in our example code. Change-Id: Ia0483cfbe2cae379a0e84f10db1d8edc9cb5c52b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-247-3/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
| * actually build and install the qml tutorialsOswald Buddenhagen2016-05-136-2/+11
| | | | | | | | | | | | Change-Id: Idf81981140e210b29239e91ff5b6b7c40e2f36de Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * fix example installsOswald Buddenhagen2016-05-131-0/+2
| | | | | | | | | | Change-Id: Ie6a219392a48fd6b1a32037cc215dc20d408e819 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * make use of COPIESOswald Buddenhagen2016-05-131-1/+3
| | | | | | | | | | Change-Id: I479c9523a89be1d64364e8205daa5860e16882cc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-134-8/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
| * QML extensions tutorial: Add import plugin to app. bundle on OS XTopi Reinio2016-04-162-6/+15
| | | | | | | | | | | | | | | | | | | | | | The application in chapter 6 of this tutorial failed to import the custom extension plugin on OS X, as it could not see it's import path outside the application bundle. Change-Id: Icdca1f0553020e0460e4efabc5461a3447b32086 Task-number: QTBUG-47003 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Instantiate static Qml plugins declaring QQmlExtensionInterface onlySebastian Lösch2016-04-112-2/+2
| | | | | | | | | | | | | | | | | | | | When instantiating static plugins no check is done whether the QQmlExtensionInterface is declared. Therefore all user plugins are instantiated in the Qml thread, which may cause problems. Task-number: QTBUG-52012 Change-Id: Ia91ec5ec7b2a9721bd11e3648cdc161855b4454e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-084-0/+0
|\| | | | | | | Change-Id: I48c493b537e65276107ed7ee029312e294947e8b
| * Purge sRGB chunks from PNGs in examples.Edward Welbourne2016-03-244-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Various tools grumble about sRGB tables in PNG images; and our handling of them doesn't pay attention to these, so purging them makes the images smaller with no loss to the images. Change-Id: If3baf60fb7c0045446ddfddecef96374845e739e Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | QtLite: no_network option for QtDeclarativePaolo Angelelli2016-03-041-4/+8
|/ | | | | | | | | | | | This patch adds the support for a no_network option for QtDeclarative, and the necessary #ifndef all around the code. no_network changes the interface of some classes, therefore using it breaks source compatibility. Change-Id: Iff612fb07041b8a7db99bd595bf038efaac2dd8a Reviewed-by: Risto Avila <risto.avila@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Doc: Fixed several link errorsNico Vertriest2015-09-071-1/+1
| | | | | | | Change-Id: I684b8c0d238b7592b49abc0156bbc9791fdf6991 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv4debugservice.cpp src/qml/jsruntime/qv4value_inl_p.h src/qml/jsruntime/qv4value_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/qml/qqmlnotifier_p.h src/qml/qml/qqmlproperty.cpp src/quick/items/qquickflickable.cpp src/quick/items/qquicktextedit.cpp tests/auto/quick/qquickwindow/BLACKLIST The extra changes in qqmlbinding.cpp are ported from changes to qqmlproperty.cpp that occurred in parallel with writeBinding() being moved to qqmlbinding.cpp. Change-Id: I16d1920abf448c29a01822256f52153651a56356
| * Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-07-201-1/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickwindow/tst_qquickwindow.cpp Change-Id: I272074fa2ca259439cae2f686325932f7f9d7c01
| | * Doc: Added the missing \brief and \image to the example docsVenugopal Shivashankar2015-06-021-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-41996 Change-Id: Ica6e069c7753a2004a4a4c0e93a49d1f240569d3 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | | Port examples to new connection syntax.Friedemann Kleint2015-07-223-3/+3
|/ / | | | | | | | | Change-Id: I121c59ac0ad56acb4cd54b99ecd37567368385ce Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Fix qml-i18n exampleSimon Hausmann2015-05-052-4/+4
| | | | | | | | | | | | | | | | | | Commit f0e285381800c0809e5bfd3a4871a2283ea10fb9 renamed the example, but it did not adjust the context in the translations. From that point on the context didn't match anymore and the entire example stopped working. Change-Id: I491d518235aea07768b69c52d13b2bbf5060f61f Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Update url location for missing Qt logoSergio Ahumada2015-02-171-2/+2
| | | | | | | | | | Change-Id: I21084651044f1db0c7863f2121431dffec8526e3 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Fixed license headersJani Heikkinen2015-02-17115-345/+345
| | | | | | | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Update copyright headersJani Heikkinen2015-02-12121-612/+612
|/ | | | | | | | | 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>
* Restore extension types documentationAlejandro Exojo2014-12-101-0/+19
| | | | | | | | | | | | | | | | | | The documentation on QML extension types was accidentally removed on the big restructuring of commit 28def0bdd084989c17a157e0c4ab80c259081caa. This restores it to a section on the "Defining QML Types from C++" page mostly unchanged, and makes the source of the example that was already there visible. The reference documentation of the qmlRegisterExtendedType is added as well, and the one for qmlRegisterExtendedUncreatableType and qmlRegisterCustomExtendedType that was added in fcb40ff6d71f4561401e6b2bd4d7fc706fff8eee is now fixed. It was not being generated because referred to "QQmlEgine" instead of "QQmlEngine". Change-Id: I1403b10076c64a4c0d760f72b06dd52c38b351a5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Combine the extending QML tutorial chapters into a single exampleTopi Reinio2014-09-3048-6/+6
| | | | | | | | | | | | | Combine the six examples associated with each tutorial chapter into a single, top-level example project 'extending-qml', with subprojects for each of the tutorial chapters. Clean up the docs, add links, and a note about a warning that the user may see when running the code in the first chapter. Task-number: QTBUG-32947 Change-Id: Idba4e2153817ab29f1afaf1947d1f2e25964e7b3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Doc: apply title case to all section1 titlesNico Vertriest2014-09-242-8/+8
| | | | | | Task-number: QTBUG-41250 Change-Id: I303d989992c9685f73baae50c64accf71b43549f Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: correct link/compilation errors in Qt DeclarativeNico Vertriest2014-07-021-0/+38
| | | | | | | Task-number: QTBUG-34749 Change-Id: I507d54b0568d77c6099a0bd99f5c369b8667032a Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Updated "Qt Quick Examples" pages.Jerome Pasion2014-06-051-3/+9
| | | | | | | | | | | -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>
* networkaccessmanagerfactory example: Fixed build with QT_NO_NETWORKPROXYOliver Wolff2014-03-121-0/+8
| | | | | | Change-Id: I803dd555961420b8189f36e1978a3fb65ab4d2a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* networkaccessmanagerfactory example: introduced QCommandLineParserOliver Wolff2014-03-121-11/+28
| | | | | | Change-Id: I6385ee0c33a0a8cb411dbbdf5f6ea10f5ebde1a5 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* the qmlextensionplugins example and a bunch of reference examples need QtQuickOswald Buddenhagen2014-02-212-7/+11
| | | | | | Task-number: QTBUG-36893 Change-Id: If1f937113b651fd2255f8004739f2c601e3826bf Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* the shell example and a bunch of reference examples need no QtGuiOswald Buddenhagen2014-02-217-8/+8
| | | | | | Task-number: QTBUG-36893 Change-Id: I51e402c90bd727cd3066788e0864e887ab8cb9e4 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* fix whitespaceOswald Buddenhagen2014-01-2229-48/+48
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-12-301-1/+1
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>