From 6acfe65fdf78d79e6353e5c931c6d5427846e59b Mon Sep 17 00:00:00 2001 From: Abs62 Date: Thu, 28 Feb 2013 19:36:53 +0400 Subject: [PATCH] Fix multiple dialogs to save sound --- articleview.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/articleview.cc b/articleview.cc index 28d67877..4e9769fb 100644 --- a/articleview.cc +++ b/articleview.cc @@ -1009,7 +1009,7 @@ void ArticleView::saveResource( const QUrl & url, QUrl const & ref ) { resourceToSaveDownloadRequests.push_back( req ); connect( req.get(), SIGNAL( finished() ), - this, SLOT( resourceToSaveDownloadFinished() ) ); + this, SLOT( resourceToSaveDownloadFinished() ), Qt::QueuedConnection ); } } } @@ -1045,7 +1045,7 @@ void ArticleView::saveResource( const QUrl & url, QUrl const & ref ) resourceToSaveDownloadRequests.push_back( req ); connect( req.get(), SIGNAL( finished() ), - this, SLOT( resourceToSaveDownloadFinished() ) ); + this, SLOT( resourceToSaveDownloadFinished() ), Qt::QueuedConnection ); } } @@ -1094,6 +1094,9 @@ void ArticleView::resourceToSaveDownloadFinished() if( !resourceData.isEmpty() ) { + // Resource found, clear all requests + resourceToSaveDownloadRequests.clear(); + QString fileName; QString savePath; if( cfg.resourceSavePath.isEmpty() ) @@ -1155,10 +1158,6 @@ void ArticleView::resourceToSaveDownloadFinished() } } - // Ok, whatever it was, it's finished. Remove this and any other - // requests and finish. - - resourceToSaveDownloadRequests.clear(); return; }