aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/browser.cpp8
-rw-r--r--src/main.cpp8
2 files changed, 14 insertions, 2 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 61cd2c6..86d8f13 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -130,7 +130,13 @@ QPluginLoader *Browser::addPlugin(const QString &path)
if(path.isEmpty())
return nullptr;
- auto *loader = new PluginLoader(path, PluginLoader::SignatureMatchIfAvailable, this);
+ Configuration conf;
+ const PluginLoader::SignatureState state(
+ conf.value<bool>("plugins.signature.ignored").value(),
+ conf.value<bool>("plugins.signature.checked").value(),
+ conf.value<bool>("plugins.signature.enforced").value());
+
+ auto *loader = new PluginLoader(path, state, this);
const bool loaded = loader->load();
spdlog::info("Loading plugin [{}]: {}", qUtf8Printable(path), loaded ? "passed" : "failed");
diff --git a/src/main.cpp b/src/main.cpp
index 98e8ef9..3394a84 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -105,8 +105,14 @@ int main(int argc, char **argv)
[&]() {
Configuration conf;
spdlog::debug("plugins.path={}", conf.value<std::string>("plugins.path").value());
+
+ const PluginLoader::SignatureState state(
+ conf.value<bool>("plugins.signature.ignored").value(),
+ conf.value<bool>("plugins.signature.checked").value(),
+ conf.value<bool>("plugins.signature.enforced").value());
+
for(const QString &path : Util::files(conf.value<QString>("plugins.path").value(), { "*.so", "*.dll" })) {
- auto *loader = new PluginLoader(path);
+ auto *loader = new PluginLoader(path, state);
const bool loaded = loader->load();
spdlog::info("{} plugin {}", loaded ? "Loaded" : "Failed to load", qUtf8Printable(path));