summaryrefslogtreecommitdiffstats
path: root/src/render/raycasting/qcollisionqueryresult_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-05-05 07:02:14 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-05-05 13:21:08 +0000
commite702541972ed6bb233618ffb56a84b03cd360c3c (patch)
tree97af33e31362f9a02b10e4ba142548143976e121 /src/render/raycasting/qcollisionqueryresult_p.h
parent4cf737a0f1cc05ff9baa4df329761d65f69e340c (diff)
Introduce local macros for declaring types as movable/primitive/shared
The QtCore macros aren't really suited to a namespaced library like Qt3D. In particular, the use of Q_DECLARE_SHARED is wrong, because it places the free swap() function in the Qt's namespace when it should be in the same (inner) namespace the type is in. Q_DECLARE_TYPEINFO, otoh, is just inconvenient to use because it requires exiting and later re-entering of the Qt3D namespace(s). The new macros do this implicitly. Change-Id: Ic91f447656f08ed59c118ce09cb5ac90ad212955 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/raycasting/qcollisionqueryresult_p.h')
-rw-r--r--src/render/raycasting/qcollisionqueryresult_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/render/raycasting/qcollisionqueryresult_p.h b/src/render/raycasting/qcollisionqueryresult_p.h
index 429a15829..04ac6ff88 100644
--- a/src/render/raycasting/qcollisionqueryresult_p.h
+++ b/src/render/raycasting/qcollisionqueryresult_p.h
@@ -112,6 +112,7 @@ private:
return d_ptr.constData();
}
};
+QT3D_DECLARE_SHARED(Qt3DRender, QCollisionQueryResult)
class QCollisionQueryResultPrivate : public QSharedData
{
@@ -133,8 +134,6 @@ inline bool operator==(const QCollisionQueryResult::Hit& left, const QCollisionQ
} // Qt3DRender
-Q_DECLARE_SHARED(Qt3DRender::QCollisionQueryResult)
-
QT_END_NAMESPACE
#endif // QT3DRENDER_QCOLLISIONQUERYRESULT_P_H