diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-14 03:47:38 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-22 20:47:44 +0300 |
commit | 7671478aad2d2a48148852e9ce5a5b598a59f23d (patch) | |
tree | eb43de049f0d0c74d586f276d544988ab3797e90 /src | |
parent | 670144a660823238ca286d5b631c9e1ae7dd8f00 (diff) |
Build with QT_NO_CONTEXTLESS_CONNECT
This disables the 3-arg QObject::connect() overload:
QObject::connect(sender, signal, functor)
For details see:
https://lists.qt-project.org/pipermail/development/2023-July/044141.html
Change-Id: If62d07f687d9ea86995ea813add49216ccaf15cc
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
39 files changed, 90 insertions, 35 deletions
diff --git a/src/animation/CMakeLists.txt b/src/animation/CMakeLists.txt index 9e2f99a9b..349920d6e 100644 --- a/src/animation/CMakeLists.txt +++ b/src/animation/CMakeLists.txt @@ -72,6 +72,7 @@ qt_internal_add_module(3DAnimation qt3danimation_global.h qt3danimation_global_p.h DEFINES QT3DANIMATION_LIBRARY + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES backend frontend diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 359cd521f..bb23d0a18 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -80,6 +80,8 @@ qt_internal_add_module(3DCore transforms/vector3d_p.h transforms/vector4d_p.h vector_helper_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} aspect diff --git a/src/core/aspects/aspectcommanddebugger.cpp b/src/core/aspects/aspectcommanddebugger.cpp index d2d19d011..f0dca3ca4 100644 --- a/src/core/aspects/aspectcommanddebugger.cpp +++ b/src/core/aspects/aspectcommanddebugger.cpp @@ -53,17 +53,17 @@ AspectCommandDebugger::AspectCommandDebugger(QSystemInformationService *parent) void AspectCommandDebugger::initialize() { - QObject::connect(this, &QTcpServer::newConnection, [this] { + QObject::connect(this, &QTcpServer::newConnection, this, [this] { QTcpSocket *socket = nextPendingConnection(); m_connections.push_back(socket); - QObject::connect(socket, &QTcpSocket::disconnected, [this, socket] { + QObject::connect(socket, &QTcpSocket::disconnected, this, [this, socket] { m_connections.removeOne(socket); // Destroy object to make sure all QObject connection are removed socket->deleteLater(); }); - QObject::connect(socket, &QTcpSocket::readyRead, [this, socket] { + QObject::connect(socket, &QTcpSocket::readyRead, this, [this, socket] { onCommandReceived(socket); }); }); diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h index faca3db70..b2a61fbbe 100644 --- a/src/core/nodes/qnode_p.h +++ b/src/core/nodes/qnode_p.h @@ -86,7 +86,7 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func]() { (static_cast<Caller *>(q)->*func)(nullptr); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename NodeType> @@ -95,7 +95,7 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func, node]() { (static_cast<Caller *>(q)->*func)(node); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename NodeType> @@ -104,7 +104,7 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func, node]() { (static_cast<Caller *>(q)->*func)(node); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename ValueType> @@ -117,15 +117,16 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func, resetValue]() { (static_cast<Caller *>(q)->*func)(resetValue); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename NodeType> void registerPrivateDestructionHelper(NodeType *node, DestructionFunctionPointer<Caller, NodeType> func) { + Q_Q(QNode); // If the node is destoyed, we make sure not to keep a dangling pointer to it auto f = [this, func, node]() { (static_cast<Caller *>(this)->*func)(node); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } void unregisterDestructionHelper(QNode *node) diff --git a/src/extras/CMakeLists.txt b/src/extras/CMakeLists.txt index 7e55cffa9..18276a359 100644 --- a/src/extras/CMakeLists.txt +++ b/src/extras/CMakeLists.txt @@ -64,6 +64,7 @@ qt_internal_add_module(3DExtras text/qtextureatlas_p_p.h DEFINES QT3DEXTRAS_LIBRARY + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES 3dtext defaults diff --git a/src/input/CMakeLists.txt b/src/input/CMakeLists.txt index 888c63c44..1c8f70643 100644 --- a/src/input/CMakeLists.txt +++ b/src/input/CMakeLists.txt @@ -75,6 +75,7 @@ qt_internal_add_module(3DInput qt3dinput_global.h qt3dinput_global_p.h DEFINES QT3DINPUT_LIBRARY + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES backend frontend diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp index 22b3c13a9..e2731043e 100644 --- a/src/input/frontend/qaxis.cpp +++ b/src/input/frontend/qaxis.cpp @@ -44,7 +44,7 @@ QAxis::QAxis(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QAxisPrivate(), parent) { Q_D(QAxis); - connect(this, &QAxis::enabledChanged, [d]() { + connect(this, &QAxis::enabledChanged, this, [d]() { d->setValue(0.); }); } diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp index dab6d95cd..31b3e609e 100644 --- a/src/input/frontend/qmousehandler.cpp +++ b/src/input/frontend/qmousehandler.cpp @@ -23,7 +23,7 @@ QMouseHandlerPrivate::QMouseHandlerPrivate() m_shareable = false; m_pressAndHoldTimer->setSingleShot(true); m_pressAndHoldTimer->setInterval(800); - QObject::connect(m_pressAndHoldTimer, &QTimer::timeout, [this] { + QObject::connect(m_pressAndHoldTimer, &QTimer::timeout, q_func(), [this] { emit q_func()->pressAndHold(m_lastPressedEvent.data()); }); } diff --git a/src/logic/CMakeLists.txt b/src/logic/CMakeLists.txt index c8f80b8c5..2776d9d3f 100644 --- a/src/logic/CMakeLists.txt +++ b/src/logic/CMakeLists.txt @@ -19,6 +19,8 @@ qt_internal_add_module(3DLogic qframeaction.cpp qframeaction.h qframeaction_p.h qlogicaspect.cpp qlogicaspect.h qlogicaspect_p.h qt3dlogic_global.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} LIBRARIES diff --git a/src/plugins/geometryloaders/default/CMakeLists.txt b/src/plugins/geometryloaders/default/CMakeLists.txt index 5143018af..7454b2041 100644 --- a/src/plugins/geometryloaders/default/CMakeLists.txt +++ b/src/plugins/geometryloaders/default/CMakeLists.txt @@ -16,6 +16,8 @@ qt_internal_add_plugin(DefaultGeometryLoaderPlugin objgeometryloader.cpp plygeometryloader.cpp stlgeometryloader.cpp + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/plugins/geometryloaders/fbx/CMakeLists.txt b/src/plugins/geometryloaders/fbx/CMakeLists.txt index b15a99660..ce07a9c92 100644 --- a/src/plugins/geometryloaders/fbx/CMakeLists.txt +++ b/src/plugins/geometryloaders/fbx/CMakeLists.txt @@ -13,6 +13,8 @@ qt_internal_add_plugin(fbxGeometryLoaderPlugin SOURCES fbxgeometryloader.cpp fbxgeometryloader.h main.cpp + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/plugins/geometryloaders/gltf/CMakeLists.txt b/src/plugins/geometryloaders/gltf/CMakeLists.txt index 347be7e56..f3ec13bc5 100644 --- a/src/plugins/geometryloaders/gltf/CMakeLists.txt +++ b/src/plugins/geometryloaders/gltf/CMakeLists.txt @@ -13,6 +13,8 @@ qt_internal_add_plugin(GLTFGeometryLoaderPlugin SOURCES gltfgeometryloader.cpp gltfgeometryloader.h main.cpp + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/plugins/renderers/opengl/CMakeLists.txt b/src/plugins/renderers/opengl/CMakeLists.txt index 82328d1f9..ca151229c 100644 --- a/src/plugins/renderers/opengl/CMakeLists.txt +++ b/src/plugins/renderers/opengl/CMakeLists.txt @@ -72,6 +72,7 @@ if(QT_FEATURE_private_tests) BUILD_QT3D_MODULE QT_BUILDING_QT QT_NO_FOREACH + QT_NO_CONTEXTLESS_CONNECT ) qt_internal_extend_target(OpenGLRendererLib CONDITION NOT INTEGRITY @@ -100,6 +101,7 @@ qt_internal_add_plugin(OpenGLRendererPlugin DEFINES BUILD_QT3D_MODULE QT_BUILDING_QT + QT_NO_CONTEXTLESS_CONNECT QT_NO_FOREACH INCLUDE_DIRECTORIES graphicshelpers diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp index 478fc8f2e..b62cad811 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp @@ -380,7 +380,7 @@ GraphicsHelperInterface *GraphicsContext::resolveHighestOpenGLFunctions() qCDebug(Backend) << "Qt3D: Enabling OpenGL debug logging"; m_debugLogger.reset(new QOpenGLDebugLogger); if (m_debugLogger->initialize()) { - QObject::connect(m_debugLogger.data(), &QOpenGLDebugLogger::messageLogged, &logOpenGLDebugMessage); + QObject::connect(m_debugLogger.data(), &QOpenGLDebugLogger::messageLogged, m_debugLogger.data(), &logOpenGLDebugMessage); const QString mode = QString::fromLocal8Bit(debugLoggingMode); m_debugLogger->startLogging(mode.startsWith(QLatin1String("sync"), Qt::CaseInsensitive) ? QOpenGLDebugLogger::SynchronousLogging diff --git a/src/plugins/renderers/opengl/renderer/glshader.cpp b/src/plugins/renderers/opengl/renderer/glshader.cpp index 7dbc89571..fdd2a710c 100644 --- a/src/plugins/renderers/opengl/renderer/glshader.cpp +++ b/src/plugins/renderers/opengl/renderer/glshader.cpp @@ -79,6 +79,7 @@ void GLShader::setGraphicsContext(GraphicsContext *context) if (m_graphicsContext) { m_contextConnection = QObject::connect(m_graphicsContext->openGLContext(), &QOpenGLContext::aboutToBeDestroyed, + m_graphicsContext->openGLContext(), [this] { setGraphicsContext(nullptr); }); } } diff --git a/src/plugins/renderers/opengl/renderer/renderer.cpp b/src/plugins/renderers/opengl/renderer/renderer.cpp index f7a9e8b6d..fa2d27486 100644 --- a/src/plugins/renderers/opengl/renderer/renderer.cpp +++ b/src/plugins/renderers/opengl/renderer/renderer.cpp @@ -437,12 +437,12 @@ void Renderer::initialize() qCWarning(Backend) << Q_FUNC_INFO << "OpenGL context creation failed"; m_ownedContext = true; - QObject::connect(m_glContext, &QOpenGLContext::aboutToBeDestroyed, + QObject::connect(m_glContext, &QOpenGLContext::aboutToBeDestroyed, m_glContext, [this] { m_frameProfiler.reset(); }); } else { // Context is not owned by us, so we need to know if it gets destroyed m_contextConnection = QObject::connect(m_glContext, &QOpenGLContext::aboutToBeDestroyed, - [this] { releaseGraphicsResources(); }); + m_glContext, [this] { releaseGraphicsResources(); }); } qCDebug(Backend) << "Qt3D shared context:" << m_glContext->shareContext(); diff --git a/src/plugins/renderers/rhi/CMakeLists.txt b/src/plugins/renderers/rhi/CMakeLists.txt index 9e5e4383f..11b45429f 100644 --- a/src/plugins/renderers/rhi/CMakeLists.txt +++ b/src/plugins/renderers/rhi/CMakeLists.txt @@ -74,6 +74,7 @@ qt_internal_add_plugin(RhiRendererPlugin DEFINES BUILD_QT3D_MODULE QT_BUILDING_QT + QT_NO_CONTEXTLESS_CONNECT QT_NO_FOREACH QT_NO_FOREACH INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/src/plugins/renderplugins/scene2d/CMakeLists.txt b/src/plugins/renderplugins/scene2d/CMakeLists.txt index 21ddbb018..5ca0556fb 100644 --- a/src/plugins/renderplugins/scene2d/CMakeLists.txt +++ b/src/plugins/renderplugins/scene2d/CMakeLists.txt @@ -13,6 +13,8 @@ qt_internal_add_plugin(Scene2DPlugin SOURCES main.cpp scene2dplugin.cpp scene2dplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/plugins/sceneparsers/assimp/CMakeLists.txt b/src/plugins/sceneparsers/assimp/CMakeLists.txt index 773b0bf2e..6d9d44c20 100644 --- a/src/plugins/sceneparsers/assimp/CMakeLists.txt +++ b/src/plugins/sceneparsers/assimp/CMakeLists.txt @@ -15,6 +15,8 @@ qt_internal_add_plugin(AssimpSceneImportPlugin assimphelpers.cpp assimphelpers.h assimpimporter.cpp assimpimporter.h main.cpp + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DAnimation Qt::3DCore diff --git a/src/plugins/sceneparsers/gltf/CMakeLists.txt b/src/plugins/sceneparsers/gltf/CMakeLists.txt index c39b2de6b..efef61522 100644 --- a/src/plugins/sceneparsers/gltf/CMakeLists.txt +++ b/src/plugins/sceneparsers/gltf/CMakeLists.txt @@ -13,6 +13,8 @@ qt_internal_add_plugin(GLTFSceneImportPlugin SOURCES gltfimporter.cpp gltfimporter.h main.cpp + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/plugins/sceneparsers/gltfexport/CMakeLists.txt b/src/plugins/sceneparsers/gltfexport/CMakeLists.txt index 234b19523..bdf28a40b 100644 --- a/src/plugins/sceneparsers/gltfexport/CMakeLists.txt +++ b/src/plugins/sceneparsers/gltfexport/CMakeLists.txt @@ -13,6 +13,8 @@ qt_internal_add_plugin(GLTFSceneExportPlugin SOURCES gltfexporter.cpp gltfexporter.h main.cpp + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/quick3d/imports/animation/CMakeLists.txt b/src/quick3d/imports/animation/CMakeLists.txt index 51d5bd4f5..97b57fe64 100644 --- a/src/quick3d/imports/animation/CMakeLists.txt +++ b/src/quick3d/imports/animation/CMakeLists.txt @@ -21,6 +21,8 @@ qt_internal_add_qml_module(quick3danimationplugin INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" SOURCES qt3dquick3danimationplugin.cpp qt3dquick3danimationplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DAnimation Qt::3DCore diff --git a/src/quick3d/imports/extras/CMakeLists.txt b/src/quick3d/imports/extras/CMakeLists.txt index 404af9a06..32c03ed41 100644 --- a/src/quick3d/imports/extras/CMakeLists.txt +++ b/src/quick3d/imports/extras/CMakeLists.txt @@ -21,6 +21,8 @@ qt_internal_add_qml_module(quick3dextrasplugin Qt3D.Logic/auto SOURCES qt3dquick3dextrasplugin.cpp qt3dquick3dextrasplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/quick3d/imports/input/CMakeLists.txt b/src/quick3d/imports/input/CMakeLists.txt index f219b7d54..4f1560121 100644 --- a/src/quick3d/imports/input/CMakeLists.txt +++ b/src/quick3d/imports/input/CMakeLists.txt @@ -17,6 +17,8 @@ qt_internal_add_qml_module(quick3dinputplugin PLUGIN_TARGET quick3dinputplugin SOURCES qt3dquick3dinputforeign_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DInput diff --git a/src/quick3d/imports/logic/CMakeLists.txt b/src/quick3d/imports/logic/CMakeLists.txt index 234e24830..06d7b5542 100644 --- a/src/quick3d/imports/logic/CMakeLists.txt +++ b/src/quick3d/imports/logic/CMakeLists.txt @@ -18,6 +18,8 @@ qt_internal_add_qml_module(quick3dlogicplugin INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" SOURCES qt3dquick3dlogicplugin.cpp qt3dquick3dlogicplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore 3DLogic diff --git a/src/quick3d/imports/render/CMakeLists.txt b/src/quick3d/imports/render/CMakeLists.txt index ebce125ac..16e162014 100644 --- a/src/quick3d/imports/render/CMakeLists.txt +++ b/src/quick3d/imports/render/CMakeLists.txt @@ -20,6 +20,8 @@ qt_internal_add_qml_module(quick3drenderplugin INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" SOURCES qt3dquick3drenderplugin.cpp qt3dquick3drenderplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DQuick diff --git a/src/quick3d/imports/scene2d/CMakeLists.txt b/src/quick3d/imports/scene2d/CMakeLists.txt index 9f891edb3..9e0329e78 100644 --- a/src/quick3d/imports/scene2d/CMakeLists.txt +++ b/src/quick3d/imports/scene2d/CMakeLists.txt @@ -18,6 +18,8 @@ qt_internal_add_qml_module(qtquickscene2dplugin INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" SOURCES qtquickscene2dplugin.cpp qtquickscene2dplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DQuickScene2D diff --git a/src/quick3d/imports/scene3d/CMakeLists.txt b/src/quick3d/imports/scene3d/CMakeLists.txt index af9aa835e..945e128f5 100644 --- a/src/quick3d/imports/scene3d/CMakeLists.txt +++ b/src/quick3d/imports/scene3d/CMakeLists.txt @@ -24,6 +24,8 @@ qt_internal_add_qml_module(qtquickscene3dplugin scene3dsgmaterial.cpp scene3dsgmaterial_p.h scene3dsgmaterialshader.cpp scene3dsgmaterialshader_p.h scene3dsgnode.cpp scene3dsgnode_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DRender diff --git a/src/quick3d/quick3d/CMakeLists.txt b/src/quick3d/quick3d/CMakeLists.txt index 09ba3f694..9b7f0c540 100644 --- a/src/quick3d/quick3d/CMakeLists.txt +++ b/src/quick3d/quick3d/CMakeLists.txt @@ -32,6 +32,8 @@ qt_internal_add_qml_module(3DQuick qt3dquickforeign_p.h qt3dquicknodefactory.cpp qt3dquicknodefactory_p.h qt3dquickvaluetypes.cpp qt3dquickvaluetypes_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES items LIBRARIES @@ -74,6 +76,8 @@ qt_internal_extend_target(quick3dcoreplugin SOURCES ../imports/core/qt3dquick3dcoreplugin.cpp ../imports/core/qt3dquick3dcoreplugin.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT LIBRARIES Qt::3DCore Qt::3DCorePrivate diff --git a/src/quick3d/quick3danimation/CMakeLists.txt b/src/quick3d/quick3danimation/CMakeLists.txt index e1b309999..cb704e9b4 100644 --- a/src/quick3d/quick3danimation/CMakeLists.txt +++ b/src/quick3d/quick3danimation/CMakeLists.txt @@ -18,6 +18,8 @@ qt_internal_add_module(3DQuickAnimation items/quick3dvertexblendanimation.cpp items/quick3dvertexblendanimation_p.h qt3dquickanimation_global.cpp qt3dquickanimation_global.h qt3dquickanimation_global_p.h qt3dquickanimationnodefactory.cpp qt3dquickanimationnodefactory_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES items LIBRARIES diff --git a/src/quick3d/quick3dextras/CMakeLists.txt b/src/quick3d/quick3dextras/CMakeLists.txt index 29111c4d5..d6118c916 100644 --- a/src/quick3d/quick3dextras/CMakeLists.txt +++ b/src/quick3d/quick3dextras/CMakeLists.txt @@ -16,6 +16,8 @@ qt_internal_add_module(3DQuickExtras qt3dquickextrasnodefactory.cpp qt3dquickextrasnodefactory_p.h qt3dquickwindow.cpp qt3dquickwindow.h qt3dquickwindow_p.h qt3dquickwindowlogging.cpp qt3dquickwindowlogging_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES items LIBRARIES diff --git a/src/quick3d/quick3dinput/CMakeLists.txt b/src/quick3d/quick3dinput/CMakeLists.txt index 0c517575c..1caaad941 100644 --- a/src/quick3d/quick3dinput/CMakeLists.txt +++ b/src/quick3d/quick3dinput/CMakeLists.txt @@ -17,6 +17,8 @@ qt_internal_add_module(3DQuickInput items/quick3dphysicaldevice.cpp items/quick3dphysicaldevice_p.h qt3dquickinput_global.cpp qt3dquickinput_global.h qt3dquickinput_global_p.h qt3dquickinputnodefactory.cpp qt3dquickinputnodefactory_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES items LIBRARIES diff --git a/src/quick3d/quick3drender/CMakeLists.txt b/src/quick3d/quick3drender/CMakeLists.txt index 3e0990e32..6e232019f 100644 --- a/src/quick3d/quick3drender/CMakeLists.txt +++ b/src/quick3d/quick3drender/CMakeLists.txt @@ -32,6 +32,8 @@ qt_internal_add_module(3DQuickRender items/quick3dviewport.cpp items/quick3dviewport_p.h qt3dquickrender_global.cpp qt3dquickrender_global.h qt3dquickrender_global_p.h qt3dquickrendernodefactory.cpp qt3dquickrendernodefactory_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES items LIBRARIES diff --git a/src/quick3d/quick3dscene2d/CMakeLists.txt b/src/quick3d/quick3dscene2d/CMakeLists.txt index a5ee806ee..1a63e2fd3 100644 --- a/src/quick3d/quick3dscene2d/CMakeLists.txt +++ b/src/quick3d/quick3dscene2d/CMakeLists.txt @@ -18,6 +18,8 @@ qt_internal_add_module(3DQuickScene2D qt3dquickscene2d_global.cpp qt3dquickscene2d_global.h qt3dquickscene2d_global_p.h qt3dquickscene2d_logging.cpp qt3dquickscene2d_logging_p.h qt3dquickscene2dnodefactory.cpp qt3dquickscene2dnodefactory_p.h + DEFINES + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES items LIBRARIES diff --git a/src/render/CMakeLists.txt b/src/render/CMakeLists.txt index 93b5e7a0a..32e1a4bd2 100644 --- a/src/render/CMakeLists.txt +++ b/src/render/CMakeLists.txt @@ -282,6 +282,7 @@ qt_internal_add_module(3DRender texture/textureimage.cpp texture/textureimage_p.h DEFINES BUILD_QT3D_MODULE + QT_NO_CONTEXTLESS_CONNECT INCLUDE_DIRECTORIES backend framegraph diff --git a/src/render/framegraph/qrendersurfaceselector.cpp b/src/render/framegraph/qrendersurfaceselector.cpp index 0f0339b8f..654622da1 100644 --- a/src/render/framegraph/qrendersurfaceselector.cpp +++ b/src/render/framegraph/qrendersurfaceselector.cpp @@ -214,13 +214,13 @@ void QRenderSurfaceSelector::setSurface(QObject *surfaceObject) d->m_surfaceEventFilter->setSurface(window); if (window) { - d->m_widthConn = QObject::connect(window, &QWindow::widthChanged, [=] (int) { + d->m_widthConn = QObject::connect(window, &QWindow::widthChanged, this, [d]() { d->update(); }); - d->m_heightConn = QObject::connect(window, &QWindow::heightChanged, [=] (int) { + d->m_heightConn = QObject::connect(window, &QWindow::heightChanged, this, [d]() { d->update(); }); - d->m_screenConn = QObject::connect(window, &QWindow::screenChanged, [this] (QScreen *screen) { + d->m_screenConn = QObject::connect(window, &QWindow::screenChanged, this, [this] (QScreen *screen) { if (screen && !qFuzzyCompare(surfacePixelRatio(), float(screen->devicePixelRatio()))) setSurfacePixelRatio(float(screen->devicePixelRatio())); }); diff --git a/src/render/renderstates/qstenciloperation.cpp b/src/render/renderstates/qstenciloperation.cpp index a859b8e2c..600696ad1 100644 --- a/src/render/renderstates/qstenciloperation.cpp +++ b/src/render/renderstates/qstenciloperation.cpp @@ -72,15 +72,15 @@ QStencilOperation::QStencilOperation(QNode *parent) const auto resend = [d]() { d->update(); }; - (void) connect(d->m_front, &QStencilOperationArguments::allTestsPassOperationChanged, resend); - (void) connect(d->m_front, &QStencilOperationArguments::depthTestFailureOperationChanged, resend); - (void) connect(d->m_front, &QStencilOperationArguments::stencilTestFailureOperationChanged, resend); - (void) connect(d->m_front, &QStencilOperationArguments::faceModeChanged, resend); - - (void) connect(d->m_back, &QStencilOperationArguments::allTestsPassOperationChanged, resend); - (void) connect(d->m_back, &QStencilOperationArguments::depthTestFailureOperationChanged, resend); - (void) connect(d->m_back, &QStencilOperationArguments::stencilTestFailureOperationChanged, resend); - (void) connect(d->m_back, &QStencilOperationArguments::faceModeChanged, resend); + (void) connect(d->m_front, &QStencilOperationArguments::allTestsPassOperationChanged, this, resend); + (void) connect(d->m_front, &QStencilOperationArguments::depthTestFailureOperationChanged, this, resend); + (void) connect(d->m_front, &QStencilOperationArguments::stencilTestFailureOperationChanged, this, resend); + (void) connect(d->m_front, &QStencilOperationArguments::faceModeChanged, this, resend); + + (void) connect(d->m_back, &QStencilOperationArguments::allTestsPassOperationChanged, this, resend); + (void) connect(d->m_back, &QStencilOperationArguments::depthTestFailureOperationChanged, this, resend); + (void) connect(d->m_back, &QStencilOperationArguments::stencilTestFailureOperationChanged, this, resend); + (void) connect(d->m_back, &QStencilOperationArguments::faceModeChanged, this, resend); } /*! \internal */ diff --git a/src/render/renderstates/qstenciltest.cpp b/src/render/renderstates/qstenciltest.cpp index 310982516..8f94afffb 100644 --- a/src/render/renderstates/qstenciltest.cpp +++ b/src/render/renderstates/qstenciltest.cpp @@ -73,15 +73,15 @@ QStencilTest::QStencilTest(QNode *parent) const auto resend = [d]() { d->update(); }; - (void) connect(d->m_front, &QStencilTestArguments::comparisonMaskChanged, resend); - (void) connect(d->m_front, &QStencilTestArguments::faceModeChanged, resend); - (void) connect(d->m_front, &QStencilTestArguments::referenceValueChanged, resend); - (void) connect(d->m_front, &QStencilTestArguments::stencilFunctionChanged, resend); - - (void) connect(d->m_back, &QStencilTestArguments::comparisonMaskChanged, resend); - (void) connect(d->m_back, &QStencilTestArguments::faceModeChanged, resend); - (void) connect(d->m_back, &QStencilTestArguments::referenceValueChanged, resend); - (void) connect(d->m_back, &QStencilTestArguments::stencilFunctionChanged, resend); + (void) connect(d->m_front, &QStencilTestArguments::comparisonMaskChanged, this, resend); + (void) connect(d->m_front, &QStencilTestArguments::faceModeChanged, this, resend); + (void) connect(d->m_front, &QStencilTestArguments::referenceValueChanged, this, resend); + (void) connect(d->m_front, &QStencilTestArguments::stencilFunctionChanged, this, resend); + + (void) connect(d->m_back, &QStencilTestArguments::comparisonMaskChanged, this, resend); + (void) connect(d->m_back, &QStencilTestArguments::faceModeChanged, this, resend); + (void) connect(d->m_back, &QStencilTestArguments::referenceValueChanged, this, resend); + (void) connect(d->m_back, &QStencilTestArguments::stencilFunctionChanged, this, resend); } /*! \internal */ diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp index 0efa7c805..6f5fe5507 100644 --- a/src/render/texture/qtexture.cpp +++ b/src/render/texture/qtexture.cpp @@ -1483,7 +1483,7 @@ QTextureLoader::QTextureLoader(QNode *parent) if (!notificationsBlocked()) // check the change doesn't come from the backend d->updateGenerator(); }; - connect(this, &QAbstractTexture::formatChanged, regenerate); + connect(this, &QAbstractTexture::formatChanged, this, regenerate); } /*! \internal */ |