changeset 83:66a22cdbb50c

Don't show completed dialog when installation was cancelled!
author Chris Cannam
date Wed, 19 Feb 2020 17:32:20 +0000
parents 11661e61fed0
children e77bcf5caedd
files installer.cpp
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/installer.cpp	Wed Feb 19 17:18:33 2020 +0000
+++ b/installer.cpp	Wed Feb 19 17:32:20 2020 +0000
@@ -910,10 +910,12 @@
     vector<LibraryInfo> toInstall =
         getUserApprovedPluginLibraries(info, target);
 
-    if (!toInstall.empty()) {
-        if (!QDir(target).exists()) {
-            QDir().mkpath(target);
-        }
+    if (toInstall.empty()) { // Cancelled, or nothing selected
+        return 0;
+    }
+    
+    if (!QDir(target).exists()) {
+        QDir().mkpath(target);
     }
 
     QProgressDialog progress(QObject::tr("Installing..."),
@@ -966,5 +968,5 @@
              QMessageBox::Ok);
     }
     
-    return 0;
+    return (complete ? 0 : 2);
 }