Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.2
-
None
-
ubuntu 23.04
-
-
f24a03a22 (dev), c4086d7b7 (dev), 1941c11b6 (dev), 2117fc2b1 (6.7), 98046f48f (6.7), 624fd64d1 (6.7), 8a5a0e1b9 (tqtc/lts-6.5), a074dd561 (dev)
Description
The equality operator of QPageSize is redundantly declared and results in a warning / error (with -Werror):
In file included from /usr/include/x86_64-linux-gnu/qt6/QtGui/qpagelayout.h:12, from /usr/include/x86_64-linux-gnu/qt6/QtGui/qpagedpaintdevice.h:9, from /usr/include/x86_64-linux-gnu/qt6/QtPrintSupport/qprinter.h:10, from /usr/include/x86_64-linux-gnu/qt6/QtPrintSupport/QPrinter:1, [...] /usr/include/x86_64-linux-gnu/qt6/QtGui/qpagesize.h:252:77: error: ‘bool operator==(const QPageSize&, const QPageSize&)’ is already a friend of class ‘QPageSize’ [-Werror=redundant-decls] 252 | friend inline bool operator==(const QPageSize &lhs, const QPageSize &rhs) | ^
In Qt 6.4.2 the operator is declared and then re-declared and defined in qpagesize.h line 206 and 252+253:
friend Q_GUI_EXPORT bool operator==(const QPageSize &lhs, const QPageSize &rhs);
friend inline bool operator==(const QPageSize &lhs, const QPageSize &rhs) { return lhs.equals(rhs); }
Attachments
Issue Links
- resulted in
-
QTBUG-124934 qmlintegration.h macros cause GCC -Wredundant-decls
-
- Closed
-