diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index fa681ad..cbf489d 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -63,6 +63,7 @@ class Q_SERIALPORT_EXPORT QSerialPort : public QIODevice
#if QT_DEPRECATED_SINCE(5, 3)
Q_PROPERTY(bool settingsRestoredOnClose READ settingsRestoredOnClose WRITE setSettingsRestoredOnClose NOTIFY settingsRestoredOnCloseChanged)
#endif
+ Q_PROPERTY(bool breakEnabled READ isBreakEnabled WRITE setBreakEnabled NOTIFY breakEnabledChanged)
Q_ENUMS(BaudRate DataBits Parity StopBits FlowControl DataErrorPolicy SerialPortError)
Q_FLAGS(Directions PinoutSignals)
@@ -141,7 +142,7 @@ public:
Q_DECLARE_FLAGS(PinoutSignals, PinoutSignal)
#if QT_DEPRECATED_SINCE(5, 2)
-#if defined _MSC_VER
+#if defined(_MSC_VER)
#pragma deprecated(UnknownBaud)
#pragma deprecated(UnknownDataBits)
#pragma deprecated(UnknownParity)
@@ -244,8 +245,11 @@ public:
bool waitForReadyRead(int msecs) Q_DECL_OVERRIDE;
bool waitForBytesWritten(int msecs) Q_DECL_OVERRIDE;
- bool sendBreak(int duration = 0);
+#if QT_DEPRECATED_SINCE(5, 5)
+ QT_DEPRECATED bool sendBreak(int duration = 0);
+#endif
bool setBreakEnabled(bool set = true);
+ bool isBreakEnabled() const;
Handle handle() const;
@@ -255,11 +259,16 @@ Q_SIGNALS:
void parityChanged(QSerialPort::Parity parity);
void stopBitsChanged(QSerialPort::StopBits stopBits);
void flowControlChanged(QSerialPort::FlowControl flowControl);
- void dataErrorPolicyChanged(QSerialPort::DataErrorPolicy policy);
+#if QT_DEPRECATED_SINCE(5, 2)
+ QT_DEPRECATED void dataErrorPolicyChanged(QSerialPort::DataErrorPolicy policy);
+#endif
void dataTerminalReadyChanged(bool set);
void requestToSendChanged(bool set);
void error(QSerialPort::SerialPortError serialPortError);
- void settingsRestoredOnCloseChanged(bool restore);
+#if QT_DEPRECATED_SINCE(5, 3)
+ QT_DEPRECATED void settingsRestoredOnCloseChanged(bool restore);
+#endif
+ void breakEnabledChanged(bool set);
protected:
qint64 readData(char *data, qint64 maxSize) Q_DECL_OVERRIDE;
@@ -269,15 +278,14 @@ protected:
private:
void setError(QSerialPort::SerialPortError error, const QString &errorString = QString());
- QSerialPortPrivate * const d_ptr;
+ // ### Qt6: remove me.
+ QSerialPortPrivate * const d_dummy;
Q_DISABLE_COPY(QSerialPort)
#if defined(Q_OS_WIN32)
- Q_PRIVATE_SLOT(d_func(), bool _q_completeAsyncCommunication())
- Q_PRIVATE_SLOT(d_func(), bool _q_completeAsyncRead())
- Q_PRIVATE_SLOT(d_func(), bool _q_completeAsyncWrite())
Q_PRIVATE_SLOT(d_func(), bool _q_startAsyncWrite())
+ Q_PRIVATE_SLOT(d_func(), void _q_notified(quint32, quint32, OVERLAPPED*))
#endif
};
diff --git a/src/serialport/qserialportglobal.h b/src/serialport/qserialportglobal.h
index 7aa5caa..ec0cd5c 100644
--- a/src/serialport/qserialportglobal.h
+++ b/src/serialport/qserialportglobal.h
@@ -50,23 +50,6 @@ QT_BEGIN_NAMESPACE
# define Q_SERIALPORT_EXPORT
#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
-
-#ifndef QStringLiteral
-#define QStringLiteral(str) QString::fromUtf8(str)
-#endif
-
-#ifndef Q_NULLPTR
-#define Q_NULLPTR NULL
-#endif
-
QT_END_NAMESPACE
#endif // QSERIALPORTGLOBAL_H
diff --git a/src/serialport/qserialportinfo.h b/src/serialport/qserialportinfo.h
index 714708d..9f0352b 100644
--- a/src/serialport/qserialportinfo.h
+++ b/src/serialport/qserialportinfo.h
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development