From d76b3f112135091397e9e5a948e2d8eb19ffb7c1 Mon Sep 17 00:00:00 2001 From: Andreas Reischuck Date: Thu, 16 May 2019 01:22:43 +0200 Subject: [PATCH] fixed Qt 5.12 for MSVC-2019 --- src/wobjectimpl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wobjectimpl.h b/src/wobjectimpl.h index 2498bc1..ea957e7 100644 --- a/src/wobjectimpl.h +++ b/src/wobjectimpl.h @@ -370,10 +370,11 @@ struct EnumGenerator { template static constexpr auto generate(State s, Enum e, std::enable_if_t * = nullptr) { + constexpr auto index = s.strings.size; // required for MSVC-2019 return s.addString(e.name) // name .template add< #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) - s.strings.size, // alias is the same as the name + index, // alias is the same as the name #endif Enum::flags, Enum::count,