From bdee5ea9a6b523a088a89567bb6cd9f4fa2b0935 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 8 Jun 2013 21:11:07 -0700 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qt-ui/subsurfacewebservices.cpp') 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))); } -- cgit v1.2.3-70-g09d2