Changeset 5453 in ntrip


Ignore:
Timestamp:
Sep 14, 2013, 3:33:22 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/main/settings.cpp

    r5452 r5453  
    2626// Constructor
    2727////////////////////////////////////////////////////////////////////////////
    28 t_settings::t_settings() {
     28t_settings::t_settings(const QString& groupName) {
    2929  QMutexLocker locker(&_mutex);
    3030
    31   _app = static_cast<t_app*>(qApp);
     31  _groupName = groupName;
     32  _app       = static_cast<t_app*>(qApp);
    3233
    3334  // First fill the options
     
    111112  settings.sync();
    112113}
    113 
    114 //
    115 ////////////////////////////////////////////////////////////////////////////
    116 void t_settings::beginGroup(const QString& groupName) {
    117   QMutexLocker locker(&_mutex);
    118   _groupName = groupName;
    119 }
    120 
    121 //
    122 ////////////////////////////////////////////////////////////////////////////
    123 void t_settings::endGroup() {
    124   QMutexLocker locker(&_mutex);
    125   _groupName.clear();
    126 }
  • trunk/GnssCenter/main/settings.h

    r5452 r5453  
    1010class t_settings {
    1111 public:
    12   t_settings();
     12  t_settings(const QString& groupName = QString());
    1313  ~t_settings();
    1414  QVariant value(const QString& key,
     
    1717  void remove(const QString& key );
    1818  void sync();
    19   void beginGroup(const QString& groupName);
    20   void endGroup();
    2119 private:
    2220  void reRead();
  • trunk/GnssCenter/monitor/monitor.cpp

    r5452 r5453  
    6666  // Host and Port
    6767  // -------------
    68   t_settings settings;
    69   settings.beginGroup(pluginName);
     68  t_settings settings(pluginName);
    7069  settings.setValue("host", "rtnet.rtcm-ntrip.org");
    7170  settings.setValue("port", 7777);
    72   settings.endGroup();
    7371  settings.sync();
    7472
     
    9694void t_monitor::slotStartThrift() {
    9795  if (!_thriftClient) {
    98     t_settings settings;
    99     settings.beginGroup(pluginName);
     96    t_settings settings(pluginName);
    10097    QString host = settings.value("host").toString();
    10198    int     port = settings.value("port").toInt();
    102     settings.endGroup();
    10399    _thriftClient = new t_thriftClient(this, host, port);
    104100    connect(_thriftClient, SIGNAL(finished()), this, SLOT(slotThriftFinished()));
Note: See TracChangeset for help on using the changeset viewer.