Revision
16206
Author
jmesquita
Date
2010-01-07 18:41:10 -0600 (Thu, 07 Jan 2010)

Log Message

Fix latest error

Modified Paths

Diff

Modified: freeswitch/trunk/fscomm/FSComm.pro (16205 => 16206)


--- freeswitch/trunk/fscomm/FSComm.pro	2010-01-08 00:12:54 UTC (rev 16205)
+++ freeswitch/trunk/fscomm/FSComm.pro	2010-01-08 00:41:10 UTC (rev 16206)
@@ -40,8 +40,7 @@
     preferences/accountdialog.h
 FORMS += mainwindow.ui \
     preferences/prefdialog.ui \
-    preferences/accountdialog.ui \
-    ../aboutdialog.ui
+    preferences/accountdialog.ui
 RESOURCES += resources.qrc
 OTHER_FILES += conf/portaudio.conf.xml \
     conf/event_socket.conf.xml \

Modified: freeswitch/trunk/fscomm/preferences/accountdialog.cpp (16205 => 16206)


--- freeswitch/trunk/fscomm/preferences/accountdialog.cpp	2010-01-08 00:12:54 UTC (rev 16205)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.cpp	2010-01-08 00:41:10 UTC (rev 16206)
@@ -1,3 +1,4 @@
+#include <QSettings>
 #include "accountdialog.h"
 #include "ui_accountdialog.h"
 
@@ -6,6 +7,8 @@
     ui(new Ui::AccountDialog)
 {
     ui->setupUi(this);
+    _settings = new QSettings;
+    connect(this, SIGNAL(accepted()), this, SLOT(writeConfig()));
 }
 
 AccountDialog::~AccountDialog()
@@ -15,7 +18,27 @@
 
 void AccountDialog::writeConfig()
 {
+    _settings->beginGroup("FreeSWITCH/conf/accounts");
 
+    _settings->beginGroup(ui->sofiaGwNameEdit->text());
+    _settings->setValue("username", ui->sofiaGwUsernameEdit->text());
+    _settings->setValue("realm", ui->sofiaGwRealmEdit->text());
+    _settings->setValue("from-user", ui->sofiaGwFromUserEdit->text());
+    _settings->setValue("from-domain", ui->sofiaGwFromDomainEdit->text());
+    _settings->setValue("password", ui->sofiaGwPasswordEdit->text());
+    _settings->setValue("extension", ui->sofiaGwExtensionEdit->text());
+    _settings->setValue("proxy", ui->sofiaGwProxyEdit->text());
+    _settings->setValue("register-proxy", ui->sofiaGwRegisterProxyEdit->text());
+    _settings->setValue("expire-seconds", ui->sofiaGwExpireSecondsSpin->value());
+    _settings->setValue("register", ui->sofiaGwRegisterCombo->currentText());
+    _settings->setValue("register-transport", ui->sofiaGwRegisterTransportCombo->currentText());
+    _settings->setValue("retry-seconds", ui->sofiaGwRetrySecondsSpin->value());
+    _settings->setValue("caller-id-in-from", ui->sofiaGwCallerIdInFromCombo->currentText());
+    _settings->setValue("contact-params", ui->sofiaGwContactParamsEdit->text());
+    _settings->setValue("ping", ui->sofiaGwPingSpin->value());
+    _settings->endGroup();
+
+    _settings->endGroup();
 }
 
 void AccountDialog::changeEvent(QEvent *e)

Modified: freeswitch/trunk/fscomm/preferences/accountdialog.h (16205 => 16206)


--- freeswitch/trunk/fscomm/preferences/accountdialog.h	2010-01-08 00:12:54 UTC (rev 16205)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.h	2010-01-08 00:41:10 UTC (rev 16206)
@@ -7,6 +7,8 @@
     class AccountDialog;
 }
 
+class QSettings;
+
 class AccountDialog : public QDialog {
     Q_OBJECT
 public:
@@ -21,6 +23,7 @@
 
 private:
     Ui::AccountDialog *ui;
+    QSettings *_settings;
 };
 
 #endif // ACCOUNTDIALOG_H