aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-061-5/+5
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-281-1/+1
| | | | | | | This ports all of QtDeclarative. Change-Id: Ie6eb4d96b4d49fbed1e8be514d03e331549cd712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add "we mean it" comment to private headerVolker Hilsheimer2020-08-251-0/+11
| | | | | | | | Fixes warning from build system. Change-Id: If6c7885fa19f17b5821142176b6239bb337a6022 Pick-to: 5.15 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Ship with optimized SPIR-V for the built-in shadersLaszlo Agocs2020-08-1111-10/+13
| | | | | | | | | | | | | Also includes stripping the shaders properly. While we do not have debug information, we do have OpName and similar that describe the variable and block member names. This is unnecessary in the final SPIR-V binary, and further reduces the size somewhat. To create debuggable shaders (for SPIR-V and D3D) with full source information, one needs to regenerate the relevant ones with -g instead of -O. Change-Id: I3b855ee4e9afe393cd460407c1a807d6c9c5e6c2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Compile against latest qtbaseLars Knoll2020-07-091-1/+1
| | | | | | | Adjust to the lastest changes in QList and QString. Change-Id: I216b2746a3305222a21c5aead3aec6106ac1f035 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do not resolve URLs when assigning them to a propertyUlf Hermann2020-06-222-5/+20
| | | | | | | | | | | | | | | We don't know in advance if a URL is part of the source code and should be relative to the current element, or if it is part of the application data and should not be touched. [ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or intercepted anymore when assigning them to a "url" property. Instead they are resolved and possibly intercepted when used to access an actual resource. Fixes: QTBUG-76879 Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Clean up QT_CONFIG(opengl)Paul Olav Tvete2020-06-171-21/+21
| | | | | | | | | | Accelerated graphics is now possible without OpenGL support. With this change, a Qt build with -no-opengl can still run Qt Quick with a Vulkan, Metal, or Direct3D backend. Fixes: QTBUG-84027 Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Anisotropic antialiasing for distance field textEskil Abrahamsen Blomfeldt2020-06-151-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For perspective transforms, we need to find the sample range in the glyph cache per pixel. We can do this by getting the gradient of the distance field at the specific pixel. This will ensure proper antialiasing with any projection, but has the limitation that when glyph contours become thinner than a pixel, they may disappear or become too emphasized, because the hardware-gradient - based on neighbouring fragments - is not reliable at that scale. So we should only default to this when we detect that the text is child of a 3D scene. To make this smooth, we need to know the mode of the renderer when creating the shader. So QSGMaterial::createShader() now takes a render mode that we can use to customize behavior based on whether it is rendering into a 2D or 3D scene. [ChangeLog][QtQuick] The QSGMaterial::createShader() virtual function has been extended to take a render mode argument, which can be used for any customizations needed in the case where the shader will be used in combination with 3D perspective transformations. Fixes: QTBUG-84695 Change-Id: I5a18a4edbdfa07e8f9d506c42bb20e8eb580927d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid including removed header in particlesLaszlo Agocs2020-06-101-1/+0
| | | | | Change-Id: I3ffc6cd37fa001cc8b39700f176e64b7538db536 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove the template arguments from some qMakePair callsGiuseppe D'Angelo2020-06-032-3/+3
| | | | | | | They're unnecessary and will break if QPair becomes std::pair. Change-Id: Ie52acf14fa8cbc36f74ef2ca0ebcbc1a0dbaf5db Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Make QSGMaterialRhiShader become QSGMaterialShaderLaszlo Agocs2020-06-027-862/+19
| | | | | | | | | | | | | | | | After a symbiotic relationship in Qt 5.14 and 5.15, it is time for QSGMaterialRhiShader to devour its older sibling and take its place. This makes the direct OpenGL rendering path disfunctional. All QSGMaterial Qt 6 TODOs are solved, the API is clean and straightforward again: a QSGMaterial creates a QSGMaterialShader, no special flags and options needed. (it's just that QSGMaterialShader now has a slightly different API) Task-number: QTBUG-79268 Task-number: QTBUG-82997 Change-Id: I545ca8d796c5535e81957c706e7832133be15b7d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove CustomParticleEirik Aavitsland2020-06-0215-723/+0
| | | | | | | | | The implementation is intertwined with the direct GL path and not really portable to RHI. Fixes: QTBUG-78574 Change-Id: I6ac8707544c19a24661f07e0e6d2fc405e49cbff Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Regenerate qtdeclarative/srcAlexandru Croitor2020-05-291-0/+1
| | | | | | | | | | Includes - renaming of internal plugin api call - generation of QT_QMLTYPES_FILENAME - addition of a few TARGET_DESCRIPTION Change-Id: I72b5647b8c16af9945795ead62a075322b6bb2f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Particles: reduce memory allocations by flattening a setGiuseppe D'Angelo2020-05-276-3/+152
| | | | | | | | | | | | | | | | | | | | When an affector acts on a particle, it will add it to a set of "seen" particles. This means an allocation, per particle, per frame. In Qt 6 the problem is less dramatic due to the new QHash implementation, which uses "wider" buckets, but in Qt 5 this is hundreds of memory allocations (and deallocations) per frame. Just reimplement a minimal flat-set API for this use case, and replace the QSet usages with it. On a testcase with 200 active particles, this reduces memory allocations from ~20'000 per second to 0 when the scene is "stable". Pick-to: 5.15 Change-Id: I4be1e12a23b8dffca91955148532db243e383a4c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Store DXBC instead of HLSL source in the qsb filesLaszlo Agocs2020-05-2611-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the -c argument when invoking qsb. The scripts are batch files already so they imply being run on Windows. With a standard VS prompt one gets fxc in the PATH too so we can let qsb invoke it. The result is that the built-in materials' qsb files do not contain HLSL source code anymore, rather they have the intermediate format with bytecode (conceptually this is like SPIR-V). So at run time there are no calls to d3dCompile() anymore when these shaders are involved. What does this mean in practice? With a few select examples: shapes, opening the Gallery view - before: 80 ms spent on HLSL source compilation - after: 0 ms. imageparticle, opening the first 3 views - before: 166 ms spent on HLSL source compilation - after: 0 ms shadereffects - before: 77 ms spent on HLSL source compilation - after: 29 ms (because this has custom shaders that still ship HLSL source) Long term this can hopefully be folded into qsb's to-be-implemented build system integration, so that it can automatically invoke the appropriate shader compiler on Windows and macOS. But for now we just do it manually and check in the regenerated .qsb files. Fixes: QTBUG-84268 Change-Id: Ibe2f80f99b3e52d5eb5eb808ea103cc766d22c04 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Move updateRhiTexture and co. to QSGTextureLaszlo Agocs2020-04-281-7/+7
| | | | | | | | | | | | | | | | | | | Use a more descriptive name, commitTextureOperations() in order to avoid confusion with QSGDynamicTexture::updateTexture() which has nothing to do with this. With this the QSGTexture interface has all 5.14 pending changes done (changes that were plumbed via ugly hacks due to having had to deal with binary compatibility). The awful enforcing of subclassing QSGTexturePrivate for each and every QSGTexture subclass is now eliminated. Purging the direct OpenGL code path will involve removing QSGTexture functions like textureId(), bind(), updateBindOptions(). With this patch we now we have all the equivalents (or, in some cases, spiritual successors) in place. Task-number: QTBUG-82997 Change-Id: I7a831f982070c52abc7a36604130a1110d14ff9c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QQuickItem: rename geometryChanged to geometryChangeMitch Curtis2020-04-232-3/+2
| | | | | | | | | | | | | | | | | | This brings it in line with the existing convention in this and other modules, where virtual handlers are named "nounChange"; e.g. itemChange. Signals are named "nounChanged". This also allows adding a geometryChanged signal, which would enable users to listen to one signal for all changes to x/y/width/height. [ChangeLog][QQuickItem] Renamed geometryChanged to geometryChange in order to follow existing naming conventions and have consistency with existing API, such as itemChange. Task-number: QTBUG-82994 Change-Id: I0547358c796a0047982ccfbf2c38bab952e7a634 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get rid of Q_OPENGL_ES* macrosEskil Abrahamsen Blomfeldt2020-04-171-4/+4
| | | | | | | | | | | | | | | | These macros are no longer defined, and we will use QT_CONFIG instead, since that is more robust (it checks against misspellings). This also removes some dead code from the WebKit code in Qt QML. The condition never resolved to true in our case since Qt QML does not depend on Qt GUI, so even before the macro would not be set. This is just a leftover anyway, as the graphical parts are not used in QML. Task-number: QTBUG-83467 Change-Id: I2c4b7f928538cc75ce408deb357f8fd92a84d8e4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Store a QV4::ReturnedValue in QJSValueUlf Hermann2020-03-183-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being careful, we can now save primitive values inline. We use the heap pointer of QV4::Value as either QString* or QV4::Value* for complex types. We cannot store persistent managed QV4::Value without the double indirection as those need to be allocated in a special place. The generic QVariant case is not supported anymore. The only place where it was actually needed were the stream operators for QJSValue. Those were fundamentally broken: * A managed QJSValue saved and loaded from a stream was converted to a QVariant-type QJSValue * QVariant-type QJSValues were not callable, could not be objects or arrays, or any of the special types. * Cyclic references were forcibly broken when saving to a data stream. In general the support for saving and loading of managed types to/from a data stream was so abysmally bad that we don't lose much by dropping it. [ChangeLog][QML][Important Behavior Changes] When saving a QJSValue to a QDataStream only primitive values or strings will be retained. Support for objects and arrays was incomplete and unreliable already before. It cannot work correctly as we don't necessarily have a JavaScript heap when loading a QJSValue from a stream. Therefore, we don't have a proper place to keep any managed values. Using QVariant to keep them instead is a bad idea because QVariant cannot represent everything a QJSValue can contain. Fixes: QTBUG-75174 Change-Id: I75697670639bca8d4b1668763d7020c4cf871bda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-03-121-0/+135
|\ | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ifff48b9d0e7962d481e63c49399e2d304e1011e5
| * CMake: Regenerate and adapt to merge from devwip/cmakeAlexandru Croitor2020-03-121-2/+2
| | | | | | | | | | | | Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
| * Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-1233-14/+51
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * | Regenerate qtdeclarativeAlexandru Croitor2020-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Regenerate projects to handle private deps correctlyAlexandru Croitor2020-02-051-6/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ifcbab0407e93dfc35d0459d7d29dee2cd3508a86 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Post-merge fixesAlexandru Croitor2020-01-301-2/+2
| | | | | | | | | | | | | | | Change-Id: I2350df5368ee34d6c7072d456806e518ce533839 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-2912-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * | | QML Type Registrar changesLeander Beernaert2020-01-241-0/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: I36254a688f575e6c7f717ee4019e4d49f73a60f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Post merge fixesLeander Beernaert2020-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie8aca222809f35174fb6c6488832ec3ff5432272 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-1617-96/+67
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * \ \ \ Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-252-2/+17
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * | | | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | Regenerate projectsAlexandru Croitor2019-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-1435-66/+119
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * | | | | | Regenerate the necessary bits of qtdeclarative after wip/qt6 mergeAlexandru Croitor2019-10-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If58c29baf7fa3c3591968fca6d11f7649308dbf9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-1118-147/+884
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * | | | | | | Regenerate qtdeclarative before mergeAlexandru Croitor2019-10-111-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5710110679220c4e22bc7f8b540f18a51b735ddf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
| * | | | | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-241-0/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I52b2d17d9334313e4b3d84b52432f2ebc77f7415
| * \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-111-1/+1
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2963c1209316fb6755f572969f368970450d7991
| * | | | | | | | | More porting of declarative modulesAlexandru Croitor2019-06-081-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibe6d87998af1209518af87117b79778136110786 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-114-7/+1
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Change-Id: I0d32fc5b99f8c9e4acb922fffe4dd5f3c5be553c
| * | | | | | | | | 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>
* | | | | | | | | | Fix all import versionsUlf Hermann2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump all the *.15 versions to QT_VERSION and use QML_IMPORT_VERSION rather than IMPORT_VERSION. Change-Id: I5bfbc960d119a7386bdcedb9bdbfdbfa4486a187 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | | | | | | Add major version to all Q_REVISIONsUlf Hermann2020-02-1928-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | Quick: Don't qualify OpenGL includes (part two)Johan Klokkhammer Helsing2020-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 406f15ce0e only removed the "QtGui" prefix from some includes, but we are trying to move (almost) everything OpenGL related from QtGui. This removes prefixes for additional QOpenGL includes (QOpenGLShaderProgram, versioned opengl functions etc.). Task-number: QTBUG-74409 Change-Id: I91e1feac0676859f11de9b75301a0a4e81db50d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-173-12/+21
|\| | | | | | | | | | |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
| * | | | | | | | 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>
* | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-2510-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icb61522fb41a35303bb3d201b344a0407f67f9a0