Print Native Plugin Load Error (#1824)

This commit is contained in:
Florian Märkl 2019-10-09 12:17:24 +02:00 committed by GitHub
parent f743b5ed55
commit 1d68115c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,10 @@ void PluginManager::loadNativePlugins(const QDir &directory)
QPluginLoader pluginLoader(directory.absoluteFilePath(fileName)); QPluginLoader pluginLoader(directory.absoluteFilePath(fileName));
QObject *plugin = pluginLoader.instance(); QObject *plugin = pluginLoader.instance();
if (!plugin) { if (!plugin) {
auto errorString = pluginLoader.errorString();
if (!errorString.isEmpty()) {
qWarning() << "Load Error for plugin" << fileName << ":" << errorString;
}
continue; continue;
} }
CutterPlugin *cutterPlugin = qobject_cast<CutterPlugin *>(plugin); CutterPlugin *cutterPlugin = qobject_cast<CutterPlugin *>(plugin);