Fix developer build with clang-cl failing due exception spec

Clang does seem to understand  __declspec(nothrow) as
used by the COM macros like STDMETHOD. Suppress the warning,
fixing errors like:

qwindowsfontenginedirectwrite.cpp(105,24): error: 'AddBeziers' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmicrosoft-exception-spec]

Task-number: QTBUG-63512
Change-Id: If582cb0c12c62a7d12c4ae702747aac1f735db3c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
Friedemann Kleint 2019-12-19 10:36:15 +01:00
parent efff8ff57a
commit c4a9429be7
2 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,9 @@
QT_BEGIN_NAMESPACE
// Clang does not consider __declspec(nothrow) as nothrow
QT_WARNING_DISABLE_CLANG("-Wmicrosoft-exception-spec")
// Convert from design units to logical pixels
#define DESIGN_TO_LOGICAL(DESIGN_UNIT_VALUE) \
QFixed::fromReal((qreal(DESIGN_UNIT_VALUE) / qreal(m_unitsPerEm)) * fontDef.pixelSize)

View File

@ -107,6 +107,9 @@ private:
ULONG m_ref;
};
// Clang does not consider __declspec(nothrow) as nothrow
QT_WARNING_DISABLE_CLANG("-Wmicrosoft-exception-spec")
QT_END_NAMESPACE
#endif // QWINDOWSCOMBASE_H