From 1dcd4c2f7e5204ff5dc7a0d8c75ca65bbb28048b Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Sun, 2 Feb 2014 19:22:42 +0000 Subject: Remove the unused SystemIn/OutputQueue size methods Change-Id: Iafab6ccc376da7a856b409017bbc42c36c016253 Reviewed-by: Denis Shienkov Reviewed-by: Sergey Belyashov --- src/serialport/qserialport_symbian.cpp | 11 ----------- src/serialport/qserialport_symbian_p.h | 3 --- src/serialport/qserialport_unix.cpp | 28 ---------------------------- src/serialport/qserialport_unix_p.h | 3 --- src/serialport/qserialport_win.cpp | 26 -------------------------- src/serialport/qserialport_win_p.h | 3 --- 6 files changed, 74 deletions(-) diff --git a/src/serialport/qserialport_symbian.cpp b/src/serialport/qserialport_symbian.cpp index 9318696..b904d2b 100644 --- a/src/serialport/qserialport_symbian.cpp +++ b/src/serialport/qserialport_symbian.cpp @@ -237,17 +237,6 @@ bool QSerialPortPrivate::setBreakEnabled(bool set) return false; } -qint64 QSerialPortPrivate::systemInputQueueSize () const -{ - return descriptor.QueryReceiveBuffer(); -} - -qint64 QSerialPortPrivate::systemOutputQueueSize () const -{ - // TODO: Implement me - return 0; -} - void QSerialPortPrivate::startWriting() { // TODO: Implement me diff --git a/src/serialport/qserialport_symbian_p.h b/src/serialport/qserialport_symbian_p.h index 7c3d3ef..5d95ca9 100644 --- a/src/serialport/qserialport_symbian_p.h +++ b/src/serialport/qserialport_symbian_p.h @@ -69,9 +69,6 @@ public: bool sendBreak(int duration); bool setBreakEnabled(bool set); - qint64 systemInputQueueSize () const; - qint64 systemOutputQueueSize () const; - void startWriting(); bool waitForReadyRead(int msec); diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index 0542731..a904c06 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -438,34 +438,6 @@ bool QSerialPortPrivate::setBreakEnabled(bool set) return true; } -qint64 QSerialPortPrivate::systemInputQueueSize () -{ - Q_Q(QSerialPort); - - int nbytes = 0; -#ifdef TIOCINQ - if (::ioctl(descriptor, TIOCINQ, &nbytes) == -1) { - q->setError(decodeSystemError()); - return -1; - } -#endif - return nbytes; -} - -qint64 QSerialPortPrivate::systemOutputQueueSize () -{ - Q_Q(QSerialPort); - - int nbytes = 0; -#ifdef TIOCOUTQ - if (::ioctl(descriptor, TIOCOUTQ, &nbytes) == -1) { - q->setError(decodeSystemError()); - return -1; - } -#endif - return nbytes; -} - void QSerialPortPrivate::startWriting() { if (!isWriteNotificationEnabled()) diff --git a/src/serialport/qserialport_unix_p.h b/src/serialport/qserialport_unix_p.h index c1bb685..1960316 100644 --- a/src/serialport/qserialport_unix_p.h +++ b/src/serialport/qserialport_unix_p.h @@ -108,9 +108,6 @@ public: bool sendBreak(int duration); bool setBreakEnabled(bool set); - qint64 systemInputQueueSize (); - qint64 systemOutputQueueSize (); - void startWriting(); bool waitForReadyRead(int msecs); diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp index fef47a0..03775fb 100644 --- a/src/serialport/qserialport_win.cpp +++ b/src/serialport/qserialport_win.cpp @@ -355,32 +355,6 @@ bool QSerialPortPrivate::setBreakEnabled(bool set) return true; } -qint64 QSerialPortPrivate::systemInputQueueSize () -{ - Q_Q(QSerialPort); - - COMSTAT cs; - ::ZeroMemory(&cs, sizeof(cs)); - if (!::ClearCommError(descriptor, NULL, &cs)) { - q->setError(decodeSystemError()); - return -1; - } - return cs.cbInQue; -} - -qint64 QSerialPortPrivate::systemOutputQueueSize () -{ - Q_Q(QSerialPort); - - COMSTAT cs; - ::ZeroMemory(&cs, sizeof(cs)); - if (!::ClearCommError(descriptor, NULL, &cs)) { - q->setError(decodeSystemError()); - return -1; - } - return cs.cbOutQue; -} - #ifndef Q_OS_WINCE void QSerialPortPrivate::startWriting() diff --git a/src/serialport/qserialport_win_p.h b/src/serialport/qserialport_win_p.h index 3ccdb56..12bb3f1 100644 --- a/src/serialport/qserialport_win_p.h +++ b/src/serialport/qserialport_win_p.h @@ -78,9 +78,6 @@ public: bool sendBreak(int duration); bool setBreakEnabled(bool set); - qint64 systemInputQueueSize (); - qint64 systemOutputQueueSize (); - void startWriting(); bool waitForReadyRead(int msec); -- cgit v1.2.1