recent qt6 requires c++20
There are warnings within the qt6 header files if c++20 is not used, for example:
usr/include/x86_64-linux-gnu/qt6/QtCore/qfuturesynchronizer.h:21:5: warning: use of the 'nodiscard' attribute is a C++20 extension [-Wc++20-attribute-extensions]
21 | Q_NODISCARD_CTOR_X("Use future.waitForFinished() instead.")
| ^
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcompilerdetection.h:972:43: note: expanded from macro 'Q_NODISCARD_CTOR_X'
972 | # define Q_NODISCARD_CTOR_X(message) [[nodiscard(message)]]
| ^
1 warning generated.
qmake6 --version
QMake version 3.1
Using Qt version 6.8.3 in /usr/lib/x86_64-linux-gnu
This commit is contained in:
@@ -163,7 +163,7 @@ ifndef CPLUSPLUS_NEEDED
|
||||
CPLUSPLUS_NEEDED = 1
|
||||
endif # CPLUSPLUS_NEEDED
|
||||
ifdef WANT_WIN_QT6
|
||||
CPLUSPLUS_NEED17 = 1
|
||||
CPLUSPLUS_NEED20 = 1
|
||||
CPLUSPLUS_NEED_DEPSUPPRESS = 1
|
||||
endif # WANT_WIN_QT6
|
||||
endif # WANT_WIN_QT
|
||||
|
||||
Reference in New Issue
Block a user