Ignore:
Timestamp:
Sep 18, 2013, 11:42:50 AM (11 years ago)
Author:
mervart
Message:
 
File:
1 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();
Note: See TracChangeset for help on using the changeset viewer.