summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/serverinfo.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-03 00:50:01 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-03 00:50:01 +0200
commitf4b0e316c3da6b4f1693d645cd62bdb57fe2b6c2 (patch)
tree86282c2f8bce481e4c5bf396a9c5357678930788 /rbutil/rbutilqt/base/serverinfo.cpp
parentb73c9616830df6337c0c426ca0e4e1a6cd54cdf6 (diff)
downloadrockbox-f4b0e316c3da6b4f1693d645cd62bdb57fe2b6c2.tar.gz
rockbox-f4b0e316c3da6b4f1693d645cd62bdb57fe2b6c2.tar.bz2
rockbox-f4b0e316c3da6b4f1693d645cd62bdb57fe2b6c2.zip
Update for single build-info file.
The server now provides a single build-info file (instead of two separate ones for development builds and stable releases). Update to use the new file, since it simplifies things. Change-Id: If3b949f4d78eecb54e47622da887f51005f6d155
Diffstat (limited to 'rbutil/rbutilqt/base/serverinfo.cpp')
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index e288bbfe34..b60245c3d5 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -32,20 +32,20 @@ const static struct {
} ServerInfoList[] = {
{ ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" },
{ ServerInfo::CurStatus, ":platform:/status", "Unknown" },
- { ServerInfo::DailyDate, "dailydate", "" },
{ ServerInfo::BleedingRevision, "bleedingrev", "" },
{ ServerInfo::BleedingDate, "bleedingdate", "" },
-};
+};
QMap<QString, QVariant> ServerInfo::serverInfos;
void ServerInfo::readBuildInfo(QString file)
{
QSettings info(file, QSettings::IniFormat);
-
- QDate date = QDate::fromString(info.value("dailies/date").toString(), "yyyyMMdd");
- setValue(ServerInfo::DailyDate,date.toString(Qt::ISODate));
-
+
+ setValue(ServerInfo::BleedingRevision,info.value("bleeding/rev"));
+ QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ");
+ setValue(ServerInfo::BleedingDate,date.toString(Qt::ISODate));
+
info.beginGroup("release");
QStringList keys = info.allKeys();
info.endGroup();
@@ -87,19 +87,10 @@ void ServerInfo::readBuildInfo(QString file)
setPlatformValue(variants.at(j), ServerInfo::CurStatus, status);
setPlatformValue(variants.at(j), ServerInfo::CurReleaseVersion, release);
}
-
}
}
-void ServerInfo::readBleedingInfo(QString file)
-{
- QSettings info(file, QSettings::IniFormat);
-
- setValue(ServerInfo::BleedingRevision,info.value("bleeding/rev"));
- QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ");
- setValue(ServerInfo::BleedingDate,date.toString(Qt::ISODate));
-}
-
+
QVariant ServerInfo::value(enum ServerInfos info)
{
// locate info item