progressDialog = 0;
connect(&http, SIGNAL(finished()), this, SLOT(processFinished()));
+ connect(&http, SIGNAL(error(QString)),
+ this, SLOT(downloadingError(QString)));
}
void XdxfDictDownloader::download(QWidget *parent) {
}
+void XdxfDictDownloader::downloadingError(QString error) {
+ breakDownloading();
+ Q_EMIT notify(Notify::Error, error);
+}
+
void XdxfDictDownloader::breakDownloading() {
//if user cancel downloading we kill all running processes, hide progress dialog and set flag that user cancel downloading.
aborted = true;
}
void XdxfDictDownloader::dictListReceived(QNetworkReply *reply) {
-
- if(aborted) return;
progressDialog->accept();
+ if(aborted) return;
+
if(reply->error() != QNetworkReply::NoError) {
Q_EMIT notify(Notify::Error, reply->errorString());