aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
Commit message (Collapse)AuthorAgeFilesLines
* Remove hard-coded notes for 'Corresponding handler' for QML signalsTopi Reinio2020-03-104-7/+1
| | | | | | | | QDoc will generate these notes automatically. Task-number: QTBUG-37355 Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use the extended QQmlListProperty interface in a few placesUlf Hermann2020-02-072-5/+12
| | | | | | | Task-number: QTBUG-79263 Change-Id: If518f644b5b9eddbacfb1cb16fbb557127ffcfb2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-061-7/+7
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/types/qqmlbind.cpp src/quick/items/qquicklistview.cpp tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: Id6805c13256ad13d5651011e5dd09bba0ec02987
| * Fix static builds due to name clashesAndy Shaw2020-01-311-7/+7
| | | | | | | | | | | | | | | | | | When QtQuick and QtQuickParticles was linked into the same application then there was a name clash, so the classes in QtQuickParticles are renamed to avoid this clash. Change-Id: I8c2144ba7ad5838c95077a370ef400bd706fce8a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Synthetically reference type registration functionsUlf Hermann2020-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unused volatile pointers to the type registration functions in each import plugin. We need to do this in order to prevent the linker from optimizing the registration away. There are two ways for this to happen: When linking statically, the linker will examine the referenced symbols on a per-object base and leave out all unreferenced objects. When linking dynamically, the linker may do the same on a per-library base and drop any unreferenced libraries from the dependencies. Forcing a reference to the type registration function prevents both. The volatile technique allows us to remove the previous qCDebug() hack. Having an unused volatile auto variable should only result in a single memory read as runtime overhead. The qCDebug() technique would generate a read and a block of mostly dead code (as no one would ever use that logging category). Fixes: QTBUG-81622 Change-Id: I255667276dfd355b19baa17b1aad3db406bf1954 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Upgrade qsb files to version 4Laszlo Agocs2020-01-2110-0/+0
| | | | | | | | | | Change-Id: Ic1a1f5ff49c34d72495bc74083f37db118c935c1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | QQmlListProperty: Add replace and removeLast functionsUlf Hermann2020-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | This allows us to implement QmlListWrapper::virtualPut(). Also, the additional functions make the list properties useful in other contexts. Fixes: QTBUG-79263 Change-Id: I528bc69222ca7743f0fc3697c3aed2a3468b4d87 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Generate registrations for all importsUlf Hermann2020-01-102-42/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-092-51/+36
|\| | | | | | | | | | | | | | | | | Conflicts: src/particles/qquickitemparticle.cpp src/qmlmodels/qqmladaptormodel.cpp tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
| * Stabilize QQuickItemParticleLouis du Verdier2020-01-072-46/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two crashes and a memory leak in QQuickItemParticle. The first crash was caused by the list m_loadables that kept pointers on QQuickParticleData, that could in the meantime become dangling pointers if the associated particle expired or got deleted by a call to the reset() method of the particle system. Its role was to keep a list of particles that did not have a delegate instantiated yet, in order to create them in the tick() method. This list is removed and the list of particles to handle is directly deduced in the tick() method. The second crash was caused by the list m_deletables that could in some situations (generally due to a reset()) contain multiple times the same delegate, and therefore cause a double delete in processDeletables(). This list is changed to a set to avoid this situation with a minimum impact on the rest of the code. The memory leak was caused by the m_managed list of delegates that was not freed when QQuickItemParticle gets deleted. Task-number: QTBUG-71193 Change-Id: I6fe30ee59a9a0bb90c14c62c7a48a50f465a9e0c Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
* | Add QQuickItemParticle give() method bodyFabio Falsini2020-01-062-6/+21
| | | | | | | | | | | | | | | | | | | | | | The current version of QQuickItemParticle give() method was not implemented and a simple TODO comment was present instead. I added a working body and add also a reparent feature when an added item is released. Fixes: QTBUG-76827 Change-Id: Ib7d289cad2ff0cd166e766eb7f07e92437e7681b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Regenerate rhi shadersLaszlo Agocs2019-12-1110-0/+0
| | | | | | | | | | | | | | | | | | | | The generated GLSL code for version 150 is now slightly different (we now disable the unnecessary GL_ARB_shading_language_420pack to prevent failures on older OpenGL implementations and core profile contexts). Task-number: QTBUG-80690 Change-Id: I4c6242284c1239af9f12bd2fdac3c33707ac88e7 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-092-1/+8
|\| | | | | | | | | | | | | Conflicts: src/qml/common/qv4compileddata_p.h Change-Id: I1150c8cd0161f0e22137d383013751394ae64e18
| * Particle system: fix infinite loop after running for many hoursYulong Bai2019-12-062-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The infinite loop was triggered by several issues coincide together. In short, the direct cause is the particle's born time and lifespan were represented in 32 bit floats and not precise enough to pass aliveness check as time grows large. While the time grows large, the resolution of floating point decreases to the extent that resolution is even bigger than 2 milliseconds. Then it will fail to pass the aliveness check. Then, the dead particles will be treated alive and they are kept inserting into and popping out of the particles heap, which is similar to a live-lock. The fix is to separate freeing dead and inserting back alive ones in two different loops, ensure that the emitter can update time for next frame. There are still other issues: 1) as the times runs very long, the particle needs several frames's updates to actually make the states change noticeable, which means animation may become not so smooth after running for too long (like several days). May change particle's born/lifespan time to 64 bits in another patch. 2) the particle system's and animation's timers are 32 bit integers, after 2^31 milliseconds(24.8551348 days), they will overflow. May promote them to 64 bits in another patch. 3) as the time grows even larger such that the resolution is bigger than 16ms at 60 hz frame rate, the live-lock may occur again. Because the timer advances/delta will be not large enough to make dead ones reused. The next live-lock estimated time is 2^24*16 milliseconds = 3.10689185 days. The final fixes are 1) and 2) 4) may change the particle system's internal timer be set to arbitrary value (fast forward to large value) for easier writing autotest for above cases. Change-Id: I1190c0814c8197876b26dd4182dc4b065dd1ece6 Task-number: QTBUG-64138 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-11-221-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlextensionplugin.cpp tests/auto/quick/qquicktableview/tst_qquicktableview.cpp Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
| * Doc: Fix documentation warningsTopi Reinio2019-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a lot of documentation warnings introduced by the separation of QtQml.Models and QtQml.WorkerScript modules from the QtQml documentation project into their own sub-projects. Fix the above, and also ensure that the experimental Qt.labs.qmlmodels QML types are listed in the documentation, and add them also on the QML module page for QtQml.Models. A few warnings remain, they may be indicative of issues not in the scope of this commit. Fixes: QTBUG-79812 Change-Id: Idc25c976e4c96feab4aae893519d6c9245f57a64 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-162-2/+17
|\| | | | | | | Change-Id: I6e69a235f50472b8f7ac19e133a3c071ea8c4d7a
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-152-2/+17
| |\ | | | | | | | | | Change-Id: I7759f6b60f8fda6525b239c7ee2e034194d4ab85
| | * Fix image particle flickering due to broken state machine logicLaszlo Agocs2019-10-142-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A null QSGNode cannot be returned since that leads to not showing anything in the next frame. That is unacceptable in case there are already particles displayed and we are merely regenerating due to the increased number of particles. Task-number: QTBUG-54673 Change-Id: If610c56f6d82d35a8de6b435fd8b18ceb7adf2e7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-084-6/+6
|\| | | | | | | | | | | Change-Id: Ib381f350ada365747ce20b989bfdc368d75f2219
| * | Small performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-074-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | mostly add const &, a few std::move and in particular case, remove const so the std::move being done over the variable actually has effect Change-Id: Id611cd31bc012f219d7a17d4626b1c2a5fbddd66 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-044-24/+33
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
| * | Change const ref to ref in QSGMaterialRhiShader as per API reviewLaszlo Agocs2019-09-231-10/+10
| | | | | | | | | | | | | | | | | | Change-Id: I7783ed26a66f03ebe3b26bcba2f42f9fff45a417 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-123-14/+23
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
| | * Doc: Fix documentation warnings for qtdeclarativeTopi Reinio2019-08-293-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After recent changes to QDoc, it now correctly warns about missing documentation for QML method parameters - fix all of these and also do some minor language editing. Remove duplicated entries for - \qmlmodule Qt.labs.qmlmodels - \group qtjavascript as they were causing issues. Change-Id: I55cd670cc8a0cc6427cdb7945dbd7c28ea94f796 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Specify parameters of type registration in class declarationsUlf Hermann2019-09-2629-36/+80
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make ImageParticle functional when rendering via the RHILaszlo Agocs2019-08-2218-147/+884
| | | | | | | | | | | | | | | | | | Involves a trivial (albeit time consuming) rework of the existing materials as well since their reliance on QSGSimpleMaterial makes them problematic to live side-by-side with the RHI variants. Change-Id: Ie12b7949904434b3a831588518c8268e917ce92f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Split compiler and runtime more clearlyUlf Hermann2019-07-111-0/+1
| | | | | | | | | | | | | | | | Provide different export macros and different top level headers for each, don't include runtime headers from compiler sources. Change-Id: I7dc3f8c95839a00a871ba045ec65af87123154be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add the graphics api independent scenegraph portLaszlo Agocs2019-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt in via environment variables: QSG_RHI=1 -> enable using QRhi instead of GL QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default (the default is d3d11 on Windows, metal on Mac, gl elsewhere) Or force a given rhi backend via the existing QQuickWindow::setSceneGraphBackend(). Otherwise the default behavior is the same as before, the rhi code path is never active by default. -no-opengl builds are supported in the sense that they work and default to the software backend. However, the rhi code path cannot currently be used in such builds, even though QRhi from qtbase is fully functional with Vulkan, D3D, or Metal even when qtbase was configured with -no-opengl. This cannot be utilized by Quick atm due to OpenGL usage being all over the place in the sources corresponding to the default backend, and those host the rhi code path as well. This will be cleaned up hopefully in Qt 6, with the removal all direct OpenGL usage. Other env.vars.: QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer (assuming the system is set up for this) QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too) QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both merged/unmerged, convert when needed - with some rhi backends this is implicit) QSG_RENDER_LOOP -> to override the render loop as usual. The default with RHI is threaded for Metal, threaded for Vulkan on Windows, basic for Vulkan on Linux and Android (to be checked later), while the existing rules apply for OpenGL. Not supported when running with QRhi: - particles - compressed atlases (though this is transparent to the apps) - QSGRenderNode - QQuickRenderControl - QQuickFramebufferObject - certain QQuickWindow functionality that depends directly on OpenGL - anisotropic filtering for textures - native text may lack some gamma correction - QSGEngine applicability unclear - some QML profiler logs may be incorrect or irrelevant Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Eliminate qmldevtools_buildUlf Hermann2019-05-311-0/+1
| | | | | | | | | | | | | | | | Move the relevant files into more fitting locations and build the devtools from only parser, compiler and qmldirparser. Change-Id: Ibf37a1187f36d02983f9f43c6622acb243785b7b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix deprecation warnings in 5.14Friedemann Kleint2019-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libraries: scenegraph/util/qsgdepthstencilbuffer.cpp:186:57: warning: 'T* QWeakPointer<T>::data() const [with T = QSGDepthStencilBuffer]' is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations] scenegraph/qsgdefaultcontext.cpp:163:89: warning: 'QList<T> QSet<T>::toList() const [with T = QByteArray]' is deprecated: Use values() instead. [-Wdeprecated-declarations] util/qquickpath.cpp:573:40: warning: 'QList<T> QSet<T>::toList() const [with T = QString]' is deprecated: Use values() instead. [-Wdeprecated-declarations] util/qquickpath.cpp:606:29: warning: 'QList<T> QSet<T>::toList() const [with T = QString]' is deprecated: Use values() instead. [-Wdeprecated-declarations] quicktest.cpp:562:73: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] quicktest.cpp:604:77: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qquickitemparticle.cpp:233:49: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QQuickItem*]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qquickitemparticle.cpp:239:37: warning: 'QList<T> QSet<T>::toList() const [with T = QQuickItem*]' is deprecated: Use values() instead. [-Wdeprecated-declarations] Tests: tst_propertyrequirements.cpp:123:58: warning: 'QList<T> QSet<T>::toList() const [with T = QString]' is deprecated: Use values() instead. [-Wdeprecated-declarations] tst_propertyrequirements.cpp:161:40: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_propertyrequirements.cpp:161:77: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] /data1/frkleint/qt-dev/qtbase/include/QtCore/../../src/corelib/tools/qset.h:400:23: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] ../shared/viewtestutil.cpp:331:26: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] ... tst_qmldiskcache.cpp:651:81: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:663:81: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:693:85: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:918:81: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:940:69: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickgridview.cpp:6437:70: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickgridview.cpp:6438:46: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickgridview.cpp:6440:66: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquicktableview.cpp:53:20: warning: 'kTableViewPropName' defined but not used [-Wunused-variable] tst_qquicklistview.cpp:7269:70: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquicklistview.cpp:7270:46: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquicklistview.cpp:7272:66: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickpositioners.cpp:4033:70: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickpositioners.cpp:4034:46: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickpositioners.cpp:4036:66: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] Change-Id: I9a177f83f07ae5162f7cc231a8c164ba32ffa5bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove last traces of QV8EngineUlf Hermann2019-05-081-1/+1
| | | | | | | | | | Change-Id: I59f738402d51e39188bbbca2ef1fbc8a61612372 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove QQmlV4HandleUlf Hermann2019-04-1010-25/+33
| | | | | | | | | | | | | | | | This is just an alias for QV4::ReturnedValue. We can as well use the latter. Change-Id: Ibd2c038a3ca726b39a8f0f05e02922adb9fccbdb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix deprecation warnings about QVariant APIFriedemann Kleint2019-04-081-1/+1
|/ | | | | | | | | | | | | | | | | | | | Fix warnings like: sruntime/qv4serialize.cpp:378:45: warning: 'QVariant qVariantFromValue(const T&) [with T = QQmlListModelWorkerAgent::VariantRef]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] qml/qqmlvmemetaobject.cpp:597:61: warning: 'QVariant qVariantFromValue(const T&) [with T = QList<QObject*>]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] jsruntime/qv4engine.cpp:1319:66: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] jsruntime/qv4engine.cpp:1350:60: warning: 'QVariant qVariantFromValue(const T&) [with T = QList<QObject*>]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] items/qquickitem.cpp:8396:78: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] items/qquickitem.cpp:8693:80: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] items/qquickgenericshadereffect.cpp:126:69: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] items/qquickgenericshadereffect.cpp:127:55: warning: 'QVariant qVariantFromValue(const T&) [with T = QSize]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] items/qquickopenglshadereffect.cpp:713:69: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] items/qquickopenglshadereffect.cpp:714:55: warning: 'QVariant qVariantFromValue(const T&) [with T = QSize]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] qquickcustomparticle.cpp:416:89: warning: 'QVariant qVariantFromValue(const T&) [with T = double]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] qqmlenginedebugclient.cpp:403:47: warning: 'QVariant qVariantFromValue(const T&) [with T = QQmlEngineDebugObjectReference]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] Task-number: QTBUG-74043 Change-Id: I14cb7d7c1fb8dc6321e32208a7de15f6bdb19065 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove reference to OpenGL from distance field cache superclassEskil Abrahamsen Blomfeldt2019-01-211-0/+1
| | | | | | | | | | | | | | | | QSGDefaultDistanceFieldGlyphCache is the OpenGL-specific implementation, but for some reason the core profile flag was stored in the superclass. It is ever only used from QSGDefaultDistanceFieldGlyphCache and the rest of the superclass has no OpenGL-dependency, so we just move it. This is needed to be able to share the generic QSGDistanceFieldGlyphCache with Qt 3D Runtime, where there is no current OpenGL context when the scene graph is built and resources have to be allocated through an abstraction layer in Qt 3D. Task-number: QT3DS-1419 Change-Id: I7f4e26eecc21635ff81030b32ecc89c6dc4fcfbe Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use msvc qmake scope where appropriateOliver Wolff2018-11-221-1/+1
| | | | | | | Use 'msvc' instead of 'win32-mscv*'. Change-Id: Ic592d9b5e63529aaae0b780b00e0fce5999926a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace more vestiges of VisualDataModel, *Group and VisualItemModelShawn Rutledge2018-10-031-1/+0
| | | | | | | | | | | | VisualDataModel, VisualDataGroup, and VisualItemModel are replaced with DelegateModel, DelegateModelGroup, and ObjectModel respectively (since 7cad0e52c5a020bd29635e9912fd8946a6b48124), so shouldn't be mentioned anymore, in preparation for removal. Task-number: QTBUG-37725 Change-Id: I9a01ec8db748f817efca638383b7a278c7b562cd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Unify put and putIndexedLars Knoll2018-07-023-3/+3
| | | | | | | | | | Pass an Identifier through those virtual methods to unify the string and integer based versions. Also add the receiver that's required in ES7 Change-Id: I4e7f01b4c97cc80bcb3c485f6343f28213dc9e6b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-06-2528-28/+28
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-2528-28/+28
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add missing dots (qtdeclarative)Paul Wicking2018-06-1928-28/+28
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Add Proxy support for prototype handlingLars Knoll2018-06-251-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup get/setPrototypeOf and fix some smaller incompatibilities in the default implementation for Object. Add the methods to the vtable and reimplement them according to spec for ProxyObjects. Clean up the Object.prototype.get/setPrototypeOf/__proto__ methods and fix a smaller bug in the Reflect API for those methods. Change-Id: I6e438753332ec4db963d6cdcf86f340ff212777a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-271-1/+1
|\| | | | | | | Change-Id: I280d42b8926c0cada1f35d322b80aaf2b0ef0a73
| * Add handling of device pixel ratio to animated spritesAllan Sandfeld Jensen2018-04-261-1/+1
| | | | | | | | | | | | | | Change-Id: I472f61241d1875daf0de0a597bf27c019314f48f Task-number: QTBUG-50119 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Disambiguate different allocation functions in the memory managerLars Knoll2018-04-121-1/+1
|/ | | | | | | | | | | Some compilers (in this case MingW 5.3) don't manage to properly disambiguate the template overloads, and try to instantiate the wrong template function. Solve this by renaming the one of the template functions. Change-Id: I3574e617fe96c4bd52920a0127a1dfe39cc3d302 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-271-1/+1
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-6/+3
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-2613-63/+63
| | | | | | | | | | | | | 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>
* Remove double indirection between QJSEngine and QV4::ExecutionEngineUlf Hermann2018-02-026-8/+8
| | | | | | | | As QJSEngine's handle() method is internal, we can redefine it to return a pointer to an ExecutionEngine. That makes many things easier. Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert particles over to new calling convention for builtin functionsLars Knoll2018-01-121-26/+26
| | | | | Change-Id: Id57417f4deba21917136edd6c10f2ad52c9f9fbb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>