Changeset 1470 in ntrip
- Timestamp:
- Jan 15, 2009, 10:14:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnctabledlg.cpp
r1466 r1470 218 218 QStringList lines; 219 219 QStringListIterator it(_allLines); 220 int endSourceTable = 1; 220 221 while (it.hasNext()) { 221 222 QString line = it.next(); 223 if ((endSourceTable == 1 ) && line.indexOf("ENDSOURCETABLE") == 0) { 224 endSourceTable = 0; 225 } 222 226 if (line.indexOf("STR") == 0) { 223 227 lines.push_back(line); 224 228 } 225 229 } 230 if (endSourceTable == 1) { printf("ENDSOURCETABLE missing\n");} 226 231 227 232 static const QStringList labels = QString("mountpoint,identifier,format," … … 236 241 QStringList hlp = lines[0].split(";"); 237 242 _table->setColumnCount(hlp.size()-1); 238 _table->setRowCount(lines.size() );243 _table->setRowCount(lines.size() - endSourceTable); 239 244 240 245 QListIterator<QString> it(lines); … … 422 427 QByteArray outData; 423 428 query.waitForRequestResult(url, outData); 429 int endSourceTable = 1; 424 430 if (query.status() == bncNetQuery::finished) { 425 431 QTextStream in(outData); … … 427 433 while ( !line.isNull() ) { 428 434 line = in.readLine(); 435 if ((endSourceTable == 1 ) && line.indexOf("ENDSOURCETABLE") == 0) { 436 endSourceTable = 0; 437 } 429 438 if (line.indexOf("CAS") == 0) { 430 439 lines.append(line); … … 432 441 } 433 442 } 443 if (endSourceTable == 1) { printf("ENDSOURCETABLE missing\n");} 434 444 if (lines.size() > 0) { 435 445 _casterTable->setSelectionMode(QAbstractItemView::ExtendedSelection); … … 438 448 QStringList hlp = lines[0].split(";"); 439 449 _casterTable->setColumnCount(hlp.size()-1); 440 _casterTable->setRowCount(lines.size() );450 _casterTable->setRowCount(lines.size() - endSourceTable); 441 451 442 452 QListIterator<QString> it(lines);
Note:
See TracChangeset
for help on using the changeset viewer.