summaryrefslogtreecommitdiffstats
path: root/src/core/jobs/qaspectjob_p.h
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-02-13 17:14:49 +0000
committerMike Krus <mike.krus@kdab.com>2020-02-14 11:00:11 +0000
commit90d5218564ceff5b4479c2679a1914227299b168 (patch)
tree1aa005074fcbbba7356a5768299c1db935e10d88 /src/core/jobs/qaspectjob_p.h
parentd967a6369c967d9a1c7f740cfc5c962b8664c9eb (diff)
Add ability to dump job graph to dot file
Can be triggered from the overlay API and using sending a "dump jobs" command to the aspect engine. Gets saved in the current working directory. Change-Id: I19fc94a1215187c1d7eb9d1f3b13b968939cc917 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/jobs/qaspectjob_p.h')
-rw-r--r--src/core/jobs/qaspectjob_p.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/jobs/qaspectjob_p.h b/src/core/jobs/qaspectjob_p.h
index 5b72e64ee..63a2cc572 100644
--- a/src/core/jobs/qaspectjob_p.h
+++ b/src/core/jobs/qaspectjob_p.h
@@ -77,14 +77,26 @@ public:
QVector<QWeakPointer<QAspectJob> > m_dependencies;
JobId m_jobId;
+ QString m_jobName;
};
} // Qt3D
#define SET_JOB_RUN_STAT_TYPE(job, type, instance) \
{ \
- auto &jobId = Qt3DCore::QAspectJobPrivate::get(job)->m_jobId; \
+ auto djob = Qt3DCore::QAspectJobPrivate::get(job); \
+ auto &jobId = djob->m_jobId; \
jobId.typeAndInstance[0] = type; \
jobId.typeAndInstance[1] = instance; \
+ djob->m_jobName = QLatin1String(#type); \
+ }
+
+#define SET_JOB_RUN_STAT_TYPE_AND_NAME(job, type, name, instance) \
+ { \
+ auto djob = Qt3DCore::QAspectJobPrivate::get(job); \
+ auto &jobId = djob->m_jobId; \
+ jobId.typeAndInstance[0] = type; \
+ jobId.typeAndInstance[1] = instance; \
+ djob->m_jobName = QLatin1String(name); \
}
QT_END_NAMESPACE