mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert "desktop-widgets: remove QSettings from desktop-widgets"
This reverts commit 321a920a98
.
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>
This commit is contained in:
parent
4bb72160a6
commit
2d87a657d2
6 changed files with 55 additions and 28 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue