Pārlūkot izejas kodu

getState

master
Robin Thoni 11 gadus atpakaļ
vecāks
revīzija
31f4b08ac6
2 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 5
    0
      ptsocket/ptsocket.cpp
  2. 1
    2
      ptsocket/ptsocket.h

+ 5
- 0
ptsocket/ptsocket.cpp Parādīt failu

@@ -22,6 +22,11 @@ PTSocket::PTSocket(QObject* p) : QTcpSocket(p)
22 22
     connect(this, SIGNAL(readyRead()), this, SLOT(m_readyRead()));
23 23
 }
24 24
 
25
+PTSocket::State PTSocket::getState() const
26
+{
27
+	return m_state;
28
+}
29
+
25 30
 int PTSocket::getTimeout() const
26 31
 {
27 32
     return m_timeout;

+ 1
- 2
ptsocket/ptsocket.h Parādīt failu

@@ -8,8 +8,6 @@
8 8
 #include <QTimer>
9 9
 #include <QMetaEnum>
10 10
 
11
-//#define PT_DEBUG
12
-
13 11
 class LIBPTSOCKETSHARED_EXPORT PTSocket : public QTcpSocket
14 12
 {
15 13
 	Q_OBJECT
@@ -26,6 +24,7 @@ public:
26 24
     };
27 25
     Q_ENUMS(State)
28 26
 	PTSocket(QObject* p);
27
+	State getState() const;
29 28
 	int getTimeout() const;
30 29
     int getPingInterval() const;
31 30
     bool isServerSide() const;

Notiek ielāde…
Atcelt
Saglabāt