Changeset 1850 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jun 29, 2009, 11:26:45 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetqueryv1.cpp

    r1849 r1850  
    5252}
    5353
    54 // End of Request
    55 ////////////////////////////////////////////////////////////////////////////
    56 void bncNetQueryV1::slotFinished() {
    57   _eventLoop->quit();
    58   if (_socket) {
    59     _outData = _socket->readAll();
    60     _status = finished;
    61   }
    62 }
    63 
    6454//
    6555////////////////////////////////////////////////////////////////////////////
     
    6959  _socket = new QTcpSocket();
    7060
    71   connect(_socket, SIGNAL(disconnected()), this, SLOT(slotFinished()));
     61  connect(_socket, SIGNAL(disconnected()), _eventLoop, SLOT(quit()));
    7262
    7363  startRequestPrivate(url, "", true);
    7464
    75   QTimer::singleShot(10000, this, SLOT(slotFinished()));
     65  QTimer::singleShot(10000, _eventLoop, SLOT(quit()));
    7666
    7767  _eventLoop->exec();
    7868
     69  outData = _socket->readAll();
     70
    7971  delete _socket; _socket = 0;
    8072
    81   outData = _outData;
    82   _outData.clear();
     73  _status = finished;
    8374}
    8475
  • trunk/BNC/bncnetqueryv1.h

    r1848 r1850  
    55
    66class bncNetQueryV1 : public bncNetQuery {
    7  Q_OBJECT
    8 
    97 public:
    108  bncNetQueryV1();
     
    1614  virtual void waitForReadyRead(QByteArray& outData);
    1715
    18  private slots:
    19   void slotFinished();
    20 
    2116 private:
    2217  void startRequestPrivate(const QUrl& url, const QByteArray& gga,
     
    2419  QEventLoop* _eventLoop;
    2520  QTcpSocket* _socket;
    26   QByteArray  _outData;
    2721};
    2822
Note: See TracChangeset for help on using the changeset viewer.