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 <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-16 05:55:24 +02:00
parent c9fc4fa758
commit a9c4638559
3 changed files with 0 additions and 18 deletions

View file

@ -27,7 +27,6 @@
#include <QtGui/QLabel>
#include <QtGui/QLayout>
#include <kpluginloader.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
@ -105,15 +104,6 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo& mod, ErrorReporting rep
i18n("<qt>The diagnosis is:<br />The desktop file %1 does not specify a library.</qt>", 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 )
{

View file

@ -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

View file

@ -196,7 +196,6 @@ void KCModuleProxy::showEvent( QShowEvent * ev )
KCModuleProxy::~KCModuleProxy()
{
deleteClient();
KCModuleLoader::unloadModule(moduleInfo());
delete d_ptr;
}