summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-08 21:11:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-08 21:11:07 -0700
commitbdee5ea9a6b523a088a89567bb6cd9f4fa2b0935 (patch)
tree5c5c7aa81eaeb291492fd22c7acbbcd977e5e26e
parent1668952ed3be302dfada48602cb2bc34e76cd9a9 (diff)
downloadsubsurface-bdee5ea9a6b523a088a89567bb6cd9f4fa2b0935.tar.gz
Fix webservice download dialog
We need to close the dialog after applying what was downloaded, and we should not try to delete the manager in case of cancel (as that reliably causes the SIGSEGV. Suggested-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/subsurfacewebservices.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 2f82d6d26..cd944ca17 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -59,10 +59,14 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton* button)
QSettings s;
s.setValue("webservice_uid", ui->userID->text());
s.sync();
+ hide();
+ close();
}
break;
case QDialogButtonBox::RejectRole:
- manager->deleteLater();
+ // we may want to clean up after ourselves, but this
+ // makes Subsurface throw a SIGSEGV...
+ // manager->deleteLater();
reply->deleteLater();
ui->progressBar->setMaximum(1);
break;
@@ -90,7 +94,7 @@ void SubsurfaceWebServices::startDownload()
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
connect(reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
- connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
+ connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
this, SLOT(downloadError(QNetworkReply::NetworkError)));
}