summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index eef7b1bdfe..995cc1fe74 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -71,13 +71,22 @@ void ServerInfo::readBuildInfo(QString file)
71 QString releaseUrl; 71 QString releaseUrl;
72 QString relCandidateVersion; 72 QString relCandidateVersion;
73 QString relCandidateUrl; 73 QString relCandidateUrl;
74 // support two formats for "release" sections:
75 // - <target>=<version>. In this case the URL is constructed.
76 // - <target>=<version>,<url>.
74 info.beginGroup("release"); 77 info.beginGroup("release");
75 if(keys.contains(platforms.at(i))) { 78 if(keys.contains(platforms.at(i))) {
76 releaseVersion = info.value(platforms.at(i)).toString(); 79 QStringList entry = info.value(platforms.at(i)).toStringList();
77 // construct release download URL 80 releaseVersion = entry.at(0);
78 releaseUrl = releaseBaseUrl; 81 if(entry.size() > 1) {
79 releaseUrl.replace("%MODEL%", platforms.at(i)); 82 releaseUrl = entry.at(1);
80 releaseUrl.replace("%RELVERSION%", releaseVersion); 83 }
84 else {
85 // construct release download URL
86 releaseUrl = releaseBaseUrl;
87 releaseUrl.replace("%MODEL%", platforms.at(i));
88 releaseUrl.replace("%RELVERSION%", releaseVersion);
89 }
81 } 90 }
82 info.endGroup(); 91 info.endGroup();
83 // "release-candidate" section currently only support the 2nd format. 92 // "release-candidate" section currently only support the 2nd format.
@@ -91,6 +100,11 @@ void ServerInfo::readBuildInfo(QString file)
91 } 100 }
92 info.endGroup(); 101 info.endGroup();
93 102
103 // "bleeding" section (development) does not provide individual
104 // information but only a global revision value.
105 QString develUrl = develBaseUrl;
106 develUrl.replace("%MODEL%", platforms.at(i));
107 develUrl.replace("%RELVERSION%", developmentRevision);
94 108
95 info.beginGroup("status"); 109 info.beginGroup("status");
96 QString status = tr("Unknown"); 110 QString status = tr("Unknown");
@@ -109,11 +123,6 @@ void ServerInfo::readBuildInfo(QString file)
109 break; 123 break;
110 } 124 }
111 info.endGroup(); 125 info.endGroup();
112 // release and development URLs are not provided by the server but
113 // constructed.
114 QString develUrl = develBaseUrl;
115 develUrl.replace("%MODEL%", platforms.at(i));
116 develUrl.replace("%RELVERSION%", developmentRevision);
117 // set variants (if any) 126 // set variants (if any)
118 for(int j = 0; j < variants.size(); ++j) { 127 for(int j = 0; j < variants.size(); ++j) {
119 setPlatformValue(variants.at(j), ServerInfo::CurStatus, status); 128 setPlatformValue(variants.at(j), ServerInfo::CurStatus, status);