summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-12-02 17:18:03 +0000
committerMike Krus <mike.krus@kdab.com>2019-12-05 19:44:20 +0000
commit037a549902dee87fe6ccb50995351f37543fec98 (patch)
tree0e41b9235bc4fe89df1bfb60f4dd0f01b06102e1
parent7ab3c098417c91c5bbdfaee2133c642978828ef3 (diff)
Add Q3D_DECL_DEPRECATED macro
This defines to empty when building Qt3D, and deprecated attribute otherwise. Change-Id: Ic36a020a7c43962ac4313efd72a941e5f74f4e99 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--.qmake.conf1
-rw-r--r--src/core/qt3dcore_global.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 21b446c03..89d164a2e 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -5,5 +5,6 @@ load(qt_build_config)
DEFINES += QT_NO_FOREACH
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
+DEFINES += BUILD_QT3D_MODULE
MODULE_VERSION = 5.15.0
diff --git a/src/core/qt3dcore_global.h b/src/core/qt3dcore_global.h
index b2ad787c0..e932b02ba 100644
--- a/src/core/qt3dcore_global.h
+++ b/src/core/qt3dcore_global.h
@@ -55,6 +55,12 @@ QT_BEGIN_NAMESPACE
# define Q_3DCORESHARED_EXPORT
#endif
+#ifdef BUILD_QT3D_MODULE
+#define Q3D_DECL_DEPRECATED
+#else
+#define Q3D_DECL_DEPRECATED Q_DECL_DEPRECATED
+#endif
+
#define QT3D_DECLARE_TYPEINFO(NS, Class, Flags) \
} /* NS */ \
Q_DECLARE_TYPEINFO(NS :: Class, Flags); \