[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - desktop/source

Caolán McNamara caolanm at redhat.com
Fri Jul 15 12:59:16 UTC 2016


 desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx |   14 ++++++-----
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit aa21d31c6350f996bdff46c9ef5f4376e8fd841c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 8 12:48:17 2016 +0100

    Resolves: tdf#100713 on cancel curData points to deleted parents vector entry
    
    Change-Id: Ic2f313c357ce9526eb045791e2d27451e52a7572
    (cherry picked from commit 17cb84338d6921d012af1e1245f434f90bc25142)
    Reviewed-on: https://gerrit.libreoffice.org/27040
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index dcc0177..f829ea1 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -91,7 +91,7 @@ private:
 
     virtual void execute() override;
     void downloadExtensions();
-    void download(OUString const & aUrls, UpdateData & aUpdatData);
+    bool download(OUString const & aUrls, UpdateData & aUpdatData);
     void installExtensions();
     void removeTempDownloads();
 
@@ -388,8 +388,8 @@ void UpdateInstallDialog::Thread::downloadExtensions()
                 try
                 {
                     OSL_ENSURE(!seqDownloadURLs[j].isEmpty(), "Download URL is empty!");
-                    download(seqDownloadURLs[j], curData);
-                    if (!curData.sLocalURL.isEmpty())
+                    bool bCancelled = download(seqDownloadURLs[j], curData);
+                    if (bCancelled || !curData.sLocalURL.isEmpty())
                         break;
                 }
                 catch ( cssu::Exception & e )
@@ -575,12 +575,12 @@ void UpdateInstallDialog::Thread::removeTempDownloads()
     }
 }
 
-void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, UpdateData & aUpdateData)
+bool UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, UpdateData & aUpdateData)
 {
     {
         SolarMutexGuard g;
         if (m_stop) {
-            return;
+            return m_stop;
         }
     }
 
@@ -614,12 +614,14 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update
         {
             SolarMutexGuard g;
             if (m_stop) {
-                return;
+                return m_stop;
             }
             //all errors should be handled by the command environment.
             aUpdateData.sLocalURL = destFolder + "/" + sTitle;
         }
     }
+
+    return m_stop;
 }
 
 UpdateCommandEnv::UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx,


More information about the Libreoffice-commits mailing list