Changeset 5469 in ntrip for trunk/GnssCenter/monitor


Ignore:
Timestamp:
Sep 18, 2013, 11:42:50 AM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/monitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/monitor/dlgconf.cpp

    r5466 r5469  
    2929  t_settings settings(pluginName);
    3030
    31   _hostLineEdit = new QLineEdit(settings.value("host").toString(), this);
     31  QString host = settings.value("host").toString();
     32  if (host.isEmpty()) {
     33    host = "localhost";
     34  }
     35  _hostLineEdit = new QLineEdit(host, this);
    3236  _portLineEdit = new QLineEdit(settings.value("port").toString(), this);
    3337
     
    6266void t_dlgConf::accept() {
    6367  t_settings settings(pluginName);
    64   settings.setValue("host", _hostLineEdit->text());
     68  QString host = _hostLineEdit->text();
     69  if (host.isEmpty()) {
     70    host = "localhost";
     71  }
     72  settings.setValue("host", host);
    6573  settings.setValue("port", _portLineEdit->text());
    6674  QDialog::accept();
  • trunk/GnssCenter/monitor/monitor.cpp

    r5457 r5469  
    9797  t_settings settings(pluginName);
    9898  QString host = settings.value("host").toString();
     99  if (host.isEmpty()) {
     100    host = "localhost";
     101  }
    99102  QString port = settings.value("port").toString();
    100   setWindowTitle(QString(pluginName) + ": " + host + ':' + port);
     103  setWindowTitle(QString(pluginName) + "  " + host + ':' + port);
    101104}
    102105
     
    115118    t_settings settings(pluginName);
    116119    QString host = settings.value("host").toString();
    117     int     port = settings.value("port").toInt();
     120    if (host.isEmpty()) {
     121      host = "localhost";
     122    }
     123    int port = settings.value("port").toInt();
    118124    _thriftClient = new t_thriftClient(this, host, port);
    119125    connect(_thriftClient, SIGNAL(finished()), this, SLOT(slotThriftFinished()));
Note: See TracChangeset for help on using the changeset viewer.