Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.16
-
None
-
-
1
-
fca9174d4 (dev), bf028412e (6.8), b3edacd33 (tqtc/lts-6.5), 160a1428d (tqtc/lts-5.15)
-
Foundation Sprint 120
Description
Maybe should have reported this long time ago, instead of patching it away all the time.
Clang-tidy, and probably clang complains about dllimport vs. inline in qtserialportinfo.h:
C:/Qt/5.15.16/mingw81_64/include/QtSerialPort/qserialportinfo.h:99:30: error: 'QSerialPortInfo::isNull' redeclared inline; 'dllimport' attribute ignored [clang-diagnostic-ignored-attributes] 99 | inline bool QSerialPortInfo::isNull() const | ^
One possible patch to make this warning go away looks like this:
--- 5.15.16/mingw81_64/include/QtSerialPort/qserialportinfo.h 2023-09-01 14:41:36.000000000 +0200 +++ 5.15.14/mingw81_64/include/QtSerialPort/qserialportinfo.h 2023-07-07 17:04:31.174653500 +0200 @@ -77,7 +77,7 @@ bool hasVendorIdentifier() const; bool hasProductIdentifier() const; - bool isNull() const; + bool isNull() const { return !d_ptr; } #if QT_DEPRECATED_SINCE(5, 6) bool isBusy() const; #endif @@ -96,9 +96,6 @@ QScopedPointer<QSerialPortInfoPrivate, QSerialPortInfoPrivateDeleter> d_ptr; }; -inline bool QSerialPortInfo::isNull() const -{ return !d_ptr; } - QT_END_NAMESPACE #endif // QSERIALPORTINFO_H
Attachments
For Gerrit Dashboard: QTBUG-120221 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
605968,4 | QSerialPortInfo::isNull(): fix the usage of inline keyword | dev | qt/qtserialport | Status: MERGED | +2 | 0 |
606400,2 | QSerialPortInfo::isNull(): fix the usage of inline keyword | 6.8 | qt/qtserialport | Status: MERGED | +2 | 0 |
606491,2 | QSerialPortInfo::isNull(): fix the usage of inline keyword | tqtc/lts-6.5 | qt/tqtc-qtserialport | Status: MERGED | +2 | 0 |
606587,3 | QSerialPortInfo::isNull(): fix the usage of inline keyword | tqtc/lts-5.15 | qt/tqtc-qtserialport | Status: MERGED | +2 | 0 |