From b6e2159cecdf79d0d94d0e6a9dda8cef6389cac1 Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 27 Dec 2019 10:32:23 +0000 Subject: [PATCH] Work around Qt MOC issue with IdString enums Signed-off-by: David Shah --- ecp5/archdefs.h | 4 ++++ ice40/archdefs.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h index 3cd92119..8faa41ed 100644 --- a/ecp5/archdefs.h +++ b/ecp5/archdefs.h @@ -52,6 +52,9 @@ struct DelayInfo // ----------------------------------------------------------------------- +// https://bugreports.qt.io/browse/QTBUG-80789 + +#ifndef Q_MOC_RUN enum ConstIds { ID_NONE @@ -65,6 +68,7 @@ enum ConstIds #define X(t) static constexpr auto id_##t = IdString(ID_##t); #include "constids.inc" #undef X +#endif NPNR_PACKED_STRUCT(struct LocationPOD { int16_t x, y; }); diff --git a/ice40/archdefs.h b/ice40/archdefs.h index 89591af5..e95953f1 100644 --- a/ice40/archdefs.h +++ b/ice40/archdefs.h @@ -48,6 +48,9 @@ struct DelayInfo // ----------------------------------------------------------------------- +// https://bugreports.qt.io/browse/QTBUG-80789 + +#ifndef Q_MOC_RUN enum ConstIds { ID_NONE @@ -59,6 +62,7 @@ enum ConstIds #define X(t) static constexpr auto id_##t = IdString(ID_##t); #include "constids.inc" #undef X +#endif struct BelId {