Version information is hardcoded. This commit support
AGL UCB version automatically from /etc/os-release
Bug-AGL: SPEC-656
Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
(cherry picked from commit
5d2bb8dd6c20c74d66b320f407dd6221592ee25a)
Change-Id: I3e2ba2abe5312945c567b9f501a2dd4f1f3453ce
} 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")));
font.pixelSize: 48
}
Label {
- text: '5.0.0rc2 (Electric Eel)'
+ text: ucb
font.pixelSize: 48
Layout.fillWidth: true
}