From 046c745470683943ba4f0e6abd72ed27446d0cc2 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 12 May 2011 15:23:11 +0200 Subject: [PATCH] parameterizing settings path and settings format in constructor --- vv/vvMainWindow.cxx | 2 +- vv/vvRegisterForm.cxx | 2 +- vv/vvRegisterForm.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.47.1