Pastebin URL (expires in 24 hours):
http://paste.fedoraproject.org/51641/38361144

--- 
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index e035ee3..e173445 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -55,6 +55,7 @@ class QSerialPortPrivate;
 class Q_SERIALPORT_EXPORT QSerialPort : public QIODevice
 {
     Q_OBJECT
+    Q_DECLARE_PRIVATE(QSerialPort)
 
     Q_PROPERTY(qint32 baudRate READ baudRate WRITE setBaudRate NOTIFY baudRateChanged)
     Q_PROPERTY(DataBits dataBits READ dataBits WRITE setDataBits NOTIFY dataBitsChanged)
@@ -67,7 +68,14 @@ class Q_SERIALPORT_EXPORT QSerialPort : public QIODevice
     Q_PROPERTY(SerialPortError error READ error RESET clearError NOTIFY error)
     Q_PROPERTY(bool settingsRestoredOnClose READ settingsRestoredOnClose WRITE setSettingsRestoredOnClose NOTIFY settingsRestoredOnCloseChanged)
 
-    Q_ENUMS( Directions Rate DataBits Parity StopBits FlowControl PinoutSignals DataErrorPolicy SerialPortError )
+    Q_ENUMS(BaudRate DataBits Parity StopBits FlowControl DataErrorPolicy SerialPortError)
+    Q_FLAGS(Directions PinoutSignals)
+
+#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+    typedef void* Handle;
+#else
+    typedef int Handle;
+#endif
 
 public:
 
@@ -132,7 +140,8 @@ public:
         RequestToSendSignal = 0x40,
         ClearToSendSignal = 0x80,
         SecondaryTransmittedDataSignal = 0x100,
-        SecondaryReceivedDataSignal = 0x200
+        SecondaryReceivedDataSignal = 0x200,
+        UnknownSignal = -1
     };
     Q_DECLARE_FLAGS(PinoutSignals, PinoutSignal)
 
@@ -156,7 +165,9 @@ public:
         ReadError,
         ResourceError,
         UnsupportedOperationError,
-        UnknownError
+        UnknownError,
+        TimeoutError,
+        NotOpenError
     };
 
     explicit QSerialPort(QObject *parent = 0);
@@ -175,8 +186,8 @@ public:
     void setSettingsRestoredOnClose(bool restore);
     bool settingsRestoredOnClose() const;
 
-    bool setBaudRate(qint32 baudRate, Directions dir = AllDirections);
-    qint32 baudRate(Directions dir = AllDirections) const;
+    bool setBaudRate(qint32 baudRate, Directions directions = AllDirections);
+    qint32 baudRate(Directions directions = AllDirections) const;
 
     bool setDataBits(DataBits dataBits);
     DataBits dataBits() const;
@@ -199,7 +210,7 @@ public:
     PinoutSignals pinoutSignals();
 
     bool flush();
-    bool clear(Directions dir = AllDirections);
+    bool clear(Directions directions = AllDirections);
     bool atEnd() const Q_DECL_OVERRIDE;
 
     bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy);
@@ -223,8 +234,10 @@ public:
     bool sendBreak(int duration = 0);
     bool setBreakEnabled(bool set = true);
 
+    Handle handle() const;
+
 Q_SIGNALS:
-    void baudRateChanged(qint32 baudRate, QSerialPort::Directions dir);
+    void baudRateChanged(qint32 baudRate, QSerialPort::Directions directions);
     void dataBitsChanged(QSerialPort::DataBits dataBits);
     void parityChanged(QSerialPort::Parity parity);
     void stopBitsChanged(QSerialPort::StopBits stopBits);
@@ -245,7 +258,6 @@ private:
 
     QSerialPortPrivate * const d_ptr;
 
-    Q_DECLARE_PRIVATE(QSerialPort)
     Q_DISABLE_COPY(QSerialPort)
 };
 
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to