diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-04-24 13:43:56 +0100 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-04-27 11:57:33 +0100 |
commit | 6c1758d35e20655f46ba3696671068f4862c8878 (patch) | |
tree | d4b4fc2ae8f5a4512de4eb015667b024b6a8e6b9 /src/core | |
parent | b7967a8abcdac438a1f31800b71e219e3c52c24a (diff) | |
parent | 37735f11f9437b916b194cfd48c452c7c70682f8 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Id669d5c1aab29965eac0dabd1cb497e908dac23e
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/geometry/qgeometry.cpp | 3 | ||||
-rw-r--r-- | src/core/jobs/qaspectjob.cpp | 2 | ||||
-rw-r--r-- | src/core/jobs/qaspectjob_p.h | 4 | ||||
-rw-r--r-- | src/core/jobs/task.cpp | 4 | ||||
-rw-r--r-- | src/core/jobs/task_p.h | 6 | ||||
-rw-r--r-- | src/core/nodes/qentity.cpp | 17 | ||||
-rw-r--r-- | src/core/transforms/matrix4x4_avx2_p.h | 4 |
7 files changed, 22 insertions, 18 deletions
diff --git a/src/core/geometry/qgeometry.cpp b/src/core/geometry/qgeometry.cpp index 16e204bbc..4e8dcacac 100644 --- a/src/core/geometry/qgeometry.cpp +++ b/src/core/geometry/qgeometry.cpp @@ -220,7 +220,8 @@ void QGeometry::removeAttribute(QAttribute *attribute) { Q_ASSERT(attribute); Q_D(QGeometry); - d->m_attributes.removeOne(attribute); + if (!d->m_attributes.removeOne(attribute)) + return; // Remove bookkeeping connection d->unregisterDestructionHelper(attribute); d->update(); diff --git a/src/core/jobs/qaspectjob.cpp b/src/core/jobs/qaspectjob.cpp index 557756581..7c23f6894 100644 --- a/src/core/jobs/qaspectjob.cpp +++ b/src/core/jobs/qaspectjob.cpp @@ -70,7 +70,7 @@ QAspectJobPrivate *QAspectJobPrivate::get(QAspectJob *job) return job->d_func(); } -bool QAspectJobPrivate::isRequired() +bool QAspectJobPrivate::isRequired() const { return true; } diff --git a/src/core/jobs/qaspectjob_p.h b/src/core/jobs/qaspectjob_p.h index 63a2cc572..0c7802b02 100644 --- a/src/core/jobs/qaspectjob_p.h +++ b/src/core/jobs/qaspectjob_p.h @@ -72,9 +72,11 @@ public: static QAspectJobPrivate *get(QAspectJob *job); - virtual bool isRequired(); + virtual bool isRequired() const; virtual void postFrame(QAspectManager *aspectManager); + void clearDependencies() { m_dependencies.clear(); } + QVector<QWeakPointer<QAspectJob> > m_dependencies; JobId m_jobId; QString m_jobName; diff --git a/src/core/jobs/task.cpp b/src/core/jobs/task.cpp index f5bfae014..47de41989 100644 --- a/src/core/jobs/task.cpp +++ b/src/core/jobs/task.cpp @@ -68,7 +68,7 @@ AspectTaskRunnable::~AspectTaskRunnable() { } -bool AspectTaskRunnable::isRequired() +bool AspectTaskRunnable::isRequired() const { return m_job ? QAspectJobPrivate::get(m_job.data())->isRequired() : false; } @@ -105,7 +105,7 @@ SyncTaskRunnable::~SyncTaskRunnable() { } -bool SyncTaskRunnable::isRequired() +bool SyncTaskRunnable::isRequired() const { return true; } diff --git a/src/core/jobs/task_p.h b/src/core/jobs/task_p.h index 90d0674b4..73c34534d 100644 --- a/src/core/jobs/task_p.h +++ b/src/core/jobs/task_p.h @@ -77,7 +77,7 @@ public: virtual ~RunnableInterface(); - virtual bool isRequired() = 0; + virtual bool isRequired() const = 0; virtual void run() = 0; virtual int id() = 0; @@ -97,7 +97,7 @@ public: AspectTaskRunnable(QSystemInformationService *service); ~AspectTaskRunnable(); - bool isRequired() override; + bool isRequired() const override; void run() override; void setPooler(QThreadPooler *pooler) override { m_pooler = pooler; } @@ -129,7 +129,7 @@ public: QAtomicInt *atomicCount); ~SyncTaskRunnable(); - bool isRequired() override; + bool isRequired() const override; void run() override; void setPooler(QThreadPooler *pooler) override { m_pooler = pooler; } diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index 0a504b4eb..551dc685b 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -78,18 +78,19 @@ QString dumpNode(const Qt3DCore::QEntity *n) { return res; } -QStringList dumpSG(const Qt3DCore::QEntity *n, int level = 0) +QStringList dumpSG(const Qt3DCore::QNode *n, int level = 0) { QStringList reply; - QString res = dumpNode(n); - reply += res.rightJustified(res.length() + level * 2, ' '); + const auto *entity = qobject_cast<const Qt3DCore::QEntity *>(n); + if (entity != nullptr) { + QString res = dumpNode(entity); + reply += res.rightJustified(res.length() + level * 2, ' '); + level++; + } const auto children = n->childNodes(); - for (auto *child: children) { - auto *childFGNode = qobject_cast<Qt3DCore::QEntity *>(child); - if (childFGNode != nullptr) - reply += dumpSG(childFGNode, level + 1); - } + for (auto *child: children) + reply += dumpSG(child, level); return reply; } diff --git a/src/core/transforms/matrix4x4_avx2_p.h b/src/core/transforms/matrix4x4_avx2_p.h index 0b35f0016..de40ee2a0 100644 --- a/src/core/transforms/matrix4x4_avx2_p.h +++ b/src/core/transforms/matrix4x4_avx2_p.h @@ -485,8 +485,8 @@ public: friend Vector4D operator*(const Vector4D &vector, const Matrix4x4_AVX2 &matrix); friend Vector4D operator*(const Matrix4x4_AVX2 &matrix, const Vector4D &vector); - friend Q_3DCORE_PRIVATE_EXPORT Vector3D operator*(const Vector3D &vector, const Matrix4x4_AVX2 &matrix); - friend Q_3DCORE_PRIVATE_EXPORT Vector3D operator*(const Matrix4x4_AVX2 &matrix, const Vector3D &vector); + friend Vector3D operator*(const Vector3D &vector, const Matrix4x4_AVX2 &matrix); + friend Vector3D operator*(const Matrix4x4_AVX2 &matrix, const Vector3D &vector); friend Q_3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Matrix4x4_AVX2 &m); |