diff options
Diffstat (limited to 'src/plugincontroller.cpp')
-rw-r--r-- | src/plugincontroller.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/plugincontroller.cpp b/src/plugincontroller.cpp index 7b6410b7..30aa9171 100644 --- a/src/plugincontroller.cpp +++ b/src/plugincontroller.cpp @@ -19,14 +19,14 @@ #include <kstatusbar.h> #include <kiconloader.h> -#include <tdevapi.h> -#include <tdevplugin.h> -#include <tdevmakefrontend.h> -#include <tdevappfrontend.h> -#include <tdevdifffrontend.h> -#include <tdevsourceformatter.h> -#include <tdevcreatefile.h> -#include <tdevplugininfo.h> +#include <kdevapi.h> +#include <kdevplugin.h> +#include <kdevmakefrontend.h> +#include <kdevappfrontend.h> +#include <kdevdifffrontend.h> +#include <kdevsourceformatter.h> +#include <kdevcreatefile.h> +#include <kdevplugininfo.h> #include <tdeaction.h> #include <profileengine.h> @@ -77,7 +77,7 @@ PluginController *PluginController::getInstance() PluginController::PluginController() - : TDevPluginController() + : KDevPluginController() { /* m_defaultProfile = TQString::fromLatin1( "FullIDE" ); m_defaultProfilePath = kapp->dirs()->localtdedir() + "/" + @@ -149,7 +149,7 @@ void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringL emit loadingPlugin(i18n("Loading: %1").arg((*it)->genericName())); - TDevPlugin *plugin = loadPlugin( *it ); + KDevPlugin *plugin = loadPlugin( *it ); if ( plugin ) { m_parts.insert( name, plugin ); @@ -160,9 +160,9 @@ void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringL void PluginController::unloadPlugins() { - for( TQDictIterator<TDevPlugin> it( m_parts ); !it.isEmpty(); ) + for( TQDictIterator<KDevPlugin> it( m_parts ); !it.isEmpty(); ) { - TDevPlugin* part = it.current(); + KDevPlugin* part = it.current(); removePart( part ); m_parts.remove( it.currentKey() ); delete part; @@ -180,7 +180,7 @@ void PluginController::unloadProjectPlugins( ) { TQString name = (*it)->desktopEntryName(); - if ( TDevPlugin * plugin = m_parts[ name ] ) + if ( KDevPlugin * plugin = m_parts[ name ] ) { kdDebug(9000) << " *** Removing: " << name << endl; removeAndForgetPart( name, plugin ); @@ -194,7 +194,7 @@ void PluginController::unloadPlugins( TQStringList const & unloadParts ) TQStringList::ConstIterator it = unloadParts.begin(); while ( it != unloadParts.end() ) { - TDevPlugin* part = m_parts[ *it ]; + KDevPlugin* part = m_parts[ *it ]; if( part ) { kdDebug(9000) << " *** Removing: " << *it << endl; @@ -206,11 +206,11 @@ void PluginController::unloadPlugins( TQStringList const & unloadParts ) } } -TDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) +KDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) { int err = 0; - TDevPlugin * pl = KParts::ComponentFactory - ::createInstanceFromService<TDevPlugin>( service, API::getInstance(), 0, + KDevPlugin * pl = KParts::ComponentFactory + ::createInstanceFromService<KDevPlugin>( service, API::getInstance(), 0, argumentsFromService( service ), &err ); if (!pl) { @@ -248,7 +248,7 @@ void PluginController::integratePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ) ); } -void PluginController::integrateAndRememberPart(const TQString &name, TDevPlugin *part) +void PluginController::integrateAndRememberPart(const TQString &name, KDevPlugin *part) { m_parts.insert(name, part); integratePart(part); @@ -260,17 +260,17 @@ void PluginController::removePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->guiFactory()->removeClient(part); } -void PluginController::removeAndForgetPart(const TQString &name, TDevPlugin *part) +void PluginController::removeAndForgetPart(const TQString &name, KDevPlugin *part) { kdDebug() << "removing: " << name << endl; m_parts.remove(name); removePart(part); } -const TQValueList<TDevPlugin*> PluginController::loadedPlugins() +const TQValueList<KDevPlugin*> PluginController::loadedPlugins() { - TQValueList<TDevPlugin*> plugins; - TQDictIterator<TDevPlugin> itt(m_parts); + TQValueList<KDevPlugin*> plugins; + TQDictIterator<KDevPlugin> itt(m_parts); while( itt.current() ) { plugins.append( itt.current() ); @@ -279,26 +279,26 @@ const TQValueList<TDevPlugin*> PluginController::loadedPlugins() return plugins; } -TDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) +KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) { - TDETrader::OfferList offers = TDevPluginController::query(serviceType, constraint); + TDETrader::OfferList offers = KDevPluginController::query(serviceType, constraint); for (TDETrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it) { - TDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; + KDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; if (ext) return ext; } return 0; } -TDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) +KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) { - TDETrader::OfferList offers = TDevPluginController::query( serviceType, constraint ); + TDETrader::OfferList offers = KDevPluginController::query( serviceType, constraint ); if ( !offers.size() == 1 ) return 0; TDETrader::OfferList::const_iterator it = offers.constBegin(); TQString name = (*it)->desktopEntryName(); - TDevPlugin * plugin = 0; + KDevPlugin * plugin = 0; if ( plugin = m_parts[ name ] ) { return plugin; @@ -372,12 +372,12 @@ void PluginController::selectPlugins( ) } /* -TDevPlugin * PluginController::getPlugin( const KService::Ptr & service ) +KDevPlugin * PluginController::getPlugin( const KService::Ptr & service ) { - TDevPlugin * plugin = m_parts[ (*it)->name() ]; + KDevPlugin * plugin = m_parts[ (*it)->name() ]; if ( !plugin ) { - TDevPlugin * plugin = loadPlugin( *it ); + KDevPlugin * plugin = loadPlugin( *it ); if ( plugin ) { integratePart( plugin ); |