summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp28
-rw-r--r--rbutil/rbutilqt/rbutilqt.h1
2 files changed, 10 insertions, 19 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 739b7f42d0..575b381e3b 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -188,7 +188,6 @@ void RbUtilQt::downloadInfo()
188 // try to get the current build information 188 // try to get the current build information
189 daily = new HttpGet(this); 189 daily = new HttpGet(this);
190 connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); 190 connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
191 connect(daily, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
192 connect(qApp, SIGNAL(lastWindowClosed()), daily, SLOT(abort())); 191 connect(qApp, SIGNAL(lastWindowClosed()), daily, SLOT(abort()));
193 if(RbSettings::value(RbSettings::CacheOffline).toBool()) 192 if(RbSettings::value(RbSettings::CacheOffline).toBool())
194 daily->setCache(true); 193 daily->setCache(true);
@@ -207,7 +206,9 @@ void RbUtilQt::downloadDone(bool error)
207 qDebug() << "[RbUtil] network error:" << daily->error(); 206 qDebug() << "[RbUtil] network error:" << daily->error();
208 ui.statusbar->showMessage(tr("Can't get version information!")); 207 ui.statusbar->showMessage(tr("Can't get version information!"));
209 QMessageBox::critical(this, tr("Network error"), 208 QMessageBox::critical(this, tr("Network error"),
210 tr("Can't get version information.")); 209 tr("Can't get version information.\n"
210 "Network error: %1. Please check your network and proxy settings.")
211 .arg(daily->errorString()));
211 return; 212 return;
212 } 213 }
213 qDebug() << "[RbUtil] network status:" << daily->error(); 214 qDebug() << "[RbUtil] network status:" << daily->error();
@@ -217,10 +218,9 @@ void RbUtilQt::downloadDone(bool error)
217 ServerInfo::readBuildInfo(buildInfo.fileName()); 218 ServerInfo::readBuildInfo(buildInfo.fileName());
218 buildInfo.close(); 219 buildInfo.close();
219 220
220 //start bleeding info download 221 // start bleeding info download
221 bleeding = new HttpGet(this); 222 bleeding = new HttpGet(this);
222 connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool))); 223 connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool)));
223 connect(bleeding, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
224 connect(qApp, SIGNAL(lastWindowClosed()), bleeding, SLOT(abort())); 224 connect(qApp, SIGNAL(lastWindowClosed()), bleeding, SLOT(abort()));
225 if(RbSettings::value(RbSettings::CacheOffline).toBool()) 225 if(RbSettings::value(RbSettings::CacheOffline).toBool())
226 bleeding->setCache(true); 226 bleeding->setCache(true);
@@ -235,6 +235,12 @@ void RbUtilQt::downloadBleedingDone(bool error)
235{ 235{
236 if(error) { 236 if(error) {
237 qDebug() << "[RbUtil] network error:" << bleeding->error(); 237 qDebug() << "[RbUtil] network error:" << bleeding->error();
238 ui.statusbar->showMessage(tr("Can't get version information!"));
239 QMessageBox::critical(this, tr("Network error"),
240 tr("Can't get version information.\n"
241 "Network error: %1. Please check your network and proxy settings.")
242 .arg(bleeding->errorString()));
243 return;
238 } 244 }
239 else { 245 else {
240 bleedingInfo.open(); 246 bleedingInfo.open();
@@ -251,19 +257,6 @@ void RbUtilQt::downloadBleedingDone(bool error)
251} 257}
252 258
253 259
254void RbUtilQt::downloadDone(int id, bool error)
255{
256 QString errorString;
257 errorString = tr("Network error: %1. Please check your network and proxy settings.")
258 .arg(daily->errorString());
259 if(error) {
260 QMessageBox::about(this, "Network Error", errorString);
261 m_networkerror = daily->errorString();
262 }
263 qDebug() << "[RbUtil] downloadDone:" << id << "error:" << error;
264}
265
266
267void RbUtilQt::about() 260void RbUtilQt::about()
268{ 261{
269 QDialog *window = new QDialog(this); 262 QDialog *window = new QDialog(this);
@@ -1249,7 +1242,6 @@ void RbUtilQt::checkUpdate(void)
1249 1242
1250 update = new HttpGet(this); 1243 update = new HttpGet(this);
1251 connect(update, SIGNAL(done(bool)), this, SLOT(downloadUpdateDone(bool))); 1244 connect(update, SIGNAL(done(bool)), this, SLOT(downloadUpdateDone(bool)));
1252 connect(update, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
1253 connect(qApp, SIGNAL(lastWindowClosed()), update, SLOT(abort())); 1245 connect(qApp, SIGNAL(lastWindowClosed()), update, SLOT(abort()));
1254 if(RbSettings::value(RbSettings::CacheOffline).toBool()) 1246 if(RbSettings::value(RbSettings::CacheOffline).toBool())
1255 update->setCache(true); 1247 update->setCache(true);
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index afe8c5fd48..76747bca07 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -99,7 +99,6 @@ class RbUtilQt : public QMainWindow
99 void createTalkFiles(void); 99 void createTalkFiles(void);
100 void createVoiceFile(void); 100 void createVoiceFile(void);
101 void downloadDone(bool); 101 void downloadDone(bool);
102 void downloadDone(int, bool);
103 void downloadBleedingDone(bool); 102 void downloadBleedingDone(bool);
104 void downloadInfo(void); 103 void downloadInfo(void);
105 104