Changeset 1850 in ntrip
- Timestamp:
- Jun 29, 2009, 11:26:45 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncnetqueryv1.cpp
r1849 r1850 52 52 } 53 53 54 // End of Request55 ////////////////////////////////////////////////////////////////////////////56 void bncNetQueryV1::slotFinished() {57 _eventLoop->quit();58 if (_socket) {59 _outData = _socket->readAll();60 _status = finished;61 }62 }63 64 54 // 65 55 //////////////////////////////////////////////////////////////////////////// … … 69 59 _socket = new QTcpSocket(); 70 60 71 connect(_socket, SIGNAL(disconnected()), this, SLOT(slotFinished()));61 connect(_socket, SIGNAL(disconnected()), _eventLoop, SLOT(quit())); 72 62 73 63 startRequestPrivate(url, "", true); 74 64 75 QTimer::singleShot(10000, this, SLOT(slotFinished()));65 QTimer::singleShot(10000, _eventLoop, SLOT(quit())); 76 66 77 67 _eventLoop->exec(); 78 68 69 outData = _socket->readAll(); 70 79 71 delete _socket; _socket = 0; 80 72 81 outData = _outData; 82 _outData.clear(); 73 _status = finished; 83 74 } 84 75 -
trunk/BNC/bncnetqueryv1.h
r1848 r1850 5 5 6 6 class bncNetQueryV1 : public bncNetQuery { 7 Q_OBJECT8 9 7 public: 10 8 bncNetQueryV1(); … … 16 14 virtual void waitForReadyRead(QByteArray& outData); 17 15 18 private slots:19 void slotFinished();20 21 16 private: 22 17 void startRequestPrivate(const QUrl& url, const QByteArray& gga, … … 24 19 QEventLoop* _eventLoop; 25 20 QTcpSocket* _socket; 26 QByteArray _outData;27 21 }; 28 22
Note:
See TracChangeset
for help on using the changeset viewer.