@@ -35,7 +35,7 @@ System::System()
35 m_fsWatcher.addPath(wizardEnabledPath());
35 m_fsWatcher.addPath(wizardEnabledPath());
37 connect(&m_fsWatcher, SIGNAL(fileChanged(const QString &)),
37 connect(&m_fsWatcher, SIGNAL(fileChanged(const QString &)),
38− this, SIGNAL(wizardEnabledChanged()));
38+ this, SLOT(watcherFileChanged()));
41QString System::wizardEnabledPath()
41QString System::wizardEnabledPath()
@@ -60,10 +60,16 @@ void System::setWizardEnabled(bool enabled)
60 QDir(wizardEnabledPath()).mkpath("..");
60 QDir(wizardEnabledPath()).mkpath("..");
61 QFile(wizardEnabledPath()).open(QIODevice::WriteOnly);
61 QFile(wizardEnabledPath()).open(QIODevice::WriteOnly);
62 m_fsWatcher.addPath(wizardEnabledPath());
62 m_fsWatcher.addPath(wizardEnabledPath());
63− wizardEnabledChanged();
63+ Q_EMIT wizardEnabledChanged();
67+void System::watcherFileChanged()
69+ Q_EMIT wizardEnabledChanged();
70+ m_fsWatcher.removePath(wizardEnabledPath());
67void System::setSessionVariable(const QString &variable, const QString &value)
73void System::setSessionVariable(const QString &variable, const QString &value)
69 // We need to update both upstart's and DBus's environment
75 // We need to update both upstart's and DBus's environment