diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt
index 87737ee..9396176 100644
--- a/sources/CMakeLists.txt
+++ b/sources/CMakeLists.txt
@@ -7,8 +7,8 @@ cmake_policy (SET CMP0015 NEW)
project (netctl-gui)
set (PROJECT_VERSION_MAJOR 1)
-set (PROJECT_VERSION_MINOR 0)
-set (PROJECT_VERSION_PATCH 4)
+set (PROJECT_VERSION_MINOR 1)
+set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
diff --git a/sources/dataengine/dataengine.cppcheck b/sources/dataengine/dataengine.cppcheck
new file mode 100644
index 0000000..075652f
--- /dev/null
+++ b/sources/dataengine/dataengine.cppcheck
@@ -0,0 +1,6 @@
+
+
+
+ qt
+
+
diff --git a/sources/dataengine/netctl.cpp b/sources/dataengine/netctl.cpp
index 0a80030..40bd71e 100644
--- a/sources/dataengine/netctl.cpp
+++ b/sources/dataengine/netctl.cpp
@@ -23,6 +23,7 @@
#include
#include
#include
+#include
Netctl::Netctl(QObject *parent, const QVariantList &args)
@@ -114,122 +115,136 @@ bool Netctl::sourceRequestEvent(const QString &name)
}
-bool Netctl::updateSourceEvent(const QString &source)
+QString Netctl::getCurrentProfile(const QString cmd)
{
QProcess command;
- QString cmdOutput = QString("");
- QString value = QString("");
-
- if (source == QString("currentProfile")) {
- command.start(configuration[QString("CMD")] + QString(" list"));
- command.waitForFinished(-1);
- cmdOutput = command.readAllStandardOutput();
- if (!cmdOutput.isEmpty()) {
- QStringList profileList = cmdOutput.split(QString("\n"), QString::SkipEmptyParts);
- for (int i=0; itoUnicode(command.readAllStandardOutput());
+ QStringList profileList = cmdOutput.split(QChar('\n'), QString::SkipEmptyParts);
+ for (int i=0; itoUnicode(command.readAllStandardOutput());
+ extIp = cmdOutput.trimmed();
+ return extIp;
+}
+
+
+QStringList Netctl::getInterfaceList(const QString dir)
+{
+ QStringList interfaceList;
+ if (QDir(dir).exists())
+ interfaceList = QDir(dir).entryList(QDir::Dirs | QDir::NoDotAndDotDot);
+ return interfaceList;
+}
+
+
+QString Netctl::getIntIp(const QString cmd, const QString dir)
+{
+ QProcess command;
+ QString intIp = QString("127.0.0.1/8");
+ QStringList interfaceList = getInterfaceList(dir);
+ for (int i=0; itoUnicode(command.readAllStandardOutput());
+ QStringList deviceInfo = cmdOutput.split(QChar('\n'), QString::SkipEmptyParts);
+ for (int j=0; jtoUnicode(command.readAllStandardOutput());
+ QStringList profileList = cmdOutput.split(QChar('\n'), QString::SkipEmptyParts);
+ for (int i=0; itoUnicode(command.readAllStandardOutput());
+ QStringList profileStatus = cmdOutput.split(QChar('\n'), QString::SkipEmptyParts);
+ for (int i=0; i