Persistent settings + autostart + security tab
Change-Id: Iec35f732268caa99ff541e6d5d6478049ec41d50
diff --git a/linux/network-manager.cpp b/linux/network-manager.cpp
index 22e63d2..9950c8c 100644
--- a/linux/network-manager.cpp
+++ b/linux/network-manager.cpp
@@ -16,6 +16,10 @@
return;
}
+ autoconfigProcess = new QProcess();
+ connect(autoconfigProcess,SIGNAL(finished(int)),this,SLOT(autoconfigFinished()));
+ connect(autoconfigProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(autoconfigFinished()));
+
QDBusConnection::systemBus().connect("org.freedesktop.NetworkManager",
"/org/freedesktop/NetworkManager",
"org.freedesktop.NetworkManager",
@@ -32,6 +36,21 @@
void NetworkManager::autoconfigDaemon()
{
- QProcess *process = new QProcess();
- process->start(NDND_AUTOCONFIG_COMMAND);
+ if(IsAutoconfigRunning())
+ return;
+
+ qDebug() << "started running";
+ isAutoconfigRunning = true;
+ autoconfigProcess->start(NDND_AUTOCONFIG_COMMAND);
+}
+
+void NetworkManager::autoconfigFinished()
+{
+ qDebug() << "stoped running";
+ isAutoconfigRunning = false;
+}
+
+bool NetworkManager::IsAutoconfigRunning()
+{
+ return isAutoconfigRunning;
}