Commit 71be8c7
chore(generator): Fix deprecated QFlags default constructor warning
This changes the initialization of `m_type_flags` to use `TypeFlag::NoTypeFlags`
instead of 0. This resolves a deprecation warning related to the QFlags
default constructor in Qt 5.15.2.
The warning fixed is:
```
/path/to/PythonQt/generator/typesystem.h:812:11: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = ComplexTypeEntry::TypeFlag; QFlags<T>::Zero = int QFlags<ComplexTypeEntry::TypeFlag>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations]
812 | m_type_flags(0)
| ^~~~~~~~~~~~~~~
In file included from /path/to/Qt/5.15.2/gcc_64/include/QtCore/qglobal.h:1304,
from /path/to/Qt/5.15.2/gcc_64/include/QtCore/qalgorithms.h:43,
from /path/to/Qt/5.15.2/gcc_64/include/QtCore/qlist.h:43,
from /path/to/Qt/5.15.2/gcc_64/include/QtCore/QList:1,
from /path/to/PythonQt/generator/parser/codemodel_fwd.h:46,
from /path/to/PythonQt/generator/parser/codemodel.h:46,
from /path/to/PythonQt/generator/abstractmetabuilder.h:45,
from /path/to/PythonQt/generator/abstractmetabuilder.cpp:42:
/path/to/Qt/5.15.2/gcc_64/include/QtCore/qflags.h:123:80: note: declared here
123 | QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
| ^~~~~~
```1 parent f4769f1 commit 71be8c7
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| 797 | + | |
797 | 798 | | |
798 | 799 | | |
799 | 800 | | |
| |||
809 | 810 | | |
810 | 811 | | |
811 | 812 | | |
812 | | - | |
| 813 | + | |
813 | 814 | | |
814 | 815 | | |
815 | 816 | | |
| |||
0 commit comments