summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/usersurvey.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-29 03:08:47 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-29 03:09:10 -0700
commit2d87a657d248c1c6d4dd6a805bbf90c98589798a (patch)
tree3f0e3a9f6c5e072a67c936e3bbf5d17957431816 /desktop-widgets/usersurvey.cpp
parent4bb72160a6323e1ab3f3d9ea2c7f90c21088347f (diff)
downloadsubsurface-2d87a657d248c1c6d4dd6a805bbf90c98589798a.tar.gz
Revert "desktop-widgets: remove QSettings from desktop-widgets"
This reverts commit 321a920a9873a3828a24c1b28cf8eb5fe1bff2cb. It appears that the load_xxx functions aren't called, so while the correct values are stored to the settings, they aren't retrieved. Let's revert while this gets fixed. Fixes #1609 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/usersurvey.cpp')
-rw-r--r--desktop-widgets/usersurvey.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/desktop-widgets/usersurvey.cpp b/desktop-widgets/usersurvey.cpp
index fdf3e7f95..326a51f9e 100644
--- a/desktop-widgets/usersurvey.cpp
+++ b/desktop-widgets/usersurvey.cpp
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <QShortcut>
#include <QMessageBox>
+#include <QSettings>
#include "desktop-widgets/usersurvey.h"
#include "ui_usersurvey.h"
@@ -10,7 +11,6 @@
#include "core/qthelper.h"
#include "core/subsurfacesysinfo.h"
-#include "core/settings/qPrefDisplay.h"
UserSurvey::UserSurvey(QWidget *parent) : QDialog(parent),
ui(new Ui::UserSurvey)
@@ -88,7 +88,9 @@ void UserSurvey::on_buttonBox_rejected()
// nothing to do here, we'll just ask again the next time they start
break;
case QDialog::Rejected:
- qPrefDisplay::set_UserSurvey("declined");
+ QSettings s;
+ s.beginGroup("UserSurvey");
+ s.setValue("SurveyDone", "declined");
break;
}
hide();
@@ -114,7 +116,9 @@ void UserSurvey::requestReceived()
if (responseBody == "OK") {
msgText = tr("Survey successfully submitted.");
- qPrefDisplay::set_UserSurvey("submitted");
+ QSettings s;
+ s.beginGroup("UserSurvey");
+ s.setValue("SurveyDone", "submitted");
} else {
msgText = tr("There was an error while trying to check for updates.<br/><br/>%1").arg(responseBody);
msgbox.setIcon(QMessageBox::Warning);