summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/installwindow.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-17 10:30:19 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-17 10:30:19 +0200
commit94555a0b08534ba6345d8ba65eef808b6e3d1dca (patch)
tree7184edd46f55edf86bbc5dfb39580fc8dcce0696 /rbutil/rbutilqt/installwindow.cpp
parentc2246905a269d1b066b5778610b5705999d9790f (diff)
downloadrockbox-94555a0b08534ba6345d8ba65eef808b6e3d1dca.tar.gz
rockbox-94555a0b08534ba6345d8ba65eef808b6e3d1dca.zip
Move download URL construction to ServerInfo.
Centralize creating the URLs so it's not duplicated in two places. This also allows to change the representation on the server more easily, since it only requires changes in one place. Currently only changes URLs for Rockbox builds. Change-Id: I87277cd61f8b164bdbcd914c9873d674661a786c
Diffstat (limited to 'rbutil/rbutilqt/installwindow.cpp')
-rw-r--r--rbutil/rbutilqt/installwindow.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/installwindow.cpp b/rbutil/rbutilqt/installwindow.cpp
index 7a78154561..1306043027 100644
--- a/rbutil/rbutilqt/installwindow.cpp
+++ b/rbutil/rbutilqt/installwindow.cpp
@@ -118,7 +118,7 @@ void InstallWindow::accept()
118 logger = new ProgressLoggerGui(this); 118 logger = new ProgressLoggerGui(this);
119 logger->show(); 119 logger->show();
120 QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString(); 120 QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString();
121 qDebug() << "[Install] mountpoint:" << RbSettings::value(RbSettings::Mountpoint).toString(); 121 qDebug() << "[Install] mountpoint:" << mountPoint;
122 // show dialog with error if mount point is wrong 122 // show dialog with error if mount point is wrong
123 if(!QFileInfo(mountPoint).isDir()) { 123 if(!QFileInfo(mountPoint).isDir()) {
124 logger->addItem(tr("Mount point is wrong!"),LOGERROR); 124 logger->addItem(tr("Mount point is wrong!"),LOGERROR);
@@ -127,14 +127,13 @@ void InstallWindow::accept()
127 } 127 }
128 128
129 QString myversion; 129 QString myversion;
130 QString buildname = SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
131 if(ui.radioStable->isChecked()) { 130 if(ui.radioStable->isChecked()) {
132 file = SystemInfo::value(SystemInfo::ReleaseUrl).toString(); 131 file = ServerInfo::value(ServerInfo::CurReleaseUrl).toString();
133 RbSettings::setValue(RbSettings::Build, "stable"); 132 RbSettings::setValue(RbSettings::Build, "stable");
134 myversion = ServerInfo::value(ServerInfo::CurReleaseVersion).toString(); 133 myversion = ServerInfo::value(ServerInfo::CurReleaseVersion).toString();
135 } 134 }
136 else if(ui.radioCurrent->isChecked()) { 135 else if(ui.radioCurrent->isChecked()) {
137 file = SystemInfo::value(SystemInfo::BleedingUrl).toString(); 136 file = ServerInfo::value(ServerInfo::CurDevelUrl).toString();
138 RbSettings::setValue(RbSettings::Build, "current"); 137 RbSettings::setValue(RbSettings::Build, "current");
139 myversion = "r" + ServerInfo::value(ServerInfo::BleedingRevision).toString(); 138 myversion = "r" + ServerInfo::value(ServerInfo::BleedingRevision).toString();
140 } 139 }
@@ -142,9 +141,6 @@ void InstallWindow::accept()
142 qDebug() << "[Install] no build selected -- this shouldn't happen"; 141 qDebug() << "[Install] no build selected -- this shouldn't happen";
143 return; 142 return;
144 } 143 }
145 file.replace("%MODEL%", buildname);
146 file.replace("%RELVERSION%", ServerInfo::value(ServerInfo::CurReleaseVersion).toString());
147
148 RbSettings::sync(); 144 RbSettings::sync();
149 145
150 QString warning = Utils::checkEnvironment(false); 146 QString warning = Utils::checkEnvironment(false);