diff options
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 9c72f13d05..279b73b5be 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -227,7 +227,7 @@ void RbUtilQt::downloadInfo() | |||
227 | ui.statusbar->showMessage(tr("Downloading build information, please wait ...")); | 227 | ui.statusbar->showMessage(tr("Downloading build information, please wait ...")); |
228 | qDebug() << "[RbUtil] downloading build info"; | 228 | qDebug() << "[RbUtil] downloading build info"; |
229 | daily->setFile(&buildInfo); | 229 | daily->setFile(&buildInfo); |
230 | daily->getFile(QUrl(SystemInfo::value(SystemInfo::ServerConfUrl).toString())); | 230 | daily->getFile(QUrl(SystemInfo::value(SystemInfo::BuildInfoUrl).toString())); |
231 | } | 231 | } |
232 | 232 | ||
233 | 233 | ||
@@ -249,42 +249,13 @@ void RbUtilQt::downloadDone(bool error) | |||
249 | ServerInfo::readBuildInfo(buildInfo.fileName()); | 249 | ServerInfo::readBuildInfo(buildInfo.fileName()); |
250 | buildInfo.close(); | 250 | buildInfo.close(); |
251 | 251 | ||
252 | // start bleeding info download | 252 | ui.statusbar->showMessage(tr("Download build information finished."), 5000); |
253 | bleeding = new HttpGet(this); | 253 | updateSettings(); |
254 | connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool))); | 254 | m_gotInfo = true; |
255 | connect(qApp, SIGNAL(lastWindowClosed()), bleeding, SLOT(abort())); | ||
256 | if(RbSettings::value(RbSettings::CacheOffline).toBool()) | ||
257 | bleeding->setCache(true); | ||
258 | bleeding->setFile(&bleedingInfo); | ||
259 | bleeding->getFile(QUrl(SystemInfo::value(SystemInfo::BleedingInfo).toString())); | ||
260 | ui.statusbar->showMessage(tr("Downloading build information, please wait ...")); | ||
261 | |||
262 | } | ||
263 | |||
264 | |||
265 | void RbUtilQt::downloadBleedingDone(bool error) | ||
266 | { | ||
267 | if(error) { | ||
268 | qDebug() << "[RbUtil] network error:" << bleeding->error(); | ||
269 | ui.statusbar->showMessage(tr("Can't get version information!")); | ||
270 | QMessageBox::critical(this, tr("Network error"), | ||
271 | tr("Can't get version information.\n" | ||
272 | "Network error: %1. Please check your network and proxy settings.") | ||
273 | .arg(bleeding->errorString())); | ||
274 | return; | ||
275 | } | ||
276 | else { | ||
277 | bleedingInfo.open(); | ||
278 | ServerInfo::readBleedingInfo(bleedingInfo.fileName()); | ||
279 | bleedingInfo.close(); | ||
280 | 255 | ||
281 | ui.statusbar->showMessage(tr("Download build information finished."), 5000); | 256 | //start check for updates |
282 | updateSettings(); | 257 | checkUpdate(); |
283 | m_gotInfo = true; | ||
284 | 258 | ||
285 | //start check for updates | ||
286 | checkUpdate(); | ||
287 | } | ||
288 | } | 259 | } |
289 | 260 | ||
290 | 261 | ||