Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120221

clang-tidy, and probably clang complains about dllimport vs. inline in qtserialportinfo.h

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.16
    • Serial Port
    • None
    • Windows

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            hasselmann_via_meiller Mathias Hasselmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes