Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.15.8, 5.15.3
-
None
Description
trying to build qt with QT_DISABLE_DEPRECATED_BEFORE=0x050F00 as a start to migrate to qt6. (by the way, a question: should i build both qt and my project with this define or only my project? in any case the report is still valid) and i'm seeing strange errors. figured out that \qtbase\mkspecs\features\qt_module.prf is overriding my define by the following line:
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x040800
so i tried the following: added another value right after existing in that file. like that:
win32 {
# On Windows, due to the way DLLs work, we need to export all functions,
# including the inlines
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x040800
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050800
} else {
# On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000
}
and to see the result in some .cpp file i've also added this:
#define QuoteIdent(ident) #ident
#define QuoteMacro(macro) QuoteIdent(macro)
#ifdef QT_DISABLE_DEPRECATED_BEFORE
static_assert(false, "QT_DISABLE_DEPRECATED_BEFORE defined " QuoteMacro(QT_DISABLE_DEPRECATED_BEFORE)"\n");
#else
static_assert(false, "QT_DISABLE_DEPRECATED_BEFORE not defined\n");
#endif
and i see this as a result:
error C2338: static_assert failed: 'QT_DISABLE_DEPRECATED_BEFORE defined 0x050800'
which means that operator *= does override previous value.
tried this on 5.15.3 and 5.15.8.