Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.16
-
None
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