summaryrefslogtreecommitdiffstats
path: root/src/core/jobs/qaspectjob_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire350@gmail.com>2016-05-22 15:44:30 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-06-28 16:03:10 +0000
commit3726f97d6a4e458dfccacc92615c366e705d7edb (patch)
treec6807b2ef600f4905e895a4a9e2d15374bb55ff5 /src/core/jobs/qaspectjob_p.h
parent5ae744089b8d2ef38919917f19a38e4322b51237 (diff)
Move SET_JOB_RUN_STAT_TYPE macro to qaspectjob_p.h
This will allow each aspect to register their job types Change-Id: I7ab1036f2e05f01f3c4ec8efcc39b5c8ebfaad36 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/jobs/qaspectjob_p.h')
-rw-r--r--src/core/jobs/qaspectjob_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/jobs/qaspectjob_p.h b/src/core/jobs/qaspectjob_p.h
index df788c091..d66e6594c 100644
--- a/src/core/jobs/qaspectjob_p.h
+++ b/src/core/jobs/qaspectjob_p.h
@@ -103,6 +103,20 @@ public:
} // Qt3D
+#ifdef QT3D_JOBS_RUN_STATS
+
+#include <Qt3DCore/private/qaspectjob_p.h>
+
+#define SET_JOB_RUN_STAT_TYPE(job, type, instance) \
+ Qt3DCore::QAspectJobPrivate::get(job)->m_stats.jobId.typeAndInstance[0] = type; \
+ Qt3DCore::QAspectJobPrivate::get(job)->m_stats.jobId.typeAndInstance[1] = instance;
+
+#else
+
+#define SET_JOB_RUN_STAT_TYPE(job, type, instance)
+
+#endif
+
QT_END_NAMESPACE
#endif // QT3DCORE_QASPECTJOB_P_H