From f460de6fdc0a67f0fc265b69c301cdf662a8554a Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Mon, 27 Dec 2021 07:40:20 +0100 Subject: Update Assimp qt_attributions following reuse of qtquick3d assimp submodule Change-Id: Ib32b4fcf50b135b012d6c4da4e9f68dad1b4936a Task-number: QTBUG-99414 Reviewed-by: Tarja Sundqvist (cherry picked from commit a96a379a6aeac867413330026a78ff71c19d34dc) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty/assimp/LICENSE | 53 +---------- src/3rdparty/assimp/qt_attribution.json | 153 +++----------------------------- 2 files changed, 16 insertions(+), 190 deletions(-) diff --git a/src/3rdparty/assimp/LICENSE b/src/3rdparty/assimp/LICENSE index 262606aff..0723ececf 100644 --- a/src/3rdparty/assimp/LICENSE +++ b/src/3rdparty/assimp/LICENSE @@ -1,11 +1,6 @@ -Open Asset Import Library (assimp) - -Copyright (c) 2006-2016, assimp team -All rights reserved. - Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the -following conditions are met: +with or without modification, are permitted provided that the following +conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the @@ -32,47 +27,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -****************************************************************************** - -AN EXCEPTION applies to all files in the ./test/models-nonbsd folder. -These are 3d models for testing purposes, from various free sources -on the internet. They are - unless otherwise stated - copyright of -their respective creators, which may impose additional requirements -on the use of their work. For any of these models, see -.source.txt for more legal information. Contact us if you -are a copyright holder and believe that we credited you inproperly or -if you don't want your files to appear in the repository. - - -****************************************************************************** - -Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors -http://code.google.com/p/poly2tri/ - -All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of Poly2Tri nor the names of its contributors may be - used to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/3rdparty/assimp/qt_attribution.json b/src/3rdparty/assimp/qt_attribution.json index e9a47c184..ccb148095 100644 --- a/src/3rdparty/assimp/qt_attribution.json +++ b/src/3rdparty/assimp/qt_attribution.json @@ -1,139 +1,14 @@ -[ - { - "Id": "assimp", - "Name": "Assimp - Open Asset Import Library", - "QDocModule": "qt3d", - "Description": "assimp (Open Asset Import Library) is a portable open source library to import various well-known 3D model formats in a uniform manner.", - "QtUsage": "Used in Qt 3D.", - - "Homepage": "http://www.assimp.org/", - "Version": "4.1.0", - "License": "BSD 3-Clause \"New\" or \"Revised\" License", - "LicenseId": "BSD-3-Clause", - "LicenseFile": "LICENSE", - "Copyright": "Copyright (c) 2006-2018, assimp team" - }, - { - "Id": "assimp-clipper", - "Name": "Assimp - Clipper", - "QDocModule": "qt3d", - "Description": "", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/clipper", - - "Homepage": "http://www.angusj.com/delphi/clipper.php", - "Version": "4.8.8", - "License": "Boost Software License 1.0", - "LicenseId": "BSL-1.0", - "LicenseFile": "contrib/clipper/License.txt", - "Copyright": "Copyright Angus Johnson 2010-2012" - }, - { - "Id": "assimp-irrXML", - "Name": "Assimp - irrXML", - "QDocModule": "qt3d", - "Description": "Simple and fast open source xml parser for C++", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/irrXML", - - "Homepage": "https://www.ambiera.com/irrxml/", - "License": "zlib License", - "LicenseId": "Zlib", - "LicenseFile": "contrib/clipper/License.txt", - "Copyright": "Copyright (C) 2002-2005 Nikolaus Gebhardt" - }, - { - "Id": "assimp-Open3DGC", - "Name": "Assimp - Open3DGC", - "QDocModule": "qt3d", - "Description": "Open 3D Graphics Compression", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/Open3DGC", - - "License": "MIT License and BSD 2-Clause \"Simplified\" License", - "LicenseId": "MIT AND BSD-2-Clause", - "LicenseFile": "LICENSE_Open3DGC.txt", - "Copyright": "Copyright (c) 2013 Khaled Mammou - Advanced Micro Devices, Inc\nCopyright (c) 2004 Amir Said (said@ieee.org) & William A. Pearlman (pearlw@ecse.rpi.edu)" - }, - { - "Id": "assimp-openddlparser", - "Name": "Assimp - The OpenDDL-Parser", - "QDocModule": "qt3d", - "Description": "The OpenDDL-Parser is a small and easy to use library for OpenDDL-file-format-parsing.", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/openddlparser", - - "License": "MIT License", - "LicenseId": "MIT", - "LicenseFile": "contrib/openddlparser/LICENSE", - "Copyright": "Copyright (c) 2014-2015 Kim Kulling" - }, - { - "Id": "assimp-poly2tri", - "Name": "Assimp - Poly2Tri Polygon Triangulation Library", - "QDocModule": "qt3d", - "Description": "Poly2Tri is a sweepline constrained Delaunay Polygon Triangulation Library.", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/poly2tri", - - "Homepage": "https://github.com/greenm01/poly2tri", - "LicenseId": "BSD-3-Clause", - "License": "BSD 3-clause \"New\" or \"Revised\" License", - "LicenseFile": "contrib/poly2tri/LICENSE", - "Copyright": "Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors" - }, - { - "Id": "assimp-rapidjson", - "Name": "Assimp - RapidJSON", - "QDocModule": "qt3d", - "Description": "RapidJSON is a JSON parser and generator for C++. Note that the bin/jsonchecker/ directory mentioned in the license is not included.", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/openddlparser", - - "License": "MIT License and BSD 3-Clause \"New\" or \"Revised\" License", - "LicenseId": "MIT AND BSD-3-Clause", - "LicenseFile": "contrib/rapidjson/license.txt", - "Copyright": "Copyright (c) 2006-2013 Alexander Chemeris\nCopyright (C) 2015 THL A29 Limited\nCopyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip" - }, - { - "Id": "assimp-unzip", - "Name": "Assimp - Unzip", - "QDocModule": "qt3d", - "Description": "IO for uncompress .zip files using zlib", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/unzip", - - "Homepage": "http://www.winimage.com/zLibDll/", - "Version": "1.01e", - "License": "zlib License", - "LicenseId": "Zlib", - "LicenseFile": "LICENSE_unzip.txt", - "Copyright": "Copyright 1998-2004 Gilles Vollant" - }, - { - "Id": "assimp-utf8cpp", - "Name": "Assimp - Utf8Cpp", - "QDocModule": "qt3d", - "Description": "UTF-8 with C++ in a Portable Way", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/utf8cpp", - - "Homepage": "https://sourceforge.net/projects/utfcpp/", - "License": "Boost Software License 1.0", - "LicenseId": "BSL-1.0", - "LicenseFile": "LICENSE_utf8cpp.txt", - "Copyright": "Copyright 2006 Nemanja Trifunovic" - }, - { - "Id": "assimp-zip", - "Name": "Assimp - Zip", - "QDocModule": "qt3d", - "Description": "A portable (OSX/Linux/Windows), simple zip library written in C", - "QtUsage": "Used in Qt 3D.", - "Files": "contrib/zip", - - "License": "Public Domain", - "LicenseFile": "LICENSE_zip.txt", - "Copyright": "" - } -] +{ + "Id": "assimp", + "Name": "Open Asset Import Library", + "QDocModule": "qt3d", + "Description": "assimp (Open Asset Import Library) is a portable open source library to import various well-known 3D model formats in a uniform manner.", + "QtUsage": "Used for importing assets for use with Qt 3D", + + "Homepage": "http://www.assimp.org/", + "Version": "5.0.1", + "License": "BSD 3-clause \"New\" or \"Revised\" Licensee", + "LicenseId": "BSD-3-Clause", + "LicenseFile": "LICENSE", + "Copyright": "Copyright (c) 2006-2018, assimp team" +} -- cgit v1.2.1 From c072ab346a8e343abec6bbaec62a3a273a88218f Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Fri, 31 Dec 2021 15:31:55 +0200 Subject: Bump version --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index f12bc5230..ce81baa81 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -6,4 +6,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH DEFINES += QT_NO_JAVA_STYLE_ITERATORS -MODULE_VERSION = 5.15.8 +MODULE_VERSION = 5.15.9 -- cgit v1.2.1 From 220abad34731351f676eec9c17b833002de5166f Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Fri, 17 Dec 2021 10:06:15 +0100 Subject: Scene3DView: fix shutdown crash By using a QPointer to whatch whether the Entity was already destroyed. Also had a ownsEntity property to control whether Scene3DView should own the Entity ptr or not. Patch provided by my colleague Tobias Koenig Change-Id: Ideb0e842419df73c8e1bc0608965859750195ca7 Task-number: QTBUG-85575 Reviewed-by: Paul Lemire --- src/quick3d/imports/scene3d/scene3dview.cpp | 38 +++++++++++++++++++++++------ src/quick3d/imports/scene3d/scene3dview_p.h | 9 ++++++- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/quick3d/imports/scene3d/scene3dview.cpp b/src/quick3d/imports/scene3d/scene3dview.cpp index 19ef43757..3cdfbc01c 100644 --- a/src/quick3d/imports/scene3d/scene3dview.cpp +++ b/src/quick3d/imports/scene3d/scene3dview.cpp @@ -118,6 +118,10 @@ namespace Qt3DRender { There are no restriction on the sharing of elements between different scenes in different Scene3DView instances. + + By default, you are in charge of ensuring the lifetime of the referenced + Entity. If you wish to transfer this duty to the Scene3DView, the + ownsEntity property can be set to true (defaults to false). */ namespace { @@ -146,6 +150,7 @@ Scene3DView::Scene3DView(QQuickItem *parent) , m_holderViewport(new Qt3DRender::QViewport()) , m_dirtyFlags(DirtyNode|DirtyTexture) , m_texture(nullptr) + , m_ownsEntity(false) { setFlag(QQuickItem::ItemHasContents, true);\ @@ -157,8 +162,11 @@ Scene3DView::Scene3DView(QQuickItem *parent) Scene3DView::~Scene3DView() { - if (m_entity) - abandonSubtree(m_entity); + if (m_entity) { + abandonSubtree(m_entity.data()); + if (m_ownsEntity) + m_entity->deleteLater(); + } if (m_scene3D) m_scene3D->removeView(this); @@ -166,7 +174,7 @@ Scene3DView::~Scene3DView() Qt3DCore::QEntity *Scene3DView::entity() const { - return m_entity; + return m_entity.data(); } Scene3DItem *Scene3DView::scene3D() const @@ -197,6 +205,11 @@ QSGTexture *Scene3DView::texture() const return m_texture; } +bool Scene3DView::ownsEntity() const +{ + return m_ownsEntity; +} + // Called by Scene3DRender::beforeSynchronizing in RenderThread void Scene3DView::markSGNodeDirty() { @@ -207,17 +220,20 @@ void Scene3DView::markSGNodeDirty() // Main Thread void Scene3DView::setEntity(Qt3DCore::QEntity *entity) { - if (m_entity == entity) + if (m_entity.data() == entity) return; - if (m_entity) - abandonSubtree(m_entity); + if (m_entity) { + abandonSubtree(m_entity.data()); + if (m_ownsEntity) + m_entity->deleteLater(); + } m_entity = entity; emit entityChanged(); if (m_entity) - adoptSubtree(m_entity); + adoptSubtree(m_entity.data()); } // Main Thread @@ -247,6 +263,14 @@ void Scene3DView::setScene3D(Scene3DItem *scene3D) } } +void Scene3DView::setOwnsEntity(bool ownsEntity) +{ + if (ownsEntity == m_ownsEntity) + return; + m_ownsEntity = ownsEntity; + emit ownsEntityChanged(); +} + // Render Thread QSGNode *Scene3DView::updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNodeData *) { diff --git a/src/quick3d/imports/scene3d/scene3dview_p.h b/src/quick3d/imports/scene3d/scene3dview_p.h index 3278bc6c4..bec9b7846 100644 --- a/src/quick3d/imports/scene3d/scene3dview_p.h +++ b/src/quick3d/imports/scene3d/scene3dview_p.h @@ -53,6 +53,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -76,6 +77,7 @@ class Scene3DView : public QQuickItem Q_OBJECT Q_PROPERTY(Qt3DCore::QEntity* entity READ entity WRITE setEntity NOTIFY entityChanged) Q_PROPERTY(Qt3DRender::Scene3DItem *scene3D READ scene3D WRITE setScene3D NOTIFY scene3DChanged) + Q_PROPERTY(bool ownsEntity READ ownsEntity WRITE setOwnsEntity NOTIFY ownsEntityChanged) Q_CLASSINFO("DefaultProperty", "entity") public: @@ -97,15 +99,19 @@ public: void setTexture(QSGTexture *texture); QSGTexture *texture() const; + bool ownsEntity() const; + void markSGNodeDirty(); public Q_SLOTS: void setEntity(Qt3DCore::QEntity *entity); void setScene3D(Scene3DItem *scene3D); + void setOwnsEntity(bool ownsEntity); Q_SIGNALS: void entityChanged(); void scene3DChanged(); + void ownsEntityChanged(); private: QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *nodeData) override; @@ -113,7 +119,7 @@ private: void abandonSubtree(Qt3DCore::QEntity *subtree); Scene3DItem *m_scene3D; - Qt3DCore::QEntity *m_entity; + QPointer m_entity; Qt3DCore::QNode *m_previousFGParent; Qt3DCore::QEntity *m_holderEntity; @@ -125,6 +131,7 @@ private: DirtyFlags m_dirtyFlags; QSGTexture *m_texture; + bool m_ownsEntity; }; Q_DECLARE_OPERATORS_FOR_FLAGS(Scene3DView::DirtyFlags) -- cgit v1.2.1 From 934dd2468667cf121ee900b04aec3cfe1544090c Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Mon, 31 Jan 2022 13:07:33 +0100 Subject: tst_qchangearbiter: remove tests for message based synching Since 5.14, we are not relying on messages to sync nodes but rather calling the BackendNode::syncFromFrontEnd when a sync is needed. Change-Id: I556519f1f17714457ce610c667660f9ccc1e8e06 Task-number: QTBUG-98421 Reviewed-by: Mike Krus --- tests/auto/core/qchangearbiter/qchangearbiter.pro | 2 + .../core/qchangearbiter/tst_qchangearbiter.cpp | 810 +-------------------- 2 files changed, 26 insertions(+), 786 deletions(-) diff --git a/tests/auto/core/qchangearbiter/qchangearbiter.pro b/tests/auto/core/qchangearbiter/qchangearbiter.pro index 64a7b36e7..4628bf6cd 100644 --- a/tests/auto/core/qchangearbiter/qchangearbiter.pro +++ b/tests/auto/core/qchangearbiter/qchangearbiter.pro @@ -6,3 +6,5 @@ QT += testlib core core-private 3dcore 3dcore-private SOURCES += \ tst_qchangearbiter.cpp + +include(../common/common.pri) diff --git a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp index 4837ac87b..9f79e4272 100644 --- a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp +++ b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp @@ -31,17 +31,7 @@ QT_WARNING_DISABLE_DEPRECATED #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -51,95 +41,14 @@ QT_WARNING_DISABLE_DEPRECATED #include #include #include +#include "testpostmanarbiter.h" class tst_QChangeArbiter : public QObject { Q_OBJECT private slots: - void registerObservers(); - void registerSceneObserver(); - void unregisterObservers(); - void unregisterSceneObservers(); - void distributeFrontendChanges(); - void distributePropertyChanges(); - void distributeBackendChanges(); -}; - -class AllChangesChange : public Qt3DCore::QSceneChange -{ -public: - AllChangesChange(Qt3DCore::QNodeId subjectId) - : Qt3DCore::QSceneChange(Qt3DCore::AllChanges, subjectId) - { - } -}; - -class tst_Node : public Qt3DCore::QEntity -{ -public: - explicit tst_Node(Qt3DCore::QNode *parent = 0) : Qt3DCore::QEntity(parent) - {} - - void sendNodeAddedNotification(QNode *node) - { - Qt3DCore::QPropertyNodeAddedChangePtr e(new Qt3DCore::QPropertyNodeAddedChange(id(), node)); - e->setPropertyName("PropertyValueAdded"); - Qt3DCore::QNodePrivate::get(this)->notifyObservers(e); - } - - void sendNodeRemovedNotification(QNode *node) - { - Qt3DCore::QPropertyNodeRemovedChangePtr e(new Qt3DCore::QPropertyNodeRemovedChange(id(), node)); - e->setPropertyName("PropertyValueRemoved"); - Qt3DCore::QNodePrivate::get(this)->notifyObservers(e); - } - - void sendNodeUpdatedNotification() - { - Qt3DCore::QPropertyUpdatedChangePtr e(new Qt3DCore::QPropertyUpdatedChange(id())); - e->setPropertyName("PropertyUpdated"); - Qt3DCore::QNodePrivate::get(this)->notifyObservers(e); - } - - void sendComponentAddedNotification(Qt3DCore::QComponent *component) - { - Qt3DCore::QComponentAddedChangePtr e(new Qt3DCore::QComponentAddedChange(this, component)); - Qt3DCore::QNodePrivate::get(this)->notifyObservers(e); - } - - void sendComponentRemovedNotification(Qt3DCore::QComponent *component) - { - Qt3DCore::QComponentRemovedChangePtr e(new Qt3DCore::QComponentRemovedChange(this, component)); - Qt3DCore::QNodePrivate::get(this)->notifyObservers(e); - } - - void sendAllChangesNotification() - { - Qt3DCore::QSceneChangePtr e(new AllChangesChange(id())); - Qt3DCore::QNodePrivate::get(this)->notifyObservers(e); - } - - void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) override - { - QVERIFY(!change.isNull()); - m_lastChanges << change; - } - - Qt3DCore::QSceneChangePtr lastChange() const - { - if (m_lastChanges.isEmpty()) - return Qt3DCore::QSceneChangePtr(); - return m_lastChanges.last(); - } - - QList lastChanges() const - { - return m_lastChanges; - } - -private: - QList m_lastChanges; + void recordsDirtyNodes(); }; // used to test property change notifications @@ -180,722 +89,51 @@ private: float m_prop2 = 0.0f; }; -class tst_SimpleObserver : public Qt3DCore::QObserverInterface -{ -public: - - // QObserverInterface interface - void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) override - { - QVERIFY(!e.isNull()); - m_lastChanges.append(e); - } - - Qt3DCore::QSceneChangePtr lastChange() const - { - if (m_lastChanges.isEmpty()) - return Qt3DCore::QSceneChangePtr(); - return m_lastChanges.last(); - } - - QList lastChanges() const - { - return m_lastChanges; - } - - void clear() - { - m_lastChanges.clear(); - } - -private: - QList m_lastChanges; -}; - -class tst_BackendObserverObservable : public Qt3DCore::QBackendNode -{ -public: - - tst_BackendObserverObservable() - : Qt3DCore::QBackendNode(ReadWrite) - {} - - // QObserverInterface interface - void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) override - { - QVERIFY(!e.isNull()); - m_lastChanges << e; - m_targetId = e->subjectId(); - } - - // should be called in thread - void sendReply() - { - Qt3DCore::QPropertyUpdatedChangePtr reply; - reply = QSharedPointer::create(m_targetId); - reply->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll); - reply->setPropertyName("Reply"); - notifyObservers(reply); - qDebug() << Q_FUNC_INFO; - } - - Qt3DCore::QSceneChangePtr lastChange() const - { - if (m_lastChanges.isEmpty()) - return Qt3DCore::QSceneChangePtr(); - return m_lastChanges.last(); - } - - QList lastChanges() const - { - return m_lastChanges; - } - - void clear() - { - m_lastChanges.clear(); - } - -private: - QList m_lastChanges; - Qt3DCore::QNodeId m_targetId; - -}; - -class ThreadedAnswer : public QThread -{ - Q_OBJECT -public: - ThreadedAnswer(Qt3DCore::QChangeArbiter *arbiter, tst_BackendObserverObservable *backend) - : QThread() - , m_arbiter(arbiter) - , m_backendObs(backend) - {} - - ~ThreadedAnswer() { qDebug() << this; } - - void run() override - { - // create backend change queue on QChangeArbiter - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(m_arbiter); - m_backendObs->sendReply(); - // gives time for other threads to start waiting - QThread::currentThread()->sleep(1); - // wake waiting condition - m_waitingForReplyToBeSent.wakeOne(); - exec(); - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(m_arbiter); - } - - QWaitCondition *waitingCondition() { return &m_waitingForReplyToBeSent; } - -private: - Qt3DCore::QChangeArbiter *m_arbiter; - tst_BackendObserverObservable *m_backendObs; - QWaitCondition m_waitingForReplyToBeSent; -}; - -class tst_PostManObserver : public Qt3DCore::QAbstractPostman -{ -public: - - tst_PostManObserver() - : m_sceneInterface(nullptr) - , m_allowFrontendNotifications(false) - {} - - void setScene(Qt3DCore::QScene *scene) final - { - m_sceneInterface = scene; - } - - void setAllowFrontendNotifications(bool allow) - { - m_allowFrontendNotifications = allow; - } - - // QObserverInterface interface - void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) - { - QVERIFY(!e.isNull()); - Qt3DCore::QPropertyUpdatedChangePtr change = qSharedPointerDynamicCast(e); - QVERIFY(!change.isNull()); - Qt3DCore::QNode *targetNode = m_sceneInterface->lookupNode(change->subjectId()); - QVERIFY(targetNode != nullptr); - m_lastChanges << e; - } - - Qt3DCore::QSceneChangePtr lastChange() const - { - if (m_lastChanges.isEmpty()) - return Qt3DCore::QSceneChangePtr(); - return m_lastChanges.last(); - } - - QList lastChanges() const - { - return m_lastChanges; - } - - void notifyBackend(const Qt3DCore::QSceneChangePtr &e) final - { - m_sceneInterface->arbiter()->sceneChangeEventWithLock(e); - } - - bool shouldNotifyFrontend(const Qt3DCore::QSceneChangePtr &) - { - return m_allowFrontendNotifications; - } - -private: - Qt3DCore::QScene *m_sceneInterface; - QList m_lastChanges; - bool m_allowFrontendNotifications; -}; - -void tst_QChangeArbiter::registerObservers() -{ - // GIVEN - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); - QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); - scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // WHEN - Qt3DCore::QNode *root = new tst_Node(); - Qt3DCore::QNode *child = new tst_Node(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - scene->addObservable(root); - - QList observers; - for (int i = 0; i < 5; i++) { - tst_SimpleObserver *s = new tst_SimpleObserver(); - arbiter->registerObserver(s, root->id()); - observers << s; - } - - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) - QVERIFY(o->lastChange().isNull()); - - child->setParent(root); - arbiter->syncChanges(); - for (tst_SimpleObserver *o : qAsConst(observers)) { - QCOMPARE(o->lastChanges().size(), 1); - QVERIFY(o->lastChanges().last()->type() == Qt3DCore::PropertyValueAdded); - } - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); -} - -void tst_QChangeArbiter::registerSceneObserver() -{ - // GIVEN - Qt3DCore::QComponent dummyComponent; - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); - QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); - scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // WHEN - tst_Node *root = new tst_Node(); - Qt3DCore::QNode *child = new tst_Node(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - Qt3DCore::QNodePrivate::get(root)->m_hasBackendNode = true; - scene->addObservable(root); - - QList observers; - for (int i = 0; i < 5; i++) { - tst_SimpleObserver *s = new tst_SimpleObserver(); - arbiter->registerObserver(s, root->id()); - observers << s; - } - - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) - QVERIFY(o->lastChange().isNull()); - - // WHEN - child->setParent(root); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::PropertyValueAdded); - } - - // WHEN - root->sendComponentAddedNotification(&dummyComponent); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::ComponentAdded); - } - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); -} - -void tst_QChangeArbiter::unregisterObservers() -{ - // GIVEN - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); - QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); - scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // WHEN - tst_Node *root = new tst_Node(); - Qt3DCore::QNode *child = new tst_Node(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - scene->addObservable(root); - - QList observers; - for (int i = 0; i < 5; i++) { - tst_SimpleObserver *s = new tst_SimpleObserver(); - arbiter->registerObserver(s, root->id()); - observers << s; - } - - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) - QVERIFY(o->lastChange().isNull()); - - // WHEN - child->setParent(root); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::PropertyValueAdded); - } - - // WHEN - for (tst_SimpleObserver *o : qAsConst(observers)) - arbiter->unregisterObserver(o, root->id()); - - root->sendAllChangesNotification(); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::PropertyValueAdded); - } - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); -} - -void tst_QChangeArbiter::unregisterSceneObservers() -{ - // GIVEN - Qt3DCore::QComponent dummyComponent; - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); - QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); - scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // WHEN - tst_Node *root = new tst_Node(); - Qt3DCore::QNode *child = new tst_Node(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - Qt3DCore::QNodePrivate::get(root)->m_hasBackendNode = true; - Qt3DCore::QNodePrivate::get(child)->m_hasBackendNode = true; - scene->addObservable(root); - - QList observers; - for (int i = 0; i < 5; i++) { - tst_SimpleObserver *s = new tst_SimpleObserver(); - arbiter->registerObserver(s, root->id()); - observers << s; - } - - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) - QVERIFY(o->lastChange().isNull()); - - // WHEN - child->setParent(root); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::PropertyValueAdded); - } - - // WHEN - root->sendComponentAddedNotification(&dummyComponent); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::ComponentAdded); - } - - // WHEN - child->setParent(Q_NODE_NULLPTR); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::PropertyValueRemoved); - } - - // WHEN - child->setParent(root); - arbiter->syncChanges(); - - // THEN - for (tst_SimpleObserver *o : qAsConst(observers)) { - QVERIFY(!o->lastChange().isNull()); - QVERIFY(o->lastChange()->type() == Qt3DCore::PropertyValueAdded); - } - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); -} - -void tst_QChangeArbiter::distributeFrontendChanges() -{ - // GIVEN - Qt3DCore::QComponent dummyComponent; - Qt3DCore::QNode dummyNode; - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); - QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); - scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // WHEN - tst_Node *root = new tst_Node(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - scene->addObservable(root); - - tst_SimpleObserver *backendAllChangedObserver = new tst_SimpleObserver(); - tst_SimpleObserver *backendNodeAddedObserver = new tst_SimpleObserver(); - tst_SimpleObserver *backendNodeRemovedObserver = new tst_SimpleObserver(); - tst_SimpleObserver *backendNodeUpdatedObserver = new tst_SimpleObserver(); - tst_SimpleObserver *backendComponentAddedObserver = new tst_SimpleObserver(); - tst_SimpleObserver *backendComponentRemovedObserver = new tst_SimpleObserver(); - - arbiter->registerObserver(backendAllChangedObserver, root->id()); - arbiter->registerObserver(backendNodeAddedObserver, root->id(), Qt3DCore::PropertyValueAdded); - arbiter->registerObserver(backendNodeUpdatedObserver, root->id(), Qt3DCore::PropertyUpdated); - arbiter->registerObserver(backendNodeRemovedObserver, root->id(), Qt3DCore::PropertyValueRemoved); - arbiter->registerObserver(backendComponentAddedObserver, root->id(), Qt3DCore::ComponentAdded); - arbiter->registerObserver(backendComponentRemovedObserver, root->id(), Qt3DCore::ComponentRemoved); - - arbiter->syncChanges(); - - // THEN - QVERIFY(backendAllChangedObserver->lastChange().isNull()); - QVERIFY(backendNodeAddedObserver->lastChange().isNull()); - QVERIFY(backendNodeUpdatedObserver->lastChange().isNull()); - QVERIFY(backendNodeRemovedObserver->lastChange().isNull()); - QVERIFY(backendComponentAddedObserver->lastChange().isNull()); - QVERIFY(backendComponentRemovedObserver->lastChange().isNull()); - - // WHEN - root->sendNodeAddedNotification(&dummyNode); - arbiter->syncChanges(); - - // THEN - QCOMPARE(backendAllChangedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeUpdatedObserver->lastChanges().count(), 0); - QCOMPARE(backendNodeRemovedObserver->lastChanges().count(), 0); - QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 0); - QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 0); - - // WHEN - root->sendNodeUpdatedNotification(); - arbiter->syncChanges(); - - // THEN - QCOMPARE(backendAllChangedObserver->lastChanges().count(), 2); - QCOMPARE(backendNodeAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeUpdatedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeRemovedObserver->lastChanges().count(), 0); - QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 0); - QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 0); - - // WHEN - root->sendNodeRemovedNotification(&dummyNode); - arbiter->syncChanges(); - - // THEN - QCOMPARE(backendAllChangedObserver->lastChanges().count(), 3); - QCOMPARE(backendNodeAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeUpdatedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeRemovedObserver->lastChanges().count(), 1); - QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 0); - QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 0); - - // WHEN - root->sendComponentAddedNotification(&dummyComponent); - arbiter->syncChanges(); - - // THEN - QCOMPARE(backendAllChangedObserver->lastChanges().count(), 4); - QCOMPARE(backendNodeAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeUpdatedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeRemovedObserver->lastChanges().count(), 1); - QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 0); - - // WHEN - root->sendComponentRemovedNotification(&dummyComponent); - arbiter->syncChanges(); - - // THEN - QCOMPARE(backendAllChangedObserver->lastChanges().count(), 5); - QCOMPARE(backendNodeAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeUpdatedObserver->lastChanges().count(), 1); - QCOMPARE(backendNodeRemovedObserver->lastChanges().count(), 1); - QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 1); - QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 1); - - // WHEN - root->sendAllChangesNotification(); - arbiter->syncChanges(); - - // THEN - QCOMPARE(backendAllChangedObserver->lastChanges().count(), 6); - QCOMPARE(backendNodeAddedObserver->lastChanges().count(), 2); - QCOMPARE(backendNodeUpdatedObserver->lastChanges().count(), 2); - QCOMPARE(backendNodeRemovedObserver->lastChanges().count(), 2); - QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 2); - QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 2); - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); -} - -void tst_QChangeArbiter::distributePropertyChanges() +void tst_QChangeArbiter::recordsDirtyNodes() { // GIVEN - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); + QScopedPointer arbiter(new TestArbiter()); QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); +// arbiter->setScene(scene.data()); scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // Test change notifications made to the root node: // WHEN - PropertyTestNode *root = new PropertyTestNode(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - Qt3DCore::QNodePrivate::get(root)->m_hasBackendNode = true; - scene->addObservable(root); + auto *root = new PropertyTestNode(); + auto *child = new PropertyTestNode(root); - tst_SimpleObserver *rootObserver = new tst_SimpleObserver(); - arbiter->registerObserver(rootObserver, root->id()); - arbiter->syncChanges(); + root->setProp1(883); + child->setProp2(1584); // THEN - QVERIFY(rootObserver->lastChange().isNull()); + QCOMPARE(arbiter->dirtyNodes.size(), 0); // WHEN - root->setProp1(root->prop1() + 1); + Qt3DCore::QNodePrivate::get(root)->setArbiter(arbiter.data()); + root->setProp1(884); + child->setProp2(1585); // THEN - auto dirtyNodes = arbiter->takeDirtyFrontEndNodes(); - QCOMPARE(dirtyNodes.size(), 1); - QCOMPARE(dirtyNodes.front(), root); + QCOMPARE(arbiter->dirtyNodes.size(), 1); + QCOMPARE(arbiter->dirtyNodes.front(), root); - // WHEN - root->setProp2(root->prop2() + 1.f); - - // THEN - dirtyNodes = arbiter->takeDirtyFrontEndNodes(); - QCOMPARE(dirtyNodes.size(), 1); - QCOMPARE(dirtyNodes.front(), root); - - // Test change notifications made to an entity that was added to the scene - // via QNode::setParent() + arbiter->dirtyNodes.clear(); // WHEN - PropertyTestNode *setParentChild = new PropertyTestNode(); - setParentChild->setParent(root); - tst_SimpleObserver *setParentChildObserver = new tst_SimpleObserver(); - arbiter->registerObserver(setParentChildObserver, setParentChild->id()); - setParentChild->setProp2(setParentChild->prop2() + 1.f); + Qt3DCore::QNodePrivate::get(child)->setArbiter(arbiter.data()); + child->setProp2(1586); // THEN - dirtyNodes = arbiter->takeDirtyFrontEndNodes(); - QCOMPARE(dirtyNodes.size(), 1); - QCOMPARE(dirtyNodes.front(), setParentChild); + QCOMPARE(arbiter->dirtyNodes.size(), 1); + QCOMPARE(arbiter->dirtyNodes.front(), child); - // Test change notifications made to an entity that was added to the scene - // via the QNode() constructor parent parameter + arbiter->dirtyNodes.clear(); // WHEN - PropertyTestNode *directChild = new PropertyTestNode(root); - QCoreApplication::processEvents(); // make sure the post-ctor initialization is executed for the node - tst_SimpleObserver *directChildObserver = new tst_SimpleObserver(); - arbiter->registerObserver(directChildObserver, directChild->id()); - directChild->setProp1(directChild->prop1() + 1); - - // THEN - dirtyNodes = arbiter->takeDirtyFrontEndNodes(); - QCOMPARE(dirtyNodes.size(), 1); - QCOMPARE(dirtyNodes.front(), directChild); - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); -} - -void tst_QChangeArbiter::distributeBackendChanges() -{ - - // GIVEN - QScopedPointer arbiter(new Qt3DCore::QChangeArbiter()); - QScopedPointer scene(new Qt3DCore::QScene()); - QScopedPointer postman(new tst_PostManObserver); - arbiter->setPostman(postman.data()); - arbiter->setScene(scene.data()); - postman->setScene(scene.data()); - scene->setArbiter(arbiter.data()); - // Replaces initialize as we have no JobManager in this case - Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data()); - - // In order for backend -> frontend changes to work properly, - // the backend notification should only be sent - // from a worker thread which has a dedicated ChangeQueue in the - // ChangeArbiter different than the frontend ChangeQueue. In this - // test we will only check that the backend has received the frontend notification - - - // WHEN - tst_Node *root = new tst_Node(); - Qt3DCore::QNodePrivate::get(root)->setScene(scene.data()); - Qt3DCore::QNodePrivate::get(root)->m_hasBackendNode = true; - scene->addObservable(root); - - tst_BackendObserverObservable *backenObserverObservable = new tst_BackendObserverObservable(); - arbiter->registerObserver(Qt3DCore::QBackendNodePrivate::get(backenObserverObservable), root->id()); - arbiter->scene()->addObservable(Qt3DCore::QBackendNodePrivate::get(backenObserverObservable), root->id()); - Qt3DCore::QBackendNodePrivate::get(backenObserverObservable)->setArbiter(arbiter.data()); - - arbiter->syncChanges(); + root->setProp1(887); + child->setProp2(1587); // THEN - QVERIFY(root->lastChange().isNull()); - QVERIFY(backenObserverObservable->lastChange().isNull()); - QCOMPARE(backenObserverObservable->lastChanges().count(), 0); - - // WHEN - root->sendAllChangesNotification(); - arbiter->syncChanges(); - - // THEN - // backend observer receives event from frontend node "root" - QCOMPARE(root->lastChanges().count(), 0); - QCOMPARE(postman->lastChanges().count(), 0); - QTRY_COMPARE(backenObserverObservable->lastChanges().count(), 1); - - backenObserverObservable->clear(); - - { - // WHEN - // simulate a worker thread - QScopedPointer answer(new ThreadedAnswer(arbiter.data(), backenObserverObservable)); - postman->setAllowFrontendNotifications(false); - QWaitCondition *waitingForBackendReplyCondition = answer->waitingCondition(); - - QMutex mutex; - // sends reply from another thread (simulates job thread) - answer->start(); - mutex.lock(); - waitingForBackendReplyCondition->wait(&mutex); - mutex.unlock(); - - // To verify that backendObserver sent a reply - arbiter->syncChanges(); - - // THEN - // the repliers should receive it's reply - QTRY_COMPARE(backenObserverObservable->lastChanges().count(), 1); - // verify that postMan has received the change - QCOMPARE(postman->lastChanges().count(), 0); - answer->exit(); - answer->wait(); - backenObserverObservable->clear(); - } - - { - // WHEN - // simulate a worker thread - QScopedPointer answer(new ThreadedAnswer(arbiter.data(), backenObserverObservable)); - postman->setAllowFrontendNotifications(true); - QWaitCondition *waitingForBackendReplyCondition = answer->waitingCondition(); - QMutex mutex; - // sends reply from another thread (simulates job thread) - answer->start(); - mutex.lock(); - waitingForBackendReplyCondition->wait(&mutex); - mutex.unlock(); - - // To verify that backendObserver sent a reply - arbiter->syncChanges(); - - // THEN - // the repliers should receive it's reply - QTRY_COMPARE(backenObserverObservable->lastChanges().count(), 1); - // verify that postMan has received the change - QCOMPARE(postman->lastChanges().count(), 1); - - // verify correctness of the reply - Qt3DCore::QPropertyUpdatedChangePtr c = qSharedPointerDynamicCast(postman->lastChange()); - QVERIFY(!c.isNull()); - QVERIFY(c->subjectId() == root->id()); - qDebug() << c->propertyName(); - QVERIFY(strcmp(c->propertyName(), "Reply") == 0); - QVERIFY(c->type() == Qt3DCore::PropertyUpdated); - answer->exit(); - answer->wait(); - } - - Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data()); + QCOMPARE(arbiter->dirtyNodes.size(), 2); } QTEST_MAIN(tst_QChangeArbiter) -- cgit v1.2.1 From b85ba6f86396f28ab7326da0c7c5cebfeb0fe02f Mon Sep 17 00:00:00 2001 From: CI Insignificant Platforms Monitor Bot Date: Tue, 8 Mar 2022 09:43:15 +0000 Subject: Blacklist: test cases blacklisted in tst_GraphicsHelperGL4: - bindFrameBufferAttachment on ubuntu-20 Task-number: QTBUG-101556 Change-Id: I7e1b97ec45c08507c147a7663e5e9751682b22d9 Reviewed-by: CI Insignificant Platforms Monitor Bot --- tests/auto/render/opengl/graphicshelpergl4/BLACKLIST | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/auto/render/opengl/graphicshelpergl4/BLACKLIST diff --git a/tests/auto/render/opengl/graphicshelpergl4/BLACKLIST b/tests/auto/render/opengl/graphicshelpergl4/BLACKLIST new file mode 100644 index 000000000..ab691c11c --- /dev/null +++ b/tests/auto/render/opengl/graphicshelpergl4/BLACKLIST @@ -0,0 +1,4 @@ +# See qtbase/src/testlib/qtestblacklist.cpp for format +#QTBUG-101556 +[bindFrameBufferAttachment] +ubuntu-20 -- cgit v1.2.1