From a9c4638559ca1dc4649e1b8e8cb0ac65488c5b71 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 16 Nov 2022 05:55:24 +0200 Subject: [PATCH] kutils: remove now bogus KCModuleLoader::unloadModule() method QLibrary was rewritten and no longer uses internal reference count for unloading thus constructing KPluginLoader object and unloading the library does not have the effect it used to have, the KCModule pointer is deleted by KCModuleProxy::deleteClient() regardless and QLibrary takes care of the rest Signed-off-by: Ivailo Monev --- kutils/kcmoduleloader.cpp | 10 ---------- kutils/kcmoduleloader.h | 7 ------- kutils/kcmoduleproxy.cpp | 1 - 3 files changed, 18 deletions(-) diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp index 68b59a59..82ef646a 100644 --- a/kutils/kcmoduleloader.cpp +++ b/kutils/kcmoduleloader.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -105,15 +104,6 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo& mod, ErrorReporting rep i18n("The diagnosis is:
The desktop file %1 does not specify a library.
", mod.fileName()), parent ); } - -void KCModuleLoader::unloadModule(const KCModuleInfo &mod) -{ - // get the library loader instance - KPluginLoader loader(mod.library()); - loader.unload(); -} - - KCModule* KCModuleLoader::reportError( ErrorReporting report, const QString & text, const QString &details, QWidget * parent ) { diff --git a/kutils/kcmoduleloader.h b/kutils/kcmoduleloader.h index 65c813a2..1b492496 100644 --- a/kutils/kcmoduleloader.h +++ b/kutils/kcmoduleloader.h @@ -86,12 +86,6 @@ namespace KCModuleLoader KCMUTILS_EXPORT KCModule *loadModule( const QString &module, ErrorReporting report, QWidget *parent = 0, const QStringList& args = QStringList() ); - /** - * Unloads the module's library - * @param mod What module to unload for - */ - KCMUTILS_EXPORT void unloadModule(const KCModuleInfo &mod); - /** * Returns a KCModule containing the messages @p report and @p text. * @@ -103,7 +97,6 @@ namespace KCModuleLoader */ KCMUTILS_EXPORT KCModule* reportError( ErrorReporting report, const QString & text, const QString &details, QWidget * parent ); - } // vim: ts=2 sw=2 et diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp index 12258f35..94f1677a 100644 --- a/kutils/kcmoduleproxy.cpp +++ b/kutils/kcmoduleproxy.cpp @@ -196,7 +196,6 @@ void KCModuleProxy::showEvent( QShowEvent * ev ) KCModuleProxy::~KCModuleProxy() { deleteClient(); - KCModuleLoader::unloadModule(moduleInfo()); delete d_ptr; }