mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[Plugins] Print error message when failed to load plugin.
Prints QPluginLoader's error message to the stderr.
This commit is contained in:
parent
83b7f6d1c0
commit
672c388407
|
@ -24,6 +24,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <QPluginLoader>
|
#include <QPluginLoader>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
Plugins::Plugins(QObject* parent)
|
Plugins::Plugins(QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
|
@ -132,6 +133,7 @@ void Plugins::loadPlugins()
|
||||||
QPluginLoader* loader = new QPluginLoader(fullPath);
|
QPluginLoader* loader = new QPluginLoader(fullPath);
|
||||||
PluginInterface* iPlugin = qobject_cast<PluginInterface*>(loader->instance());
|
PluginInterface* iPlugin = qobject_cast<PluginInterface*>(loader->instance());
|
||||||
if (!iPlugin) {
|
if (!iPlugin) {
|
||||||
|
qWarning() << "Plugins::loadPlugins" << loader->errorString();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +191,7 @@ void Plugins::loadAvailablePlugins()
|
||||||
PluginInterface* iPlugin = qobject_cast<PluginInterface*>(loader->instance());
|
PluginInterface* iPlugin = qobject_cast<PluginInterface*>(loader->instance());
|
||||||
|
|
||||||
if (!iPlugin) {
|
if (!iPlugin) {
|
||||||
|
qWarning() << "Plugins::loadAvailablePlugins" << loader->errorString();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user