diff options
-rw-r--r-- | dist/changes-5.2.0 | 3 | ||||
-rw-r--r-- | src/serialport/qserialport.h | 4 | ||||
-rw-r--r-- | src/serialport/qserialportglobal.h | 4 | ||||
-rw-r--r-- | src/serialport/qserialportinfo.cpp | 1 | ||||
-rw-r--r-- | src/serialport/qserialportinfo.h | 4 |
5 files changed, 11 insertions, 5 deletions
diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0 index 7f3e4c2..51e3d44 100644 --- a/dist/changes-5.2.0 +++ b/dist/changes-5.2.0 @@ -124,3 +124,6 @@ into /data/local/tmp. - [QTBUG-35064] PCI support has been added to the sysfs backend on Linux to support the enumeration of such devices. + +- [QTBUG-35184] Mark the isValid() method in QSerialPortInfo deprecated because +it has no common use case. diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h index ada19fb..3e04396 100644 --- a/src/serialport/qserialport.h +++ b/src/serialport/qserialport.h @@ -47,10 +47,6 @@ #include <QtSerialPort/qserialportglobal.h> -#ifndef QT_DEPRECATED_SINCE -#define QT_DEPRECATED_SINCE(major, minor) 1 -#endif - QT_BEGIN_NAMESPACE class QSerialPortInfo; diff --git a/src/serialport/qserialportglobal.h b/src/serialport/qserialportglobal.h index 09ba0df..d17ce6b 100644 --- a/src/serialport/qserialportglobal.h +++ b/src/serialport/qserialportglobal.h @@ -59,6 +59,10 @@ QT_BEGIN_NAMESPACE #endif // These macros have been available only since Qt 5.0 +#ifndef QT_DEPRECATED_SINCE +#define QT_DEPRECATED_SINCE(major, minor) 1 +#endif + #ifndef Q_DECL_OVERRIDE #define Q_DECL_OVERRIDE #endif diff --git a/src/serialport/qserialportinfo.cpp b/src/serialport/qserialportinfo.cpp index 78ef694..5172e60 100644 --- a/src/serialport/qserialportinfo.cpp +++ b/src/serialport/qserialportinfo.cpp @@ -258,6 +258,7 @@ bool QSerialPortInfo::hasProductIdentifier() const /*! \fn bool QSerialPortInfo::isValid() const + \obsolete Returns true if serial port is present on system; otherwise returns false. diff --git a/src/serialport/qserialportinfo.h b/src/serialport/qserialportinfo.h index 51f3b10..f76b77e 100644 --- a/src/serialport/qserialportinfo.h +++ b/src/serialport/qserialportinfo.h @@ -80,7 +80,9 @@ public: bool isNull() const; bool isBusy() const; - bool isValid() const; +#if QT_DEPRECATED_SINCE(5, 2) + QT_DEPRECATED bool isValid() const; +#endif static QList<qint32> standardBaudRates(); static QList<QSerialPortInfo> availablePorts(); |