summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVector in openglJarek Kobus2020-06-2613-74/+62
| | | | | | Task-number: QTBUG-84469 Change-Id: I26c1cfab7f2d9aa5c71847ae02bfe0cf15c04a1b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Enable access to the VAO resolvers through QOpenGLContextPrivateGiuseppe D'Angelo2020-06-222-35/+48
| | | | | | | | | | | | | | | | | | | This is a commit in preparation for an upcoming change in QtQuick. We want to store the resolved functions for managing VAOs somewhere; the "least worst" choice is next to the all other function resolvers, which are in QOpenGLContext(Private). To avoid moving the VAO resolvers themselves, leave a hook in QOGLCPrivate, similar to e.g. the texture function resolvers. The hook gets populated when the VAO resolvers for a given context are requested. This removes memory management burden from the users of those functions (again, just like other function resolvers), and makes the initialization of the functions automatic. Change-Id: I0eba30a85bf8ad82946a5d68e91009d8b4bd91cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QOGLVAO::Binder: unexport a value classGiuseppe D'Angelo2020-06-181-1/+1
| | | | | Change-Id: Idd0261a30599d0eaeb6faffd0ff5615b5c45b670 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add more LTTNG tracing pointsJosé Dapena Paz2020-06-116-1/+23
| | | | | | | | | | | | * QImage and QPixmap copy and transform operations. * OpenGL paint engine texture cache texture upload * OpenGL paint engine draw texture Task-number: QTBUG-83347 Pick-to: 5.15 Change-Id: I03150d6ff80cbbcd787133d75854715cb81b5571 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Long live std::pair!Giuseppe D'Angelo2020-06-102-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QPair an alias for std::pair, and qMakePair just a forwarder towards std::make_pair. Why? Fundamentally to ditch a bunch of NIH code; gain for free structured bindings, std::tuple and std::reference_wrapper compatibility, and so on. Breakages: * Some that code manually forward declares QPair. We don't care about it (<QContainerFwd> is the proper way). * Some code that overloads on std::pair and QPair. Luckily it's mostly centralized: debug, metatypes, testing macros. Just remove the QPair overload. * Usages of qMakePair forcing the template type parameters. There are a handful of these in qtbase, but only one was actually broken. * std::pair is NOT (and will never likely be) trivially copiable. This is agreed to be a mistake done by practically all implementations in C++11, can can't be fixed without breaking ABI. Some code using QPair assuming it's trivially copiable may break; exactly one occurrence was in qtbase. * QMetaType logic extracts the type names in two different ways, one by looking at the source code string (e.g. extracted by moc) and one via some ad-hoc reflection in C++. We need to make "QPair" (as spelled in the source code) be the same as "std::pair" (gathered via reflection, which will see through the alias) when compared. The way it's already done e.g. for QList is by actually replacing the moc-extracted name with the name of the actual type used in C++; do the same here. On libc++, std::pair is actually in an inline namespace -- i.e. std::__1::pair; the reflection will extract and store "std::__1::pair" so we need an ad-hoc fix to QMetaType. [ChangeLog][QtCore][QPair] QPair is now an alias to std::pair, and does not exist as a class in Qt any more. This may break code such as functions overloaded for both QPair and std::pair. Usually, the overload taking a QPair can be safely discarded, leaving only the one taking a std::pair. QPair API has not changed, and qMakePair is still available for compatibility (although new code is encouraged to use std::pair and std::make_pair directly instead). Change-Id: I7725c751bf23946cde577b1406e86a336c0a3dcf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate src/openglAlexandru Croitor2020-05-292-5/+17
| | | | | Change-Id: I6a648c5fd2fa90e6e70d0ccffb34fd3cb1161e5e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move QPlatformBackingStoreOpenGLSupport handling out of platform pluginsTor Arne Vestbø2020-05-292-2/+12
| | | | | | | | Allows them to not depend on QtOpenGL just to provide the default backing store OpenGL support backend. Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-288-2/+1389
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Document how to use CMake for Qt OpenGLKai Koehne2020-05-267-97/+23
| | | | | | Task-number: QTBUG-73058 Change-Id: I8ba85fbba533c882ef63c56c1b9f20becfb36ebc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-224-0/+306
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Licenses: Remove reference to change in Qt 5.4Kai Koehne2020-05-221-3/+2
| | | | | | | Qt 5.4 is not documented anymore since quite some time. Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove a bunch of deprecated members from src/gui/painting classesVolker Hilsheimer2020-05-061-8/+1
| | | | | | | | Also remove dead code that isn't compiled anymore in Qt 6 builds. Change-Id: I7a7ae35e61fb2ad9cc21180fb7224357ade1505f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Avoid using qGuiApp in QOpenGLVao::destroy()Laszlo Agocs2020-04-211-1/+5
| | | | | | | | | | | | | There are convoluted cases, based on the backtrace attached to the associated bug report, where we attempt to destroy a QOpenGLVertexArrayObject during the destruction of Q(Gui)Application. Just avoid accessing qGuiApp in destroy(). Rather, store it in create(). Fixes: QTBUG-75138 Pick-to: 5.15 Change-Id: If8e67301c0843cbf3a409dcf427f44c42079de2f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Resolve OpenGL version functions in thread-safe mannerEskil Abrahamsen Blomfeldt2020-04-172-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | In 73f3f501f331444b3f188b21db7265f723e4f383, the classes were moved out of Qt Gui, and a mechanism to attach them to the QOpenGLContext was implemented using a QMap and a connection on destroyed to delete it. This solution was not thread-safe, so the suggestion was to either add a mutex or to make an opaque pointer for the storage in the (thread-affine) QOpenGLContextPrivate. I decided to go with the latter. A solution using hash lookups and mutexes seems to complex when the only benefit is to avoid forward declarations from Qt Gui to Qt OpenGL in private API. Especially since this dependency already exists with the "textureFunctions", which serve the same purpose, although the destructor is being passed in as an explicit function pointer there, probably because the ambition was to use a forward declaration rather than a superclass. Fixes: QTBUG-82742 Change-Id: I5c6b82c5b33d9cb73ad1ec05d3fc3e87a9eae4cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Get rid of QT_OPENGL_ES*Eskil Abrahamsen Blomfeldt2020-04-1742-112/+112
| | | | | | | | | | | The QT_OPENGL_ES* macros are leftovers from an earlier, ad hoc configuration system, which has since been replaced by QT_CONFIG. To clean things up in Qt 6, we use the new way instead. Task-number: QTBUG-83467 Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Minor tidying for header guard in qopenglversionfunctions_p.hEskil Abrahamsen Blomfeldt2020-04-171-3/+3
| | | | | | | | | The original was too close to QOPENGLVERSIONFUNCTIONS_H for comfort so to avoid future confusion or errors, just use the convention of matching the file name. Change-Id: I57fcc4da239ddec329f75ac29b254b5909c39bf0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move versioned OpenGL functions from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-04-1668-15/+105670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context—which lives in QtGui—now knows nothing about versioned functions. This changes the public API for getting version functions for a context. [ChangeLog][QtGui][OpenGL] QOpenGLContext::versionFunctions() has been removed. QOpenGLVersionFunctionsFactory::get() from the QtOpenGL module should be used instead. Previously one would call context->versionFunctions<QOpenGLFunctions_4_0_Core>(); Which now becomes QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context); The rest of the API should be identical. Since glgen no longer compiles, and the links to its input (gl.spec and gl.tm) are dead, I've edited the previously generated files manually. If glgen is fixed, it should be quite easy to make it generate the new way. Task-number: QTBUG-74409 Change-Id: I800527e0af16a79005b276eeb74417770193c62f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLBuffer from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-225-1/+767
| | | | | | Task-number: QTBUG-74409 Change-Id: I72c839e54f24810b2bde2385c568921c4e4a2869 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLVertexArrayObject from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-216-1/+767
| | | | | | Task-number: QTBUG-74409 Change-Id: I6442693ca2b28b3a66f0f4fb41843e1e404df32b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLShaderProgram from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-205-1/+4128
| | | | | | Task-number: QTBUG-74409 Change-Id: I20dfafc0c9bf8e2b68b03e171d70c2cb4ad2bfaf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Docs: Remove traces of QGLJohan Klokkhammer Helsing2020-02-201-4/+4
| | | | | | | | | The QGL* classes have been removed and the examples ported to QOpenGL, update the documentation to reflect that. Task-number: QTBUG-74408 Change-Id: Ibb4787cdeedc05a807d673943b61838f19092234 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLWidget from QtOpenGL to its own moduleJohan Klokkhammer Helsing2020-02-184-1604/+0
| | | | | | | | Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets. Task-number: QTBUG-74409 Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLFrameBufferObject from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-177-6/+2215
| | | | | | Task-number: QTBUG-74409 Change-Id: I817ea6f052fc61a6465d443450c8017ac5d0c0e9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-132-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * Doc/QtBase: replace some 0 with \nullptrChristian Ehrlicher2020-01-261-1/+1
| | | | | | | | | | | | | | | | | | Replace some 'is 0' or 'are 0' where 0 referes to a nullptr with 'is \nullptr' and 'are \nullptr' Change-Id: Ida9af2971924377efe2f49f435d79e109de2bdf4 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | CMake: Regenenerate projects where recent changes happenedAlexandru Croitor2020-02-111-0/+1
| | | | | | | | | | Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-102-0/+10
|\ \ | | | | | | | | | Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
| * | Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-052-0/+10
| | | | | | | | | | | | | | | | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-072-0/+114
|\| |
| * | Post-merge fixesAlexandru Croitor2020-01-302-26/+40
| | | | | | | | | | | | | | | Change-Id: I6acd29103f6cc550544e7422328d97ea0e2dcafb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-2931-3/+16113
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * | | Post Merge FixesLeander Beernaert2020-01-241-26/+12
| | | | | | | | | | | | | | | | | | | | Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-2451-24503/+5470
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * | | | Regenerate src/*Alexandru Croitor2019-11-142-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | Regenerate everything under ./srcAlexandru Croitor2019-11-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
| * | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-141-0/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * | | | | Fix add_qt_docs callsSimon Hausmann2019-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Brown paper bag for me, don't use a comma to separate parameters when calling a function. Change-Id: I21e16142fab4fd1c2714df13cd6a892b036e899a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | | | Re-generate main module CMake filesSimon Hausmann2019-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the calls to add_qt_docs to include the target. Change-Id: I2c4c807bca8faa48bb49f4b8710035f21abfca0e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Regenerate src/openglAlexandru Croitor2019-09-111-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I68738f98cab12e888a49f52ba8fbd6901752ccd2 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-116-12/+11
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * | | | | | Fix OpenGL vs. GLESv2 linkage, attempt number threeSimon Hausmann2019-06-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduced WrapOpenGL to link against either desktop GL or GLESv2 depending on the GL feature in QtGui. This works "fine", with two caveats: (1) find_package(WrapOpenGL) must be called after find_package(Qt5Gui) in order for the feature check in FindWrapOpenGL.cmake to work. That's error prone. (2) More and more places are popping up, in particular examples, where GL linkage is required due to inline functions in Qt that forward to GL functions - such as on Android. This in particular explains the qmake behavior of making the GL linkage (desktop _or_ GLES) a public dependency of QtGui, so only Gui linkage is required. Those two aspects combined are the nail in the coffin of FindWrapOpenGL and it would seem much easier to simply make the Desktop GL vs. GLES decision once in Gui's CMakeLists.txt and let Qt5GuiDependencies.cmake propagate this well. This allows us to get rid of plenty of special cases as well. Change-Id: I3a7e8af49537ce5f215f24470e075a4ae9aeb944 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | | Regenerate the main qtbase modulesAlexandru Croitor2019-06-052-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some changes done in pro2cmake, so regenerate the main qtbase modules to keep everything up to date. Some new whitespace got added. Some special cases were removed (ZLIB). Some opengl code got moved around. Some plugin types were added. And some other minor things. Change-Id: Ie8cba4a9aa6b4b163c39d6cf546ea9e0bfc05c01 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-1/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * | | | | | | Regenerate openglAlexandru Croitor2019-05-202-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And add the first version of the .prev file. Change-Id: I96f27bce6d1c3107fb8c7b3758b29cfd944cf374 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * | | | | | | CMake: Regenerate src/openglTobias Hunger2019-05-061-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6a140b18f12cb048e2b113fb1cef38e224cc8417 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | | | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-1620-174/+295
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * | | | | | | | Fix architecture conditionsAlexandru Croitor2019-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual variable that contains the architecture is TEST_architecture_arch. TEST_architecture only contains the value if the test was performed or not. Fix the conversion script and all the generated files. Change-Id: Icb3480832cab894948f4fef03b8bc8187cab6152 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * | | | | | | | CMake: Re-generate openglTobias Hunger2019-04-021-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8aca37a7f07ced03500779c708374f7553684c37 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | | | | CMake: Add widgets examplesTobias Hunger2019-03-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib6142b93df066e3658eb189b50ca74c455fe7e56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | | | | CMake: Introduce Q_OBJECT qdoc macroTobias Hunger2019-01-253-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake's moc file scanning is rather primitive: It will run moc on any file containing a line that starts with Q_OBJECT (and similar macros). We have four files in QtBase that contain such a macro at the start of the line in a qdoc comment. These four files were excluded from automatic moc handling by cmake, which is not ideal, since this will silently fail when somebody actually adds a Q_OBJECT macro in code. This patch introduces a macro Q_OBJECT for qdoc. This macro will be replaced with Q_OBJECT in the generated documentation. While not nice, at least a failure to use \Q_OBJECT is noticeable: Moc will warn about the file. Change-Id: I829893c1166eee306fe30058d4ea0256affd45ea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>