summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2016-02-13 16:14:26 +0300
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-02-18 07:26:48 +0000
commit03d492e49e74eefa1c83e37e833d862f4b9f1e45 (patch)
tree4b5252085a58a8bf47ea26499b1e51721e519fd9
parent6ba354a0ec3bd3064d072cf170fe9f60f9ae3389 (diff)
Deprecate QSPI::isBusy() methodv5.6.0-rc1v5.6.0
It is impossible to implement this method properly on all platforms. Its implementation is complicated and introduces a side-effects, related to the race-conditions, permissions and so on. The user can implement QSPI::isBusy() himself just trying to open a desired device, what is equivalent to the current implementation. Change-Id: I71ef69a1a8edb7c4df23c8b2816add40475e00b5 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r--src/serialport/qserialportinfo.cpp2
-rw-r--r--src/serialport/qserialportinfo.h2
-rw-r--r--src/serialport/qserialportinfo_osx.cpp2
-rw-r--r--src/serialport/qserialportinfo_unix.cpp2
-rw-r--r--src/serialport/qserialportinfo_win.cpp2
-rw-r--r--src/serialport/qserialportinfo_wince.cpp2
6 files changed, 12 insertions, 0 deletions
diff --git a/src/serialport/qserialportinfo.cpp b/src/serialport/qserialportinfo.cpp
index 3e7245e5..ca81cd0a 100644
--- a/src/serialport/qserialportinfo.cpp
+++ b/src/serialport/qserialportinfo.cpp
@@ -257,6 +257,7 @@ bool QSerialPortInfo::hasProductIdentifier() const
\sa isBusy()
*/
+#if QT_DEPRECATED_SINCE(5, 6)
/*!
\fn bool QSerialPortInfo::isBusy() const
@@ -265,6 +266,7 @@ bool QSerialPortInfo::hasProductIdentifier() const
\sa isNull()
*/
+#endif // QT_DEPRECATED_SINCE(5, 6)
#if QT_DEPRECATED_SINCE(5, 2)
/*!
diff --git a/src/serialport/qserialportinfo.h b/src/serialport/qserialportinfo.h
index 2b757f9c..74daedc4 100644
--- a/src/serialport/qserialportinfo.h
+++ b/src/serialport/qserialportinfo.h
@@ -72,7 +72,9 @@ public:
bool hasProductIdentifier() const;
bool isNull() const;
+#if QT_DEPRECATED_SINCE(5, 6)
bool isBusy() const;
+#endif
#if QT_DEPRECATED_SINCE(5, 2)
QT_DEPRECATED bool isValid() const;
#endif
diff --git a/src/serialport/qserialportinfo_osx.cpp b/src/serialport/qserialportinfo_osx.cpp
index 4e73025e..912d880b 100644
--- a/src/serialport/qserialportinfo_osx.cpp
+++ b/src/serialport/qserialportinfo_osx.cpp
@@ -213,6 +213,7 @@ QList<qint32> QSerialPortInfo::standardBaudRates()
return QSerialPortPrivate::standardBaudRates();
}
+#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
QString lockFilePath = serialPortLockFilePath(portName());
@@ -235,6 +236,7 @@ bool QSerialPortInfo::isBusy() const
return true;
}
+#endif // QT_DEPRECATED_SINCE(5, 6)
#if QT_DEPRECATED_SINCE(5, 2)
bool QSerialPortInfo::isValid() const
diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp
index f5bbfc61..f7426fcb 100644
--- a/src/serialport/qserialportinfo_unix.cpp
+++ b/src/serialport/qserialportinfo_unix.cpp
@@ -752,6 +752,7 @@ QList<qint32> QSerialPortInfo::standardBaudRates()
return QSerialPortPrivate::standardBaudRates();
}
+#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
QString lockFilePath = serialPortLockFilePath(portName());
@@ -774,6 +775,7 @@ bool QSerialPortInfo::isBusy() const
return true;
}
+#endif // QT_DEPRECATED_SINCE(5, 6)
#if QT_DEPRECATED_SINCE(5, 2)
bool QSerialPortInfo::isValid() const
diff --git a/src/serialport/qserialportinfo_win.cpp b/src/serialport/qserialportinfo_win.cpp
index 63cf642e..0a9fc645 100644
--- a/src/serialport/qserialportinfo_win.cpp
+++ b/src/serialport/qserialportinfo_win.cpp
@@ -350,6 +350,7 @@ QList<qint32> QSerialPortInfo::standardBaudRates()
return QSerialPortPrivate::standardBaudRates();
}
+#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
const HANDLE handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation().utf16()),
@@ -363,6 +364,7 @@ bool QSerialPortInfo::isBusy() const
}
return false;
}
+#endif // QT_DEPRECATED_SINCE(5, 6)
#if QT_DEPRECATED_SINCE(5, 2)
bool QSerialPortInfo::isValid() const
diff --git a/src/serialport/qserialportinfo_wince.cpp b/src/serialport/qserialportinfo_wince.cpp
index 3688bc3d..3b132440 100644
--- a/src/serialport/qserialportinfo_wince.cpp
+++ b/src/serialport/qserialportinfo_wince.cpp
@@ -125,6 +125,7 @@ QList<qint32> QSerialPortInfo::standardBaudRates()
return QSerialPortPrivate::standardBaudRates();
}
+#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
const HANDLE handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation().utf16()),
@@ -138,6 +139,7 @@ bool QSerialPortInfo::isBusy() const
}
return false;
}
+#endif // QT_DEPRECATED_SINCE(5, 6)
#if QT_DEPRECATED_SINCE(5, 2)
bool QSerialPortInfo::isValid() const