on xenial help sign in
wizardEnabled should also be set true if isUpdate is true
commitd21d2ed57f42358940c9bbbf3dda18a14e7dcf82 authorMarius Gripsgard <marius@ubports.com> dateTue 7 Aug 2018, 20:27 (8 years ago) parent21fa1e8
2 files changed+10−3
plugins/Wizard/System.cpp+9−3 plugins/Wizard/System.h+1
plugins/Wizard/System.cpp+9−3
@@ -48,7 +48,7 @@ QString System::wizardEnabledPath()
4848
4949QString System::currentFrameworkPath()
5050{
51− return QDir::home().filePath(QStringLiteral("/usr/share/click/framework/current"));
51+ return QDir::home().filePath(QStringLiteral("/usr/share/click/frameworks/current"));
5252}
5353
5454/*
@@ -59,9 +59,15 @@ if wizard-has-run does exists but does NOT match current framework == is update
5959if wizard-has-run does exists but does match current framework == show no wizard
6060*/
6161
62+bool System::wizardPathExists() {
63+ return QFile::exists(wizardEnabledPath());
64+}
65+
6266bool System::wizardEnabled() const
6367{
64− return !QFile::exists(wizardEnabledPath());
68+ if (!wizardPathExists())
69+ return true;
70+ return isUpdate();
6571}
6672
6773QString System::readCurrentFramework()
@@ -87,7 +93,7 @@ QString System::version() const
8793
8894bool System::isUpdate() const
8995{
90− if (!wizardEnabled())
96+ if (!wizardPathExists())
9197 return false;
9298
9399 return readCurrentFramework() != readWizardEnabled();
plugins/Wizard/System.h+1
@@ -66,6 +66,7 @@ private:
6666 static void setSessionVariable(const QString &variable, const QString &value);
6767 static QString readCurrentFramework();
6868 static QString readWizardEnabled();
69+ static bool wizardPathExists();
6970
7071 QFileSystemWatcher m_fsWatcher;
7172};