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
-
For Gerrit Dashboard: QTBUG-115583 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
554302,8 | QPageSize: remove redundant operator== declaration | dev | qt/qtbase | Status: MERGED | +2 | +1 |
558398,2 | qfuture_impl.h: remove redundant declaration | dev | qt/qtbase | Status: MERGED | +2 | 0 |
558400,2 | QNetworkInformation: remove redundant friend declaration | dev | qt/qtbase | Status: MERGED | +2 | 0 |
558401,2 | headersclean: add -Wredundant-decls | dev | qt/qtbase | Status: MERGED | +2 | 0 |
558563,2 | QPageSize: remove redundant operator== declaration | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
558564,2 | qfuture_impl.h: remove redundant declaration | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
558565,2 | QNetworkInformation: remove redundant friend declaration | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
558647,2 | QNetworkInformation: remove redundant friend declaration | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |