[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/libkopete
From: Olivier Goffart <ogoffart () tiscalinet ! be>
Date: 2003-08-12 10:23:45
[Download RAW message or body]
CVS commit by ogoffart:
does not allow to load a plugin several times
make the DCop interface more easy to use by allowing to omit the .desktop prefix when \
adding/removing a plugin
M +14 -3 pluginloader.cpp 1.66
--- kdenonbeta/kopete/libkopete/pluginloader.cpp #1.65:1.66
@@ -202,6 +202,7 @@ QValueList<KopeteLibraryInfo> LibraryLoa
}
-KopetePlugin *LibraryLoader::loadPlugin( const QString &spec )
+KopetePlugin *LibraryLoader::loadPlugin( const QString &spec_ )
{
+ QString spec=spec_;
// kdDebug(14010) << k_funcinfo << spec << endl;
@@ -209,5 +210,10 @@ KopetePlugin *LibraryLoader::loadPlugin(
pluginId.remove( QRegExp( QString::fromLatin1( ".desktop$" ) ) );
- KopetePlugin *plugin;
+ if(!spec.endsWith(QString::fromLatin1(".desktop")))
+ spec += QString::fromLatin1(".desktop") ;
+
+ KopetePlugin *plugin = m_loadedPlugins[ spec ];
+ if(plugin)
+ return plugin;
int error=0;
@@ -265,6 +271,11 @@ KopetePlugin *LibraryLoader::loadPlugin(
}
-bool LibraryLoader::remove( const QString &spec )
+bool LibraryLoader::remove( const QString &spec_ )
{
+ QString spec=spec_;
+ if(!spec.endsWith(QString::fromLatin1(".desktop")))
+ spec += QString::fromLatin1(".desktop") ;
+
+
KopetePlugin *plugin = m_loadedPlugins[ spec ];
if( !plugin )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic