summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/mainwindow.cpp19
-rw-r--r--desktop-widgets/mainwindow.h2
2 files changed, 10 insertions, 11 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 157513981..d6329738a 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -1440,11 +1440,9 @@ void MainWindow::readSettings()
enableDisableCloudActions();
#if !defined(SUBSURFACE_MOBILE)
- QSettings s; //TODO: this 's' exists only for the loadRecentFiles, remove it.
-
loadRecentFiles();
if (firstRun) {
- checkSurvey(&s);
+ checkSurvey();
firstRun = false;
}
#endif
@@ -1452,22 +1450,23 @@ void MainWindow::readSettings()
#undef TOOLBOX_PREF_BUTTON
-void MainWindow::checkSurvey(QSettings *s)
+void MainWindow::checkSurvey()
{
- s->beginGroup("UserSurvey");
- if (!s->contains("FirstUse42")) {
+ QSettings s;
+ s.beginGroup("UserSurvey");
+ if (!s.contains("FirstUse42")) {
QVariant value = QDate().currentDate();
- s->setValue("FirstUse42", value);
+ s.setValue("FirstUse42", value);
}
// wait a week for production versions, but not at all for non-tagged builds
int waitTime = 7;
- QDate firstUse42 = s->value("FirstUse42").toDate();
- if (run_survey || (firstUse42.daysTo(QDate().currentDate()) > waitTime && !s->contains("SurveyDone"))) {
+ QDate firstUse42 = s.value("FirstUse42").toDate();
+ if (run_survey || (firstUse42.daysTo(QDate().currentDate()) > waitTime && !s.contains("SurveyDone"))) {
if (!survey)
survey = new UserSurvey(this);
survey->show();
}
- s->endGroup();
+ s.endGroup();
}
void MainWindow::writeSettings()
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h
index f378d549f..237efd993 100644
--- a/desktop-widgets/mainwindow.h
+++ b/desktop-widgets/mainwindow.h
@@ -83,7 +83,7 @@ public:
ProfileWidget2 *graphics() const;
PlannerDetails *plannerDetails() const;
void printPlan();
- void checkSurvey(QSettings *s);
+ void checkSurvey();
void setApplicationState(const QByteArray& state);
void setStateProperties(const QByteArray& state, const PropertyList& tl, const PropertyList& tr, const PropertyList& bl,const PropertyList& br);
bool inPlanner();