Changeset 1470 in ntrip


Ignore:
Timestamp:
Jan 15, 2009, 10:14:47 AM (16 years ago)
Author:
weber
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnctabledlg.cpp

    r1466 r1470  
    218218  QStringList lines;
    219219  QStringListIterator it(_allLines);
     220  int endSourceTable = 1;
    220221  while (it.hasNext()) {
    221222    QString line = it.next();
     223    if ((endSourceTable == 1 ) && line.indexOf("ENDSOURCETABLE") == 0) {
     224      endSourceTable = 0;
     225    }
    222226    if (line.indexOf("STR") == 0) {
    223227      lines.push_back(line);
    224228    }
    225229  }
     230  if (endSourceTable == 1) { printf("ENDSOURCETABLE missing\n");}
    226231
    227232  static const QStringList labels = QString("mountpoint,identifier,format,"
     
    236241    QStringList hlp = lines[0].split(";");
    237242    _table->setColumnCount(hlp.size()-1);
    238     _table->setRowCount(lines.size());
     243    _table->setRowCount(lines.size() - endSourceTable);
    239244
    240245    QListIterator<QString> it(lines);
     
    422427  QByteArray outData;
    423428  query.waitForRequestResult(url, outData);
     429  int endSourceTable = 1;
    424430  if (query.status() == bncNetQuery::finished) {
    425431    QTextStream in(outData);
     
    427433    while ( !line.isNull() ) {
    428434      line = in.readLine();
     435      if ((endSourceTable == 1 ) && line.indexOf("ENDSOURCETABLE") == 0) {
     436        endSourceTable = 0;
     437      }
    429438      if (line.indexOf("CAS") == 0) {
    430439        lines.append(line);
     
    432441    }
    433442  }
     443  if (endSourceTable == 1) { printf("ENDSOURCETABLE missing\n");}
    434444  if (lines.size() > 0) {
    435445    _casterTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
     
    438448    QStringList hlp = lines[0].split(";");
    439449    _casterTable->setColumnCount(hlp.size()-1);
    440     _casterTable->setRowCount(lines.size());
     450    _casterTable->setRowCount(lines.size() - endSourceTable);
    441451
    442452    QListIterator<QString> it(lines);
Note: See TracChangeset for help on using the changeset viewer.