diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-14 12:01:03 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-15 09:12:44 +0200 |
commit | 4fa71ce51f3385781a6edcb215fb097c032e002a (patch) | |
tree | da3f64e298a42657c7237f6bd146a002c0a3a540 | |
parent | 7a2562aabcc8e1c4659386340956ed44bfbfa6ca (diff) |
shiboken: Raise C++ default language level to C++ 17 for Qt 6
Task-number: PYSIDE-904
Change-Id: I4e85dd8706f5fbe708fca7c797e0225b5bac9377
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r-- | sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp index 188725da9..dac511003 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp +++ b/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp @@ -356,12 +356,16 @@ QByteArrayList emulatedCompilerOptions() LanguageLevel emulatedCompilerLanguageLevel() { -#if defined(Q_CC_MSVC) && _MSC_VER > 1900 +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + return LanguageLevel::Cpp17; +#else +# if defined(Q_CC_MSVC) && _MSC_VER > 1900 // Fixes constexpr errors in MSVC2017 library headers with Clang 4.1..5.X (0.45 == Clang 6). if (libClangVersion() < QVersionNumber(0, 45)) return LanguageLevel::Cpp1Z; -#endif // Q_CC_MSVC && _MSC_VER > 1900 +# endif // Q_CC_MSVC && _MSC_VER > 1900 return LanguageLevel::Cpp14; // otherwise, t.h is parsed as "C" +#endif // Qt 5 } struct LanguageLevelMapping |