Changeset 1274 in ntrip


Ignore:
Timestamp:
Dec 5, 2008, 3:58:36 PM (16 years ago)
Author:
zdenek
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnctabledlg.cpp

    r1273 r1274  
    5353  QSettings settings;
    5454  _casterHostLineEdit     = new QComboBox();
     55  _casterHostLineEdit->setDuplicatesEnabled(false);
     56  _casterHostLineEdit->setEditable(true);
    5557  int ww = QFontMetrics(_casterHostLineEdit->font()).width('w');
    5658  _casterHostLineEdit->setMaximumWidth(20*ww);
     59  QStringList casterHostList = settings.value("casterHostList").toStringList();
    5760  _casterHostLineEdit->addItem(settings.value("casterHost").toString());
    58   _casterHostLineEdit->addItems(settings.value("casterHostList").toStringList());
    59   _casterHostLineEdit->setEditable(true);
     61  for (QStringList::const_iterator
     62         ii = casterHostList.begin(); ii != casterHostList.end(); ii++) {
     63    if (_casterHostLineEdit->findText(*ii, Qt::MatchFixedString) < 0) {
     64      _casterHostLineEdit->addItem(*ii);
     65    }
     66  }
    6067  _casterPortLineEdit     = new QLineEdit(settings.value("casterPort").toString());
    6168  _casterPortLineEdit->setMaximumWidth(9*ww);
Note: See TracChangeset for help on using the changeset viewer.