Warn if dlopen() failed

This commit is contained in:
Alexey Sokolov 2023-07-16 15:44:36 +01:00
parent 9d962ded6a
commit 125b1ab134

View file

@ -109,6 +109,11 @@ void PluginManager::AddPlugin(const filesystem::path& path)
QPluginLoader* loader = new QPluginLoader(QString::fromStdString(path_string)); QPluginLoader* loader = new QPluginLoader(QString::fromStdString(path_string));
QObject* instance = loader->instance(); QObject* instance = loader->instance();
if(!loader->isLoaded())
{
LOG_WARNING("[PluginManager] Plugin %s cannot be loaded: %s", path.c_str(), loader->errorString().toStdString().c_str());
}
/*-----------------------------------------------------------------*\ /*-----------------------------------------------------------------*\
| Check that the plugin is valid, then check the API version | | Check that the plugin is valid, then check the API version |
\*-----------------------------------------------------------------*/ \*-----------------------------------------------------------------*/