diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2021-06-30 13:37:24 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2021-06-30 21:13:28 +0000 |
commit | e160cded0ac6e08aaf3fdce55b567ed26bc40f34 (patch) | |
tree | b9f630779768bc76ac8882eb209c4e5db01a1c01 /tests/auto/corelib | |
parent | bc1808794db670432e5c98c1b94119748c808843 (diff) |
QGlobalStatic: fix warning when using cv-qualified types
Says GCC:
tst_qglobalstatic.cpp: In function ‘{anonymous}::Q_QGS_constInt::Type* {anonymous}::Q_QGS_constInt::innerFunction()’:
tst_qglobalstatic.cpp:71:51: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
71 | Q_GLOBAL_STATIC_WITH_ARGS(const int, constInt, (42))
| ^
qglobalstatic.h:80:40: note: in definition of macro ‘Q_GLOBAL_STATIC_INTERNAL’
80 | noexcept(noexcept(Type ARGS))
| ^~~~
tst_qglobalstatic.cpp:71:1: note: in expansion of macro ‘Q_GLOBAL_STATIC_WITH_ARGS’
71 | Q_GLOBAL_STATIC_WITH_ARGS(const int, constInt, (42))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Fix by a strategic std::remove_cv_t.
Pick-to: 6.2 5.15
Change-Id: If2d81b7965cefdcf3ec115bafb78aabc78d4256c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib')
0 files changed, 0 insertions, 0 deletions