on xenial help sign in
wizardEnabled should also be set true if isUpdate is true
d21d2edMarius Gripsgard
plugins/Wizard/System.cpp+9−3
@@ -48,7 +48,7 @@ QString System::wizardEnabledPath()
48
48
49QString System::currentFrameworkPath()
49QString System::currentFrameworkPath()
50{
50{
51− return QDir::home().filePath(QStringLiteral("/usr/share/click/framework/current"));
51+ return QDir::home().filePath(QStringLiteral("/usr/share/click/frameworks/current"));
52}
52}
53
53
54/*
54/*
@@ -59,9 +59,15 @@ if wizard-has-run does exists but does NOT match current framework == is update
59if wizard-has-run does exists but does match current framework == show no wizard
59if wizard-has-run does exists but does match current framework == show no wizard
60*/
60*/
61
61
62+bool System::wizardPathExists() {
63+ return QFile::exists(wizardEnabledPath());
64+}
65+
62bool System::wizardEnabled() const
66bool System::wizardEnabled() const
63{
67{
64− return !QFile::exists(wizardEnabledPath());
68+ if (!wizardPathExists())
69+ return true;
70+ return isUpdate();
65}
71}
66
72
67QString System::readCurrentFramework()
73QString System::readCurrentFramework()
@@ -87,7 +93,7 @@ QString System::version() const
87
93
88bool System::isUpdate() const
94bool System::isUpdate() const
89{
95{
90− if (!wizardEnabled())
96+ if (!wizardPathExists())
91 return false;
97 return false;
92
98
93 return readCurrentFramework() != readWizardEnabled();
99 return readCurrentFramework() != readWizardEnabled();
plugins/Wizard/System.h+1
@@ -66,6 +66,7 @@ private:
66 static void setSessionVariable(const QString &variable, const QString &value);
66 static void setSessionVariable(const QString &variable, const QString &value);
67 static QString readCurrentFramework();
67 static QString readCurrentFramework();
68 static QString readWizardEnabled();
68 static QString readWizardEnabled();
69+ static bool wizardPathExists();
69
70
70 QFileSystemWatcher m_fsWatcher;
71 QFileSystemWatcher m_fsWatcher;
71};
72};