aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-044-10/+33
|\ | | | | | | Change-Id: I48764527fa1ab6d8d59c24552394459b1cdc58ee
| * Fix crash with window-less QQuickItemsSimon Hausmann2016-09-304-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QQuickItem visual children directly in QQuickItem instead of relying on the item being a (grand) child of a window. [ChangeLog][QtQuick] Fix crash with QQuickItems created via JavaScript being garbage collected sometimes when they're not assigned to a window. This may happen even in qmlscene when between the creation of the root item and the assignment to the QQuickWindow the garbage collector runs. The previous approach of a persistent in QQuickView marking the visual item hierarchy relies on the existence of a view. The only thing left to do in the view and qml window implementation is enforcing the CppOwnership policy set on the content item in QQuickWindow by ensuring the presence of the JS wrapper, replacing the persistent with a weak value. This also introduces a new internal mechanism for QObject sub-classes to provide their own V4 JS wrapper types. Task-number: QTBUG-39888 Change-Id: Icd45a636a6d4e4528fc19165b13f4e1ca7967087 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-2/+4
|\| | | | | | | Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
| * Allow for garbage collection of types with errors in trimCache()Michael Brasser2016-08-301-2/+4
| | | | | | | | | | | | | | Change-Id: I821ea14f60871735bface4e2cf4e61fcb61b2784 Task-number: QTBUG-55567 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-191-1/+1
|\| | | | | | | Change-Id: I7bd70996e3372d154c6b0e47336baa22146667b0
| * QML: Do not register dependencies of deleted bindingErik Verbruggen2016-08-181-1/+1
| | | | | | | | | | | | | | Because it can lead to a use-after-free. Change-Id: I6701b370c0ecee4967e5f749f673a6f9ee3d504c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-182-2/+2
|\| | | | | | | Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
| * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the Mac platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea114ac73c01d74401bcd77373b41a825d2636c9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Doc: Remove references to Windows CEVenugopal Shivashankar2016-08-171-1/+0
| | | | | | | | | | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: I5a38940bd8ebf7dd62d04015e1738ee23ac65bb2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-132-28/+7
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| * QQmlObjectCreator: prefer initializer syntax over assignmentEdward Welbourne2016-08-111-5/+4
| | | | | | | | | | | | | | | | Greater uniformity; also opens the door to potential const-ing, should this ever be worht considering. Change-Id: I91b44472cb7d84f85b3033f14a763beeea837459 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQmlObjectCreator: initialize _bindingTargetEdward Welbourne2016-08-111-0/+1
| | | | | | | | | | | | | | Coverity (CID 163180) noticed _bindingTarget wasn't initialized. Change-Id: Ia727d00a161e514c437a72084b6ef01a7ebf4abc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix char conversions in QMLChristian Strømme2016-08-091-23/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 90b06e2773842, as it had unwanted side effects. The original intention was to make assignment from char to string possible, or more specifically, we wanted a solution where a QChar could be assigned to a QString, as a character and not a string representation of its value. While this behavior is desirable for QChar, we most likely want the opposite for the regular character types. Task-number: QTBUG-49232 Change-Id: I82d5f72b900fe984c4db1478fd52a9eb69ad2ee6 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-051-2/+5
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h Change-Id: I1e6a9424e7f87d9e4ac1ea387ec70e151106f1c7
| * QQmlComponent: fix handling of relative pathsDavid Faure2016-08-031-2/+5
| | | | | | | | | | | | | | | | Calling QUrl::fromLocalFile() on a relative path leads to a non-relative URL, as per the definition of QUrl::isRelative(). Change-Id: Ibaa9ecac56c6a14f6e41c5cf5250d7bbafed9837 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-013-2/+28
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| * Fix documentation of Component.createObjectGiuseppe D'Angelo2016-07-261-1/+1
| | | | | | | | | | | | | | The parent argument should really be any QObject, not just Items. Change-Id: I4d105722b9d76585dd353eddf464a1ec39fea75e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQmlPropertyMap: Don't spuriously emit valueChanged() signalThomas McGuire2016-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | The valueChanged() signal was emitted when the property was written with the same value. This increased the potential for binding loops in user code. Change-Id: Ifeb8f6f23e2022aa35cb6cac7cf1a3dbc0e8ca2f Task-number: QTBUG-48136 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix string property assignments to 2d vectors and quaternionsSimon Hausmann2016-07-211-0/+26
| | | | | | | | | | | | | | | | | | Just like it's possible to assign "1,2,3" to a QVector3D, the same should be possible for a QVector2D and a QQuaternion. Task-number: QTBUG-54858 Change-Id: I8f394279dcdf5c057876efaa316b4bad51a4c126 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-292-3/+6
|\| | | | | | | Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
| * Fix QQmlTypeData object leakJian Liang2016-06-251-2/+2
| | | | | | | | | | | | | | | | Don't forget to drop refcount of QQmlTypeData object in QQmlType::resolveCompositeBaseType() to prevent leakage. Change-Id: I079839a3347def1c2ac8f9cc07a52debb885b36e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add missing signal handling for QJSValueMichal Klocek2016-06-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | Emitting signal with QJSValue argument ends in QVariant converstion in qml bound signal expression evaluation. Create missing handling for arguments of type QJSValue. Change-Id: I3d51a5455c09d0eef1123941066d20ad68f4074d Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-202-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4targetplatform_p.h src/quick/accessible/qaccessiblequickitem_p.h Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
| * Fix reference to Windows RT which actually meant Windows Runtime.Jake Petroules2016-06-161-1/+1
| | | | | | | | | | Change-Id: I701b25bc73cf84b1daae481eebfd2dc19003ce78 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * QML: Only release types if they aren't referenced anymoreUlf Hermann2016-06-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | Just checking for references on m_compiledData is not enough. The actual component can also be referenced. Thus it won't be deleted on release(), but cannot be found in the type cache anymore. Task-number: QTBUG-53761 Change-Id: I8567af8e75a078598e4fed31e4717134e1332278 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QmlIncubator: correct documentation snippet about waiting for ReadyShawn Rutledge2016-06-101-1/+1
| | | | | | | | | | | | | | | | | | It makes more sense to process events until the incubator is Ready rather than while it's already Ready. Change-Id: If8b0c5057dd88ffdbb2dd39f53b5b9676d0b9d19 Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* | QML: Only release types if they aren't referenced anymorev5.7.0Ulf Hermann2016-06-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | Just checking for references on m_compiledData is not enough. The actual component can also be referenced. Thus it won't be deleted on release(), but cannot be found in the type cache anymore. Task-number: QTBUG-53761 (cherry picked from commit 2ac19881f92c94f4e9427bd9ff513210675f259e) Change-Id: If254d5bca1f41ec948ec1438df0d37bf8d531bdf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-2014-13/+15
| | | | | | | | | | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-195-13/+34
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| * Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-05-194-9/+20
| |\ | | | | | | | | | Change-Id: Ib7f8c60143c1efab279476dba390a3d9837ccc37
| | * Fix crashes when incubating objects asynchronously with initial propertiesSimon Hausmann2016-05-182-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from commit 94e337fa95425d259e81b4d21f4d0853108553bd where we accidentally ended up not having a calling QML context set anymore when initializing the properties on newly incubated objects as provided by the caller. The QML context is necessary as for example when we set a URL property, the URL can be relative and it will be resolved to the base url of the context when written, such as in in QQmlPropertyPrivate::write. Change-Id: I1d896381fc92f653a7d76f4d82174bca48828f5e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * QML: Fix asynchronous cached loading.Erik Verbruggen2016-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling CachedLoader::loadAsync, queue the load on the QML thread instead of asking the thread to load it synchronously. The problem showed when a QML file triggered a plugin load, that would ask the engine to create a component while initializing that plugin. Change-Id: I3714ef285e432eb1aa294c4fd0208ba188d97ee9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | * Merge 5.6 into 5.6.1Oswald Buddenhagen2016-05-121-3/+4
| | |\ | | | | | | | | | | | | Change-Id: If83c0d59fccf0620446a5da8d271a5037c9be106
| * | | Revert "Remove this piece of code"Simon Hausmann2016-05-181-2/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bad007360a0f6fba304d8f4c99826a1250fd886c. The lookup in the global object is necessary to detect whether we've seen any unresolved properties. This is used for the optimization of skipping binding refresh updates when a context property changes. Task-number: QTBUG-53431 Change-Id: Idb39a32e4b58b915496bbb9d8a098dc17a6f688a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Fix warning about mixing basic font type's pointSize and pixelSizeMitch Curtis2016-05-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We didn't properly read the font property of TextFieldStyle (which is declared in QML) before writing the pointSize property (see bug report), so it was using the value of a previous assignment. Change-Id: I7746c258d1f3a6e031583da7f007bd0dc4087082 Task-number: QTBUG-52920 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | QML: Fill QtObject lazily.Erik Verbruggen2016-05-112-11/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only iterate over the enumerations/enumerators in the staticQtMetaObject when a get() is done, and the key/value is not yet in stored in the underlying Object. The whole cost of the iteration is now moved to get() and advanceIterator(). The latter will add all items in one swoop, but iteration over QtObject isn't used much (if at all). The get() will add all key/value pairs up until it finds the requested key. Checking a number of applications shows that none of them use all (or the "last") key, so it will actually save entries (which equals memory) too. This change reduces the instruction count for QtObject from 2.7M instructions down to 95k. As this initialization is done from the QQmlEngine constructor, it also speeds up that initialization. Task-number: QTBUG-43770 Change-Id: I71331ff76bdacdd4790f7ff0430c4cbc214fe0ab Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Teach the QML engine to find static Qt Quick Controls 2 stylesJ-P Nurmi2016-05-111-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The styles are installed to eg. qml/QtQuick/Controls.2/Material. That is, the version is in the parent module. See 3c5e438 for more details. Change-Id: Icdeccb356554ada74dd1116b99be198565c98de6 Task-number: QTBUG-53284 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6.1' into 5.7Simon Hausmann2016-05-091-1/+1
|\ \ \ | | |/ | |/| | | | Change-Id: I6648a0ce49e0fd2b0881444bd38b9a10c093dc18
| * | Revert parts of 392c7b99348e2a96ef11adb5712095fbd13fb780Simon Hausmann2016-05-091-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Revert the plugin loading check for Qt 5.6.x. It turns out that making this check strict broke multiple static plugin builds beyond the qtdeclarative repository. Let's not cause unnecessary breakage in a patch release of Qt to fix a bug that has existed for much longer. I'll revert this change in the dev branch for Qt 5.8, together with an entry in the change log to inform the developers that a behavioral change in their code is necessary (the use of the interface id variable). Change-Id: I3c658433eaa125ac0d272806e3bbbf016cf6d3cb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-1/+1
|\| | | | | | | Change-Id: I3c6a93917cb46868cdb9dd50566b90c70f67102e
| * Add version tag to QQmlExtensionInterface_iidJoni Poikelin2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit 392c7b99348e2a96ef11adb5712095fbd13fb780 introduced version checking that checks QML extension plugin interface version name. Unfortunately many plugins inside and outside qtdeclarative already defined the string with interface version, leading to plugin not being loaded. Task-number: QTBUG-53090 Change-Id: I792df4ba06753bc21eab4adcd6f2068543d02368 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | V4: make QQmlEnginePrivate::dereferenceScarceResources inlinable.Erik Verbruggen2016-05-042-22/+32
| | | | | | | | | | | | | | | | Done by giving the "expensive" part its own function, that's even unlikely to be called anyway. Change-Id: I35621fb0a764879f9339b9e23f210c66971ff5b7 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QmlProfiler: Reduce memory usage for file names and URLsUlf Hermann2016-05-023-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the various file names are actually not kept as QStrings in the respective objects being profiled, our saving them as QStrings in each and every profiling event is not implicitly shared and causes a huge memory overhead. Avoid that by saving each location only once, indexed by a disguised pointer to the object it refers to. Normally, objects could disappear during the profiling session, and new objects could be allocated in their place, which would mess up our indexing system. We prevent that by referencing the objects when we index them, thus preventing them from getting auto-destructed. Mind that those are not JavaScript objects but rather functions, bindings, components and the like. So, this will only cause a memory leak if you're compiling and dropping QML components over and over. Task-number: QTBUG-52937 Change-Id: Ia4dfb09a71a5c9a2d6ce25c3811bbe2a1036c1c1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Qml: use qDeleteAll moreAnton Kudryavtsev2016-04-272-6/+3
| | | | | | | | | | | | | | | | | | | | | | qDeleteAll uses iterator-based loop, that produce less code than index-based. Saves ~0.1 KB text size. Config: release build, Ubuntu 14.04 x64, gcc 4.9 Change-Id: Ib6c01f3b6a73367e33aecd34223edde15262d33c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-274-5/+25
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
| * V4: 'Cache' enumeration end instead of calling a method.Erik Verbruggen2016-04-221-2/+2
| | | | | | | | | | | | | | | | Saves ~2600 instructions on Linux/x86_64 for a normal instantiation of QV4::Heap::QtObject. Change-Id: I20c9311a96fd76911536153ddd1605500c6ac451 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Occasionally trim the type cacheUlf Hermann2016-04-192-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | As loaded components are kept in a cache, they are never removed by the garbage collector. So, if you periodically create new components, they leak. This change adds a floating threshold for the number of components. When that threshold is surpassed trimCache() is called and unneeded components are removed. Task-number: QTBUG-42055 Change-Id: I30e3e4ee287f6d34376713668009c67614a50e0c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Instantiate static Qml plugins declaring QQmlExtensionInterface onlySebastian Lösch2016-04-111-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>
* | Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-264-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | QML: Drop unnecessary includeUlf Hermann2016-04-251-2/+0
| | | | | | | | | | Change-Id: Ife8187cc2f052cf76c528cd35efa509f306129cb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>