Vfs plugins: Available plugins must load

A plugin that can't be loaded due to dependency issues should not be
considered as available.
This commit is contained in:
Christian Kamm 2018-12-18 10:31:17 +01:00 committed by Kevin Ottens
parent fd410a5a84
commit bdfda460e6
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -107,6 +107,13 @@ bool OCC::isVfsPluginAvailable(Vfs::Mode mode)
return false;
}
// Attempting to load the plugin is essential as it could have dependencies that
// can't be resolved and thus not be available after all.
if (!loader.load()) {
qCWarning(lcPlugin) << "Plugin failed to load:" << loader.errorString();
return false;
}
return true;
}