summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index d496ef6..3b0d1e9 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -133,6 +133,17 @@ int main(int argc, char *argv[])
} else {
qWarning() << version.errorString();
}
+
+ QFile aglversion("/etc/os-release");
+ if (aglversion.open(QFile::ReadOnly)) {
+ QStringList data = QString::fromLocal8Bit(aglversion.readAll()).split(QLatin1Char('\n'));
+ QStringList data2 = data.at(2).split(QLatin1Char('"'));
+ engine.rootContext()->setContextProperty("ucb", data2.at(1));
+ aglversion.close();
+ } else {
+ qWarning() << aglversion.errorString();
+ }
+
DBus dbus;
engine.rootContext()->setContextProperty("dbus", &dbus);
engine.load(QUrl(QStringLiteral("qrc:/Settings.qml")));