aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-14 14:45:42 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-14 14:45:42 -0700
commit8bd535d092430b6df721a91404849755dff042ba (patch)
treed7357b17d0c87a305e0951efd0f34a502318ccd1 /qt-ui
parent181d4e2fa66a0ce31c600821e55c9b7f0e597b8b (diff)
downloadsubsurface-8bd535d092430b6df721a91404849755dff042ba.tar.gz
User survey: force running the survey from command line
This way people can test the dialog much easier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index da1a1cd54..488b5f69f 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -827,16 +827,15 @@ void MainWindow::checkSurvey(QSettings *s)
if (!s->contains("FirstUse42")) {
QVariant value = QDate().currentDate();
s->setValue("FirstUse42", value);
- } else {
- // wait a week for production versions, but not at all for non-tagged builds
- QString ver(VERSION_STRING);
- int waitTime = ver.contains('-') ? -1 : 7;
- QDate firstUse42 = s->value("FirstUse42").toDate();
- if (firstUse42.daysTo(QDate().currentDate()) > waitTime && !s->contains("SurveyDone")) {
- if (!survey)
- survey = new UserSurvey(this);
- survey->show();
- }
+ }
+ // wait a week for production versions, but not at all for non-tagged builds
+ QString ver(VERSION_STRING);
+ int waitTime = ver.contains('-') ? -1 : 7;
+ 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();
}