From 1b35bd294268a1776c92bc480a1654a53d03485f Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Tue, 2 Jan 2024 19:19:01 +0000 Subject: [PATCH] Revert "Enable removing the plugin dll from the menu" This reverts commit 67fbdceb92a6e707a6c088013d5c893274e7f6df --- PluginManager.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/PluginManager.cpp b/PluginManager.cpp index 2a7ae2543..ed2ea5e45 100644 --- a/PluginManager.cpp +++ b/PluginManager.cpp @@ -107,16 +107,8 @@ void PluginManager::AddPlugin(const filesystem::path& path) \*-----------------------------------------------------------------*/ std::string path_string = path.generic_u8string(); QPluginLoader* loader = new QPluginLoader(QString::fromStdString(path_string)); + QObject* instance = loader->instance(); - /*-----------------------------------------------------------------*\ - | Change the loader Hint flag to able to delete the plugin | - | The default value is QLibrary::PreventUnloadHint | - \*-----------------------------------------------------------------*/ - loader->setLoadHints(QLibrary::ExportExternalSymbolsHint); - - /*-----------------------------------------------------------------*\ - | Check if the plugin was loaded | - \*-----------------------------------------------------------------*/ if(!loader->isLoaded()) { LOG_WARNING("[PluginManager] Plugin %s cannot be loaded: %s", path.c_str(), loader->errorString().toStdString().c_str()); @@ -125,8 +117,6 @@ void PluginManager::AddPlugin(const filesystem::path& path) /*-----------------------------------------------------------------*\ | Check that the plugin is valid, then check the API version | \*-----------------------------------------------------------------*/ - QObject* instance = loader->instance(); - if(instance) { plugin = qobject_cast(instance);