on xenial help sign in
Make versionToShow a notifyable property
720eb14Dalton Durst
plugins/Wizard/System.cpp+2
@@ -84,11 +84,13 @@ void System::setWizardEnabled(bool enabled)
84 }
84 }
85
85
86 Q_EMIT wizardEnabledChanged();
86 Q_EMIT wizardEnabledChanged();
87+ Q_EMIT versionToShowChanged();
87}
88}
88
89
89void System::watcherFileChanged()
90void System::watcherFileChanged()
90{
91{
91 Q_EMIT wizardEnabledChanged();
92 Q_EMIT wizardEnabledChanged();
93+ Q_EMIT versionToShowChanged();
92 m_fsWatcher.removePath(wizardEnabledPath());
94 m_fsWatcher.removePath(wizardEnabledPath());
93}
95}
94
96
plugins/Wizard/System.h+2−1
@@ -26,7 +26,7 @@ class System : public QObject
26{
26{
27 Q_OBJECT
27 Q_OBJECT
28 Q_PROPERTY(bool wizardEnabled READ wizardEnabled WRITE setWizardEnabled NOTIFY wizardEnabledChanged)
28 Q_PROPERTY(bool wizardEnabled READ wizardEnabled WRITE setWizardEnabled NOTIFY wizardEnabledChanged)
29− Q_PROPERTY(int versionToShow READ versionToShow)
29+ Q_PROPERTY(int versionToShow READ versionToShow NOTIFY versionToShowChanged)
30
30
31public:
31public:
32 System();
32 System();
@@ -65,6 +65,7 @@ public Q_SLOTS:
65
65
66Q_SIGNALS:
66Q_SIGNALS:
67 void wizardEnabledChanged();
67 void wizardEnabledChanged();
68+ void versionToShowChanged();
68
69
69private Q_SLOTS:
70private Q_SLOTS:
70 void watcherFileChanged();
71 void watcherFileChanged();