- Timestamp:
- Dec 8, 2009, 10:49:57 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncapp.cpp
r2011 r2105 639 639 QMutexLocker locker(&_mutex); 640 640 641 if (!_socketsCorr) {642 return;643 }644 645 641 bncSettings settings; 646 642 _waitCoTime = settings.value("corrTime").toInt(); … … 683 679 QList<QString> allCorrs = _corrs->values(sec); 684 680 emit newCorrections(allCorrs); 685 QListIterator<QString> it(allCorrs); 686 while (it.hasNext()) { 687 QString corrLine = it.next() + "\n"; 688 689 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 690 while (is.hasNext()) { 691 QTcpSocket* sock = is.next(); 692 if (sock->state() == QAbstractSocket::ConnectedState) { 693 if (sock->write(corrLine.toAscii()) == -1) { 681 if (_socketsCorr) { 682 QListIterator<QString> it(allCorrs); 683 while (it.hasNext()) { 684 QString corrLine = it.next() + "\n"; 685 686 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 687 while (is.hasNext()) { 688 QTcpSocket* sock = is.next(); 689 if (sock->state() == QAbstractSocket::ConnectedState) { 690 if (sock->write(corrLine.toAscii()) == -1) { 691 delete sock; 692 is.remove(); 693 } 694 } 695 else if (sock->state() != QAbstractSocket::ConnectingState) { 694 696 delete sock; 695 697 is.remove(); 696 698 } 697 }698 else if (sock->state() != QAbstractSocket::ConnectingState) {699 delete sock;700 is.remove();701 699 } 702 700 } -
trunk/BNC/bncwindow.cpp
r2103 r2105 569 569 _corrIntrComboBox->setEnabled(false); 570 570 } 571 if (_corrPortLineEdit->text().isEmpty()) {572 _corrTimeSpinBox->setStyleSheet("background-color: lightGray");573 _corrTimeSpinBox->setEnabled(false);574 }575 571 576 572 // Feed Engine … … 1496 1492 _corrPortLineEdit->setEnabled(true); 1497 1493 } 1498 if (!_corrPortLineEdit->text().isEmpty()) {1499 _corrTimeSpinBox->setStyleSheet("background-color: white");1500 _corrTimeSpinBox->setEnabled(true);1501 }1502 1494 } else { 1503 1495 if (_corrPathLineEdit->text().isEmpty()) { 1504 1496 _corrIntrComboBox->setStyleSheet("background-color: lightGray"); 1505 1497 _corrIntrComboBox->setEnabled(false); 1506 }1507 if (_corrPortLineEdit->text().isEmpty()) {1508 _corrTimeSpinBox->setStyleSheet("background-color: lightGray");1509 _corrTimeSpinBox->setEnabled(false);1510 1498 } 1511 1499 }
Note:
See TracChangeset
for help on using the changeset viewer.