changeset 1562:830972646ccd

Handle security errors, format slightly differently for message box
author Chris Cannam
date Fri, 02 Nov 2018 14:40:44 +0000
parents 73b3dd65e0b3
children 175ef02c7864
files plugin/PluginScan.cpp
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/PluginScan.cpp	Thu Oct 18 13:14:56 2018 +0100
+++ b/plugin/PluginScan.cpp	Fri Nov 02 14:40:44 2018 +0000
@@ -190,7 +190,7 @@
     
     os << "<ul>";
     for (auto f: failures) {
-        os << "<li>" + f.library;
+        os << "<li><code>" + f.library + "</code>";
 
         SVDEBUG << "PluginScan::formatFailureReport: tag is \"" << tag
                 << "\", failure code is " << int(f.code) << ", message is \""
@@ -225,6 +225,11 @@
                 ("Library cannot be loaded: %1").arg(userMessage);
             break;
 
+        case PluginCheckCode::FAIL_FORBIDDEN:
+            userMessage = QObject::tr
+                ("Permission to load library was refused");
+            break;
+
         case PluginCheckCode::FAIL_DESCRIPTOR_MISSING:
             userMessage = QObject::tr
                 ("Not a valid plugin library (no descriptor found)");
@@ -298,8 +303,7 @@
         return report;
     }
 
-    return QObject::tr("<b>Failed to load plugins</b>"
-                       "<p>Failed to load one or more plugin libraries:</p>")
+    return QObject::tr("<p>Failed to load one or more plugin libraries:</p>")
         + report
         + QObject::tr("<p>These plugins may be incompatible with the system, "
                       "and will be ignored during this run of %1.</p>")