diff options
Diffstat (limited to 'rbutil/rbutilqt/base/serverinfo.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/serverinfo.cpp | 23 |
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 { | |||
32 | } ServerInfoList[] = { | 32 | } ServerInfoList[] = { |
33 | { ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" }, | 33 | { ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" }, |
34 | { ServerInfo::CurStatus, ":platform:/status", "Unknown" }, | 34 | { ServerInfo::CurStatus, ":platform:/status", "Unknown" }, |
35 | { ServerInfo::DailyDate, "dailydate", "" }, | ||
36 | { ServerInfo::BleedingRevision, "bleedingrev", "" }, | 35 | { ServerInfo::BleedingRevision, "bleedingrev", "" }, |
37 | { ServerInfo::BleedingDate, "bleedingdate", "" }, | 36 | { ServerInfo::BleedingDate, "bleedingdate", "" }, |
38 | }; | 37 | }; |
39 | 38 | ||
40 | QMap<QString, QVariant> ServerInfo::serverInfos; | 39 | QMap<QString, QVariant> ServerInfo::serverInfos; |
41 | 40 | ||
42 | void ServerInfo::readBuildInfo(QString file) | 41 | void ServerInfo::readBuildInfo(QString file) |
43 | { | 42 | { |
44 | QSettings info(file, QSettings::IniFormat); | 43 | QSettings info(file, QSettings::IniFormat); |
45 | 44 | ||
46 | QDate date = QDate::fromString(info.value("dailies/date").toString(), "yyyyMMdd"); | 45 | setValue(ServerInfo::BleedingRevision,info.value("bleeding/rev")); |
47 | setValue(ServerInfo::DailyDate,date.toString(Qt::ISODate)); | 46 | QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ"); |
48 | 47 | setValue(ServerInfo::BleedingDate,date.toString(Qt::ISODate)); | |
48 | |||
49 | info.beginGroup("release"); | 49 | info.beginGroup("release"); |
50 | QStringList keys = info.allKeys(); | 50 | QStringList keys = info.allKeys(); |
51 | info.endGroup(); | 51 | info.endGroup(); |
@@ -87,19 +87,10 @@ void ServerInfo::readBuildInfo(QString file) | |||
87 | setPlatformValue(variants.at(j), ServerInfo::CurStatus, status); | 87 | setPlatformValue(variants.at(j), ServerInfo::CurStatus, status); |
88 | setPlatformValue(variants.at(j), ServerInfo::CurReleaseVersion, release); | 88 | setPlatformValue(variants.at(j), ServerInfo::CurReleaseVersion, release); |
89 | } | 89 | } |
90 | |||
91 | } | 90 | } |
92 | } | 91 | } |
93 | 92 | ||
94 | void ServerInfo::readBleedingInfo(QString file) | 93 | |
95 | { | ||
96 | QSettings info(file, QSettings::IniFormat); | ||
97 | |||
98 | setValue(ServerInfo::BleedingRevision,info.value("bleeding/rev")); | ||
99 | QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ"); | ||
100 | setValue(ServerInfo::BleedingDate,date.toString(Qt::ISODate)); | ||
101 | } | ||
102 | |||
103 | QVariant ServerInfo::value(enum ServerInfos info) | 94 | QVariant ServerInfo::value(enum ServerInfos info) |
104 | { | 95 | { |
105 | // locate info item | 96 | // locate info item |