aboutsummaryrefslogtreecommitdiffstats
path: root/src/labs/sharedimage
Commit message (Collapse)AuthorAgeFilesLines
* Remove the use of GENERATE_CPP_EXPORTS argumentAlexey Edelev2024-06-111-1/+0
| | | | | | | | | The behavior that argument was enabling is the default one now. Pick-to: 6.8 Task-number: QTBUG-90492 Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d Reviewed-by: Alexandru Croitor <[email protected]>
* Remove the use of GENERATE_PRIVATE_CPP_EXPORTSAlexey Edelev2024-01-111-2/+1
| | | | | | | Task-number: QTBUG-117983 Change-Id: I584116bfd4d47deca914910b712c2ea3295f3e7f Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Mitch Curtis <[email protected]>
* Remove the use of Q_LABSSHAREDIMAGE_PRIVATE_EXPORTAlexey Edelev2024-01-093-4/+4
| | | | | | Task-number: QTBUG-117983 Change-Id: I81cd5377b9587468c896ed300a52510e3126065e Reviewed-by: Mitch Curtis <[email protected]>
* Include what you need: <QPointer>Marc Mutz2023-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I9b98cda524a0e6a61be7805edda708916bb2bc2b Reviewed-by: Ulf Hermann <[email protected]>
* Export QQuickPixmapKey and (renamed) QQuickPixmapCache for autotestsShawn Rutledge2023-09-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need to be able to do a leak check in tst_qquickpixmapcache. So we also need to use the singleton pattern rather than Q_GLOBAL_STATIC. Since it gets more exposed this way, make the badly-encapsulated parts of API available only to friends. It's always been bothersome that various other places in the code are including qquickpixmapcache_p.h to get QQuickPixmap, and qquickpixmapcache_p.h also does not include any class called QQuickPixmapCache as you'd expect; while arguably, QQuickPixmapStore is the cache. Often in comments I've needed to refer to "the code in qquickpixmapcache.cpp" because it's a very private, inbred family of related classes that don't match the header name. So now we split the headers: qquickpixmapcache_p.h is for the cache, which is now called QQuickPixmapCache; and qquickpixmap_p.h is the header most often needed in other places. Most classes in qquickpixmap_p.h are exported, but QQuickPixmapCache itself is not (except for autotests). It cannot be defined in the header that gets included in Particles for example: then it wouldn't link, because the implementation is not (and shouldn't be) exported, and that's not what Particles needs anyway. Task-number: QTBUG-81266 Task-number: QTBUG-114953 Change-Id: Ifd7f253b8bbaa130eb52d5546f342754f99f47bb Reviewed-by: Fabian Kosmale <[email protected]>
* SharedImageLoader: Do not use deprecated IPC mechanismFabian Kosmale2023-02-011-1/+1
| | | | | | Change-Id: If368424ffa75921c001a9a72c4c8e46779ae52e1 Reviewed-by: Matthias Rauter <[email protected]> Reviewed-by: Laszlo Agocs <[email protected]>
* Port from container::count() and length() to size() - V5Marc Mutz2022-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that on() was replaced with a matcher that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Change-Id: I58e1b41b91c34d2e860dbb5847b3752edbfc6fc9 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-071-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* Add license headers to cmake filesLucie Gérard2022-07-081-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-117-254/+14
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Re-run includemocs (new script version)Marc Mutz2022-05-051-0/+2
| | | | | | | | Task-number: QTBUG-102948 Pick-to: 6.3 6.2 5.15 Change-Id: I5684ead7b19aa3e4afd2cca8f0662a01cedb2785 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Add more missing QT_{BEGIN,END}_NAMESPACEMarc Mutz2022-05-042-0/+8
| | | | | | | | | Found by the includemoc script complaining. Task-number: QTBUG-102948 Pick-to: 6.3 6.2 5.15 Change-Id: Ie3c133c7c44c0617c54bc821da7ea992328d0d03 Reviewed-by: Shawn Rutledge <[email protected]>
* QtLabsSharedImage: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102948 Change-Id: I155cc3a2b5a26b9803afe9e5dff7a6e5609e2759 Reviewed-by: Mårten Nordheim <[email protected]>
* Fix deprecated uses of QScopedPointerMårten Nordheim2022-03-101-2/+3
| | | | | | | | Which is uses of take() and swap(). And replace it with std::unique_ptr. Change-Id: I2580383c1d2af0ba6103a66f034235905e0988ac Reviewed-by: Marc Mutz <[email protected]>
* Move registrations functions into the Qt namespaceUlf Hermann2022-02-011-0/+4
| | | | | | | | | | | It's high time we do this. We should not clobber the global namespace with type registration functions if the user has explicitly provided a namespace for Qt. Change-Id: Ibac49cb1c8976e65ea15d7a07d25ea1a5325a60a Reviewed-by: Andrei Golubev <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Move QObject and QQmlComponent into builtinsMaximilian Goldstein2021-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | Previously we had two versions of QObject and QQmlComponent: a hand-written version in bultins and one that is generated from QtQml. We now move the QtQml version into builtins in order to allow for representing the JavaScript extensions that are present in these types. We also add some logic so that unused types will still react properly despite the fact that those components are no longer in QtQml. This is done by introducing the concept of static modules. These are modules that have side effects beyond simply provinding components. This applies both to when some components are in builtins instead of QtQml or when the global object is modified in some way (i.e. by adding an image provider). This is a tooling-only concept and does not affect how these modules are handled at runtime. Fixes: QTBUG-99025 Change-Id: Ifacaa836e4d2eef0521494f5a41363e053c90007 Reviewed-by: Ulf Hermann <[email protected]>
* Doc: Drop version no. against the \qmlmoduleVenugopal Shivashankar2021-12-021-1/+1
| | | | | | | | | | | | Since Qt 6.x, it is not mandatory to have version no. against the module import statements. Pick-to: 6.2 6.2.2 Task-number: QTBUG-98481 Change-Id: Ia3d35f2dc198d3e9c02d15784ca07c9bbb9526ce Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Topi Reiniö <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* Migrate to autogenerated cpp exportsAlexey Edelev2021-11-022-14/+3
| | | | | | | | | Replace the hardcoded cpp exports with a generated one where it's applicable. Task-number: QTBUG-90492 Change-Id: I4af021bf828e05c8d6f3f975befd3b6b2cf63462 Reviewed-by: Alexandru Croitor <[email protected]>
* Refactor and update qml CMake APICraig Scott2021-06-043-13/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing CMake API for qml modules had a number of shortcomings. Refactor it to achieve the following: - Clearly separate public and internal aspects. - Re-use code from qtbase for adding plugins and module targets rather than reimplementing close variations. - Provide more robust and complete support for qmllint, qmlcachegen and automatic generation of qmldir files. - Reduce the steps needed for more common scenarios. - Encourage the use of separate backing library and plugin targets. - Automatically generate the plugin class .cpp file where possible. - Specify .qml files directly through qml-specific API elements rather than assuming they can be extracted out of a set of resources. [ChangeLog][QtQml] The qml CMake API has changed from 6.1 and is now out of Technical Preview status. The most notable change is that .qml files should no longer be specified as resources, there is dedicated handling for them in the qt6_add_qml_module(). A related change is that the qt6_target_qml_files() command has been replaced by qt6_target_qml_sources(). More complete integration with qmlcachegen, qmllint and qmldir generation is also part of the CMake API. Fixes: QTBUG-91621 Task-number: QTBUG-82598 Task-number: QTBUG-88763 Task-number: QTBUG-89274 Task-number: QTBUG-91444 Change-Id: I25aae1b0e89890394dfe2ba2824008164b2ca8d9 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* CMake: Remove GENERATE_METATYPES usageMaximilian Goldstein2021-04-271-1/+0
| | | | | | | | We now generate metatypes by default and every instance of GENERATE_METATYPES now causes a warning. Change-Id: Id81f66eb8b0b7cc9475fd9978ebe374a59ab7b63 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* CMake: Fix qml module version to use the repo project versionAlexandru Croitor2021-04-151-1/+1
| | | | | | | | | | | Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION, so that the repo project version is used in a top-level build, rather than the version of the qt5 project. Pick-to: 6.1 6.0 Task-number: QTBUG-92861 Change-Id: I5a7a09baf81353558e512800746ac24e8e8b9a47 Reviewed-by: Fabian Kosmale <[email protected]>
* Qt.labs.sharedimage: Make plugin optionalMaximilian Goldstein2021-01-256-0/+689
This moves the sharedimage types into a new library and is meant to make them availabe to the QML compiler at some point in the future. Task-number: QTBUG-90487 Change-Id: If79425a43cb8c1831422631791d35c1f329c7e80 Reviewed-by: Ulf Hermann <[email protected]>