Changeset 2530 in ntrip for trunk/BNC/bncrawfile.cpp


Ignore:
Timestamp:
Aug 3, 2010, 8:01:55 PM (14 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrawfile.cpp

    r2529 r2530  
    109109  if (_inpFile) {
    110110    QString     line = _inpFile->readLine();
    111     QStringList lst  = line.split(' ');
    112    
    113     bncApp* app = (bncApp*) qApp;
    114     delete app->_currentDateAndTimeGPS;
    115     app->_currentDateAndTimeGPS =
    116       new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate));
    117 
    118     _staID  = lst.value(1).toAscii();
    119     _format = lst.value(2).toAscii();
    120     int nBytes = lst.value(3).toInt();
    121 
    122     data = _inpFile->read(nBytes);
    123 
    124     _inpFile->read(1); // read '\n' character
     111    if (!line.isEmpty()) {
     112      QStringList lst  = line.split(' ');
     113     
     114      bncApp* app = (bncApp*) qApp;
     115      delete app->_currentDateAndTimeGPS;
     116      app->_currentDateAndTimeGPS =
     117        new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate));
     118     
     119      _staID  = lst.value(1).toAscii();
     120      _format = lst.value(2).toAscii();
     121      int nBytes = lst.value(3).toInt();
     122     
     123      data = _inpFile->read(nBytes);
     124     
     125      _inpFile->read(1); // read '\n' character
     126    }
    125127  }
    126128
Note: See TracChangeset for help on using the changeset viewer.