aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/usersurvey.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-20 11:19:49 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-25 11:49:47 -0700
commit321a920a9873a3828a24c1b28cf8eb5fe1bff2cb (patch)
treeef1dcbec683536af07ac86b1ed7f5c5856204707 /desktop-widgets/usersurvey.cpp
parent5f4a040dd217c07a341bd03fe80fe19747d1541e (diff)
downloadsubsurface-321a920a9873a3828a24c1b28cf8eb5fe1bff2cb.tar.gz
desktop-widgets: remove QSettings from desktop-widgets
The variables referenced are moved into qPref in earlier commits so in general all QSettings calls are replaced by qPref*:: calls Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets/usersurvey.cpp')
-rw-r--r--desktop-widgets/usersurvey.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/desktop-widgets/usersurvey.cpp b/desktop-widgets/usersurvey.cpp
index 326a51f9e..fdf3e7f95 100644
--- a/desktop-widgets/usersurvey.cpp
+++ b/desktop-widgets/usersurvey.cpp
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <QShortcut>
#include <QMessageBox>
-#include <QSettings>
#include "desktop-widgets/usersurvey.h"
#include "ui_usersurvey.h"
@@ -11,6 +10,7 @@
#include "core/qthelper.h"
#include "core/subsurfacesysinfo.h"
+#include "core/settings/qPrefDisplay.h"
UserSurvey::UserSurvey(QWidget *parent) : QDialog(parent),
ui(new Ui::UserSurvey)
@@ -88,9 +88,7 @@ void UserSurvey::on_buttonBox_rejected()
// nothing to do here, we'll just ask again the next time they start
break;
case QDialog::Rejected:
- QSettings s;
- s.beginGroup("UserSurvey");
- s.setValue("SurveyDone", "declined");
+ qPrefDisplay::set_UserSurvey("declined");
break;
}
hide();
@@ -116,9 +114,7 @@ void UserSurvey::requestReceived()
if (responseBody == "OK") {
msgText = tr("Survey successfully submitted.");
- QSettings s;
- s.beginGroup("UserSurvey");
- s.setValue("SurveyDone", "submitted");
+ qPrefDisplay::set_UserSurvey("submitted");
} else {
msgText = tr("There was an error while trying to check for updates.<br/><br/>%1").arg(responseBody);
msgbox.setIcon(QMessageBox::Warning);