diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-11-28 03:48:05 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-30 11:06:32 +0100 |
commit | f77043dbef5a2f2b3c81b07b95e1f63ea9921fd4 (patch) | |
tree | 49e0b58b998ab4276fadc6e77cf47d079b525aa6 | |
parent | e0be9ed761e730bec7b26bcaba014f028f6340d0 (diff) |
Obsolete the isValid() method in QSerialPortInfo
Task-number: QTBUG-35184
Change-Id: Ie822943bcaf071024bc4f9782441b0534fcbd43d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-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 7f3e4c27..51e3d44b 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 ada19fb2..3e043960 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 09ba0df4..d17ce6b0 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 78ef6944..5172e60d 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 51f3b10c..f76b77e9 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(); |