on xenial help sign in
Fix small typos
cbb272fDalton Durst
plugins/Wizard/System.cpp+13−10
@@ -56,9 +56,9 @@ QString System::currentFrameworkPath()
56/*
56/*
57wizardEnabled and isUpdate logic
57wizardEnabled and isUpdate logic
58
58
59−if wizard-has-run does NOT exists == is new install
59+if wizard-has-run does NOT exist == is new install
60−if wizard-has-run does exists but does NOT match current framework == is update
60+if wizard-has-run exists but does NOT match current framework == is update
61−if wizard-has-run does exists but does match current framework == show no wizard
61+if wizard-has-run exists but does match current framework == show no wizard
62*/
62*/
63
63
64bool System::wizardPathExists() {
64bool System::wizardPathExists() {
@@ -67,9 +67,10 @@ bool System::wizardPathExists() {
67
67
68bool System::wizardEnabled() const
68bool System::wizardEnabled() const
69{
69{
70− if (!wizardPathExists())
70+ if (!wizardPathExists()) {
71− return true;
71+ return true;
72+ }
72− return isUpdate();
73+ return isUpdate();
73}
74}
74
75
75QString System::readCurrentFramework()
76QString System::readCurrentFramework()
@@ -95,8 +96,9 @@ QString System::version() const
95
96
96bool System::isUpdate() const
97bool System::isUpdate() const
97{
98{
98− if (!wizardPathExists())
99+ if (!wizardPathExists()) {
99− return false;
100+ return false;
101+ }
100
102
101 return readCurrentFramework() != readWizardEnabled();
103 return readCurrentFramework() != readWizardEnabled();
102}
104}
@@ -110,8 +112,9 @@ void System::setWizardEnabled(bool enabled)
110 QFile::remove(wizardEnabledPath());
112 QFile::remove(wizardEnabledPath());
111 } else {
113 } else {
112 QDir(wizardEnabledPath()).mkpath(QStringLiteral(".."));
114 QDir(wizardEnabledPath()).mkpath(QStringLiteral(".."));
113− if (QFile::exists(wizardEnabledPath()))
115+ if (QFile::exists(wizardEnabledPath())) {
114− QFile::remove(wizardEnabledPath());
116+ QFile::remove(wizardEnabledPath());
117+ }
115 QFile::copy(currentFrameworkPath(), wizardEnabledPath());
118 QFile::copy(currentFrameworkPath(), wizardEnabledPath());
116 m_fsWatcher.addPath(wizardEnabledPath());
119 m_fsWatcher.addPath(wizardEnabledPath());
117 Q_EMIT wizardEnabledChanged();
120 Q_EMIT wizardEnabledChanged();
qml/Wizard/Pages.qml−2
@@ -124,8 +124,6 @@ StyledItem {
124 if (visible) {
124 if (visible) {
125 opacity = 0;
125 opacity = 0;
126 fadeInAnimation.start();
126 fadeInAnimation.start();
127− } else {
128− // impatientLoadingLabel.text = ""
129 }
127 }
130 }
128 }
131 }
129 }