diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-15 11:09:21 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-15 11:47:25 +0000 |
commit | 0d23715c78f5af939d2af471e71fdc63dfd80cff (patch) | |
tree | 30139b8918c9d4ec61ba9e196d3fd7beab954063 | |
parent | d3395bf51cc2c90e29908f96aba47ee15c291f9f (diff) |
Remove AUTOTEST_EXPORT from templated function
...to avoid warnings (that can be treated as errors) with Mingw.
What we have seen in the CI is that including renderer_p.h from an
external module can lead to
error: inline function 'T Qt3DRender::Render::variant_value(const
QVariant&)' declared as dllimport: attribute ignored [-Werror=attributes]
Q_AUTOTEST_EXPORT inline T variant_value(const QVariant &v)
which is treated as an error if the external user happens to be a Qt
module with warning_clean enabled.
Not sure why this surfaced now, but removing the export should be the
correct thing to do regardless.
Change-Id: Ie8de120fa0e5c96fbcffc1632db57edeac87a95b
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r-- | src/render/renderers/opengl/jobs/renderviewjobutils_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/renderers/opengl/jobs/renderviewjobutils_p.h b/src/render/renderers/opengl/jobs/renderviewjobutils_p.h index 3986f837d..90c4a53cc 100644 --- a/src/render/renderers/opengl/jobs/renderviewjobutils_p.h +++ b/src/render/renderers/opengl/jobs/renderviewjobutils_p.h @@ -104,7 +104,7 @@ Q_AUTOTEST_EXPORT RenderPassList findRenderPassesForTechnique(NodeManagers *mana // Extracts the type T from a QVariant v without using QVariant::value which is slow // Note: Assumes you are 100% sure about the type you requested template<typename T> -Q_AUTOTEST_EXPORT inline T variant_value(const QVariant &v) +inline T variant_value(const QVariant &v) { return *reinterpret_cast<const T *>(v.data()); } |