From: Maxime Date: Thu, 12 May 2011 13:23:11 +0000 (+0200) Subject: parameterizing settings path and settings format in constructor X-Git-Tag: v1.2.1~31 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=046c745470683943ba4f0e6abd72ed27446d0cc2;p=clitk.git parameterizing settings path and settings format in constructor --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 95df533..5225a03 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -331,7 +331,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() void vvMainWindow::show(){ vvMainWindowBase::show(); - vvRegisterForm* registerForm = new vvRegisterForm(QUrl("http://localhost/vvregister/write.php")); + vvRegisterForm* registerForm = new vvRegisterForm(QUrl("http://localhost/vvregister/write.php"), getVVSettingsPath(), getSettingsOptionFormat()); if(registerForm->canPush()){ registerForm->show(); registerForm->acquitPushed();//too bad if there is not internet connection anymore. diff --git a/vv/vvRegisterForm.cxx b/vv/vvRegisterForm.cxx index d77b8fd..839887f 100644 --- a/vv/vvRegisterForm.cxx +++ b/vv/vvRegisterForm.cxx @@ -24,7 +24,7 @@ #include "vvCommon.h" #include "vvUtils.h" -vvRegisterForm::vvRegisterForm(QUrl url):url(url), settings(getVVSettingsPath(), getSettingsOptionFormat()){ +vvRegisterForm::vvRegisterForm(QUrl url, QString path, QSettings::Format format):url(url), settings(path, format){ manager = new QNetworkAccessManager(this); setupUi(this); } diff --git a/vv/vvRegisterForm.h b/vv/vvRegisterForm.h index e5f1ea6..ab41f39 100644 --- a/vv/vvRegisterForm.h +++ b/vv/vvRegisterForm.h @@ -27,7 +27,7 @@ class vvRegisterForm : public QDialog, private Ui::vvRegisterForm Q_OBJECT public: - vvRegisterForm(QUrl url); + vvRegisterForm(QUrl url, QString path, QSettings::Format format); void sendData(); ~vvRegisterForm() {} virtual bool canPush();