diff options
Diffstat (limited to 'src/plugincontroller.cpp')
-rw-r--r-- | src/plugincontroller.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/plugincontroller.cpp b/src/plugincontroller.cpp index 2dc01654..7b7ffac1 100644 --- a/src/plugincontroller.cpp +++ b/src/plugincontroller.cpp @@ -1,5 +1,5 @@ -#include <qfile.h> -#include <qvbox.h> +#include <tqfile.h> +#include <tqvbox.h> #include <kcmdlineargs.h> #include <kapplication.h> @@ -47,9 +47,9 @@ namespace { template <class ComponentType> - ComponentType *loadDefaultPart( const QString &serviceType ) + ComponentType *loadDefaultPart( const TQString &serviceType ) { - KTrader::OfferList offers = KTrader::self()->query(serviceType, QString("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION)); + KTrader::OfferList offers = KTrader::self()->query(serviceType, TQString("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION)); KTrader::OfferList::ConstIterator serviceIt = offers.begin(); for ( ; serviceIt != offers.end(); ++serviceIt ) { KService::Ptr service = *serviceIt; @@ -79,14 +79,14 @@ PluginController *PluginController::getInstance() PluginController::PluginController() : KDevPluginController() { -/* m_defaultProfile = QString::fromLatin1( "FullIDE" ); +/* m_defaultProfile = TQString::fromLatin1( "FullIDE" ); m_defaultProfilePath = kapp->dirs()->localkdedir() + "/" + KStandardDirs::kde_default( "data" ) + - QString::fromLatin1("/kdevelop/profiles/FullIDE");*/ + TQString::fromLatin1("/kdevelop/profiles/FullIDE");*/ KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); if( args->isSet("profile") ){ - m_profile = QString::fromLocal8Bit( args->getOption("profile") ); + m_profile = TQString::fromLocal8Bit( args->getOption("profile") ); } else { m_profile = ShellExtension::getInstance()->defaultProfile(); } @@ -98,7 +98,7 @@ void PluginController::loadInitialPlugins() { loadCorePlugins(); - QStringList disableList; + TQStringList disableList; Profile * profile = engine().findProfile( currentProfile() ); if( profile ) { @@ -123,25 +123,25 @@ void PluginController::loadCorePlugins() loadPlugins( coreOffers ); } -void PluginController::loadGlobalPlugins( const QStringList & ignorePlugins ) +void PluginController::loadGlobalPlugins( const TQStringList & ignorePlugins ) { KTrader::OfferList globalOffers = m_engine.offers(m_profile, ProfileEngine::Global); loadPlugins( globalOffers, ignorePlugins ); } -void PluginController::loadProjectPlugins( const QStringList & ignorePlugins ) +void PluginController::loadProjectPlugins( const TQStringList & ignorePlugins ) { KTrader::OfferList projectOffers = m_engine.offers(m_profile, ProfileEngine::Project); loadPlugins( projectOffers, ignorePlugins ); } -void PluginController::loadPlugins( KTrader::OfferList offers, const QStringList & ignorePlugins ) +void PluginController::loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins ) { TopLevel::getInstance()->main()->setFocus(); for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); // Check if it is already loaded or shouldn't be if( m_parts[ name ] != 0 || ignorePlugins.contains( name ) ) @@ -160,7 +160,7 @@ void PluginController::loadPlugins( KTrader::OfferList offers, const QStringList void PluginController::unloadPlugins() { - for( QDictIterator<KDevPlugin> it( m_parts ); !it.isEmpty(); ) + for( TQDictIterator<KDevPlugin> it( m_parts ); !it.isEmpty(); ) { KDevPlugin* part = it.current(); removePart( part ); @@ -178,7 +178,7 @@ void PluginController::unloadProjectPlugins( ) offers += m_engine.offers(m_profile, ProfileEngine::Project); for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); if ( KDevPlugin * plugin = m_parts[ name ] ) { @@ -189,9 +189,9 @@ void PluginController::unloadProjectPlugins( ) } } -void PluginController::unloadPlugins( QStringList const & unloadParts ) +void PluginController::unloadPlugins( TQStringList const & unloadParts ) { - QStringList::ConstIterator it = unloadParts.begin(); + TQStringList::ConstIterator it = unloadParts.begin(); while ( it != unloadParts.end() ) { KDevPlugin* part = m_parts[ *it ]; @@ -226,15 +226,15 @@ KDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) return pl; } -QStringList PluginController::argumentsFromService( const KService::Ptr &service ) +TQStringList PluginController::argumentsFromService( const KService::Ptr &service ) { - QStringList args; + TQStringList args; if ( !service ) // service is a reference to a pointer, so a check whether it is 0 is still required return args; - QVariant prop = service->property( "X-KDevelop-Args" ); + TQVariant prop = service->property( "X-KDevelop-Args" ); if ( prop.isValid() ) - args = QStringList::split( " ", prop.toString() ); + args = TQStringList::split( " ", prop.toString() ); return args; } @@ -244,11 +244,11 @@ void PluginController::integratePart(KXMLGUIClient *part) Core::setupShourtcutTips(part); TopLevel::getInstance()->main()->guiFactory()->addClient(part); - connect( part->actionCollection(), SIGNAL( actionStatusText( const QString & ) ), - TopLevel::getInstance()->main()->actionCollection(), SIGNAL( actionStatusText( const QString & ) ) ); + connect( part->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ), + TopLevel::getInstance()->main()->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ) ); } -void PluginController::integrateAndRememberPart(const QString &name, KDevPlugin *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 QString &name, KDevPlugin *part) +void PluginController::removeAndForgetPart(const TQString &name, KDevPlugin *part) { kdDebug() << "removing: " << name << endl; m_parts.remove(name); removePart(part); } -const QValueList<KDevPlugin*> PluginController::loadedPlugins() +const TQValueList<KDevPlugin*> PluginController::loadedPlugins() { - QValueList<KDevPlugin*> plugins; - QDictIterator<KDevPlugin> itt(m_parts); + TQValueList<KDevPlugin*> plugins; + TQDictIterator<KDevPlugin> itt(m_parts); while( itt.current() ) { plugins.append( itt.current() ); @@ -279,7 +279,7 @@ const QValueList<KDevPlugin*> PluginController::loadedPlugins() return plugins; } -KDevPlugin * PluginController::extension( const QString & serviceType, const QString & constraint ) +KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) { KTrader::OfferList offers = KDevPluginController::query(serviceType, constraint); for (KTrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it) @@ -290,13 +290,13 @@ KDevPlugin * PluginController::extension( const QString & serviceType, const QSt return 0; } -KDevPlugin * PluginController::loadPlugin( const QString & serviceType, const QString & constraint ) +KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) { KTrader::OfferList offers = KDevPluginController::query( serviceType, constraint ); if ( !offers.size() == 1 ) return 0; KTrader::OfferList::const_iterator it = offers.constBegin(); - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); KDevPlugin * plugin = 0; if ( plugin = m_parts[ name ] ) @@ -313,33 +313,33 @@ KDevPlugin * PluginController::loadPlugin( const QString & serviceType, const QS return plugin; } -void PluginController::unloadPlugin( const QString & plugin ) +void PluginController::unloadPlugin( const TQString & plugin ) { - QStringList pluginList; + TQStringList pluginList; pluginList << plugin; unloadPlugins( pluginList ); } -KURL::List PluginController::profileResources(const QString &nameFilter) +KURL::List PluginController::profileResources(const TQString &nameFilter) { return m_engine.resources(currentProfile(), nameFilter); } -KURL::List PluginController::profileResourcesRecursive(const QString &nameFilter) +KURL::List PluginController::profileResourcesRecursive(const TQString &nameFilter) { return m_engine.resourcesRecursive(currentProfile(), nameFilter); } -QString PluginController::changeProfile(const QString &newProfile) +TQString PluginController::changeProfile(const TQString &newProfile) { kdDebug() << "CHANGING PROFILE: from " << currentProfile() << " to " << newProfile << endl; - QStringList unload; + TQStringList unload; KTrader::OfferList coreLoad; KTrader::OfferList globalLoad; m_engine.diffProfiles(ProfileEngine::Core, currentProfile(), newProfile, unload, coreLoad); m_engine.diffProfiles(ProfileEngine::Global, currentProfile(), newProfile, unload, globalLoad); - QString oldProfile = m_profile; + TQString oldProfile = m_profile; m_profile = newProfile; unloadPlugins(unload); @@ -354,9 +354,9 @@ void PluginController::selectPlugins( ) kdDebug(9000) << k_funcinfo << endl; PluginSelectDialog dlg; - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { - QStringList unselectedPlugins = dlg.unselectedPluginNames(); + TQStringList unselectedPlugins = dlg.unselectedPluginNames(); kdDebug(9000) << unselectedPlugins << endl; |