summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 10:53:25 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 10:53:25 -0600
commitda1941ccadffe5ae70ee111c53f0ec2b3d990869 (patch)
treeee683f46b49e6abdbdef78ed45ca65b47538bc23 /src
parent054f5901ab09f6ea6235bd12fbd167922fdf0f67 (diff)
downloadtdevelop-da1941ccadffe5ae70ee111c53f0ec2b3d990869.tar.gz
tdevelop-da1941ccadffe5ae70ee111c53f0ec2b3d990869.zip
Rename KLock and KTrader to avoid conflicts with KDE4
Diffstat (limited to 'src')
-rw-r--r--src/languageselectwidget.cpp6
-rw-r--r--src/partcontroller.cpp4
-rw-r--r--src/plugincontroller.cpp30
-rw-r--r--src/plugincontroller.h2
-rw-r--r--src/pluginselectdialog.cpp8
-rw-r--r--src/profileengine/editor/profileeditor.cpp24
-rw-r--r--src/profileengine/lib/profileengine.cpp26
-rw-r--r--src/profileengine/lib/profileengine.h6
-rw-r--r--src/projectmanager.cpp4
9 files changed, 55 insertions, 55 deletions
diff --git a/src/languageselectwidget.cpp b/src/languageselectwidget.cpp
index 25f2514d..b16c1675 100644
--- a/src/languageselectwidget.cpp
+++ b/src/languageselectwidget.cpp
@@ -105,8 +105,8 @@ LanguageSelectWidget::~LanguageSelectWidget()
void LanguageSelectWidget::readProjectConfig()
{
- KTrader::OfferList languageSupportOffers =
- KTrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
+ TDETrader::OfferList languageSupportOffers =
+ TDETrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
TQString::fromLatin1("[X-TDevelop-Version] == %1"
).arg( TDEVELOP_PLUGIN_VERSION ));
@@ -114,7 +114,7 @@ void LanguageSelectWidget::readProjectConfig()
TQString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage");
_currentLanguage->setText(i18n("Primary language is '%1'. Please select additional languages the project might contain.").arg(language));
- for (KTrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it)
+ for (TDETrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it)
{
TQString la = (*it)->property("X-TDevelop-Language").toString();
if (la == language)
diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp
index d3e3faa5..083aeb2f 100644
--- a/src/partcontroller.cpp
+++ b/src/partcontroller.cpp
@@ -593,14 +593,14 @@ void PartController::showDocument(const KURL &url, bool newWin)
KParts::Factory *PartController::findPartFactory(const TQString &mimeType, const TQString &partType, const TQString &preferredName)
{
- KTrader::OfferList offers = KTrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").arg(partType));
+ TDETrader::OfferList offers = TDETrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").arg(partType));
if (offers.count() > 0)
{
KService::Ptr ptr = 0;
// if there is a preferred plugin we'll take it
if ( !preferredName.isEmpty() ) {
- KTrader::OfferList::Iterator it;
+ TDETrader::OfferList::Iterator it;
for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->desktopEntryName() == preferredName) {
ptr = (*it);
diff --git a/src/plugincontroller.cpp b/src/plugincontroller.cpp
index 22014efe..d490e097 100644
--- a/src/plugincontroller.cpp
+++ b/src/plugincontroller.cpp
@@ -49,8 +49,8 @@ namespace
template <class ComponentType>
ComponentType *loadDefaultPart( const TQString &serviceType )
{
- KTrader::OfferList offers = KTrader::self()->query(serviceType, TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION));
- KTrader::OfferList::ConstIterator serviceIt = offers.begin();
+ TDETrader::OfferList offers = TDETrader::self()->query(serviceType, TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION));
+ TDETrader::OfferList::ConstIterator serviceIt = offers.begin();
for ( ; serviceIt != offers.end(); ++serviceIt ) {
KService::Ptr service = *serviceIt;
@@ -119,27 +119,27 @@ PluginController::~PluginController()
void PluginController::loadCorePlugins()
{
- KTrader::OfferList coreOffers = m_engine.offers(m_profile, ProfileEngine::Core);
+ TDETrader::OfferList coreOffers = m_engine.offers(m_profile, ProfileEngine::Core);
loadPlugins( coreOffers );
}
void PluginController::loadGlobalPlugins( const TQStringList & ignorePlugins )
{
- KTrader::OfferList globalOffers = m_engine.offers(m_profile, ProfileEngine::Global);
+ TDETrader::OfferList globalOffers = m_engine.offers(m_profile, ProfileEngine::Global);
loadPlugins( globalOffers, ignorePlugins );
}
void PluginController::loadProjectPlugins( const TQStringList & ignorePlugins )
{
- KTrader::OfferList projectOffers = m_engine.offers(m_profile, ProfileEngine::Project);
+ TDETrader::OfferList projectOffers = m_engine.offers(m_profile, ProfileEngine::Project);
loadPlugins( projectOffers, ignorePlugins );
}
-void PluginController::loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins )
+void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringList & ignorePlugins )
{
TopLevel::getInstance()->main()->setFocus();
- for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
+ for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
TQString name = (*it)->desktopEntryName();
@@ -173,10 +173,10 @@ void PluginController::unloadProjectPlugins( )
{
// this is nasty, but we need to unload the version control plugin too, and the
// right moment to do this is here
- KTrader::OfferList offers = KTrader::self()->query("TDevelop/VersionControl", "");
+ TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/VersionControl", "");
offers += m_engine.offers(m_profile, ProfileEngine::Project);
- for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
+ for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
TQString name = (*it)->desktopEntryName();
@@ -281,8 +281,8 @@ const TQValueList<KDevPlugin*> PluginController::loadedPlugins()
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)
+ TDETrader::OfferList offers = KDevPluginController::query(serviceType, constraint);
+ for (TDETrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it)
{
KDevPlugin *ext = m_parts[(*it)->desktopEntryName()];
if (ext) return ext;
@@ -292,10 +292,10 @@ KDevPlugin * PluginController::extension( const TQString & serviceType, const TQ
KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint )
{
- KTrader::OfferList offers = KDevPluginController::query( serviceType, constraint );
+ TDETrader::OfferList offers = KDevPluginController::query( serviceType, constraint );
if ( !offers.size() == 1 ) return 0;
- KTrader::OfferList::const_iterator it = offers.constBegin();
+ TDETrader::OfferList::const_iterator it = offers.constBegin();
TQString name = (*it)->desktopEntryName();
KDevPlugin * plugin = 0;
@@ -334,8 +334,8 @@ TQString PluginController::changeProfile(const TQString &newProfile)
{
kdDebug() << "CHANGING PROFILE: from " << currentProfile() << " to " << newProfile << endl;
TQStringList unload;
- KTrader::OfferList coreLoad;
- KTrader::OfferList globalLoad;
+ TDETrader::OfferList coreLoad;
+ TDETrader::OfferList globalLoad;
m_engine.diffProfiles(ProfileEngine::Core, currentProfile(), newProfile, unload, coreLoad);
m_engine.diffProfiles(ProfileEngine::Global, currentProfile(), newProfile, unload, globalLoad);
diff --git a/src/plugincontroller.h b/src/plugincontroller.h
index 18bc8906..d5c3f423 100644
--- a/src/plugincontroller.h
+++ b/src/plugincontroller.h
@@ -78,7 +78,7 @@ protected:
private slots:
// void slotConfigWidget( KDialogBase* );
void loadCorePlugins();
- void loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins = TQStringList() );
+ void loadPlugins( TDETrader::OfferList offers, const TQStringList & ignorePlugins = TQStringList() );
void unloadPlugins();
private:
diff --git a/src/pluginselectdialog.cpp b/src/pluginselectdialog.cpp
index 0414fd8d..9cf33899 100644
--- a/src/pluginselectdialog.cpp
+++ b/src/pluginselectdialog.cpp
@@ -120,18 +120,18 @@ void PluginSelectDialog::init( )
kdDebug(9000) << " *** loadedPluginDesktopNames: " << loadedPluginDesktopNames << endl;
- KTrader::OfferList localOffers;
+ TDETrader::OfferList localOffers;
if ( ProjectManager::getInstance()->projectLoaded() )
{
localOffers = PluginController::getInstance()->engine().offers(
PluginController::getInstance()->currentProfile(), ProfileEngine::Project );
}
- KTrader::OfferList globalOffers = PluginController::getInstance()->engine().offers(
+ TDETrader::OfferList globalOffers = PluginController::getInstance()->engine().offers(
PluginController::getInstance()->currentProfile(), ProfileEngine::Global);
- KTrader::OfferList offers = localOffers + globalOffers;
- for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
+ TDETrader::OfferList offers = localOffers + globalOffers;
+ for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
// parse out any existing url to make it clickable
TQString Comment = (*it)->comment();
diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp
index 78ed451d..7732ea90 100644
--- a/src/profileengine/editor/profileeditor.cpp
+++ b/src/profileengine/editor/profileeditor.cpp
@@ -115,9 +115,9 @@ void ProfileEditor::refresh()
void ProfileEditor::refreshPropertyCombo()
{
- KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"));
+ TDETrader::OfferList list = TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"));
TQStringList props;
- for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
+ for (TDETrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
{
TQStringList currProps = (*it)->property("X-TDevelop-Properties").toStringList();
for (TQStringList::const_iterator p = currProps.constBegin();
@@ -141,14 +141,14 @@ void ProfileEditor::refreshAvailableList()
allProject = new KListViewItem(allList, i18n("Project"));
allProject->setOpen(true);
- KTrader::OfferList olist = engine.allOffers(ProfileEngine::Core);
- for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
+ TDETrader::OfferList olist = engine.allOffers(ProfileEngine::Core);
+ for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
new KListViewItem(allCore, (*it)->desktopEntryName(), (*it)->genericName());
olist = engine.allOffers(ProfileEngine::Global);
- for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
+ for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
new KListViewItem(allGlobal, (*it)->desktopEntryName(), (*it)->genericName());
olist = engine.allOffers(ProfileEngine::Project);
- for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
+ for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName());
}
@@ -205,20 +205,20 @@ void ProfileEditor::fillPluginsList(Profile *profile)
KListViewItem *project = new KListViewItem(pluginsView, i18n("Project Plugins"));
project->setOpen(true);
- KTrader::OfferList coreOffers = engine.offers(profile->name(), ProfileEngine::Core);
- for (KTrader::OfferList::const_iterator it = coreOffers.constBegin();
+ TDETrader::OfferList coreOffers = engine.offers(profile->name(), ProfileEngine::Core);
+ for (TDETrader::OfferList::const_iterator it = coreOffers.constBegin();
it != coreOffers.constEnd(); ++it)
new KListViewItem(core, (*it)->desktopEntryName(), (*it)->genericName(),
(*it)->property("X-TDevelop-Properties").toStringList().join(", "));
- KTrader::OfferList globalOffers = engine.offers(profile->name(), ProfileEngine::Global);
- for (KTrader::OfferList::const_iterator it = globalOffers.constBegin();
+ TDETrader::OfferList globalOffers = engine.offers(profile->name(), ProfileEngine::Global);
+ for (TDETrader::OfferList::const_iterator it = globalOffers.constBegin();
it != globalOffers.constEnd(); ++it)
new KListViewItem(global, (*it)->desktopEntryName(), (*it)->genericName(),
(*it)->property("X-TDevelop-Properties").toStringList().join(", "));
- KTrader::OfferList projectOffers = engine.offers(profile->name(), ProfileEngine::Project);
- for (KTrader::OfferList::const_iterator it = projectOffers.constBegin();
+ TDETrader::OfferList projectOffers = engine.offers(profile->name(), ProfileEngine::Project);
+ for (TDETrader::OfferList::const_iterator it = projectOffers.constBegin();
it != projectOffers.constEnd(); ++it)
new KListViewItem(project, (*it)->desktopEntryName(), (*it)->genericName(),
(*it)->property("X-TDevelop-Properties").toStringList().join(", "));
diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp
index 78df6789..e811740c 100644
--- a/src/profileengine/lib/profileengine.cpp
+++ b/src/profileengine/lib/profileengine.cpp
@@ -69,14 +69,14 @@ void ProfileEngine::processDir(const TQString &dir, const TQString &currPath, TQ
}
}
-KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType offerType)
+TDETrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType offerType)
{
ProfileListing listing;
Profile *profile = 0;
getProfileWithListing(listing, &profile, profileName);
if (!profile)
- return KTrader::OfferList();
+ return TDETrader::OfferList();
TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
switch (offerType) {
@@ -106,12 +106,12 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
<< " " << constraint << endl << endl << endl;*/
//END debug
- KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
+ TDETrader::OfferList list = TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
TQStringList names;
/* Wrong, this is not what we want to do.
Profile::EntryList disableList = profile->list(Profile::ExplicitDisable);
- KTrader::OfferList::iterator it = list.begin();
+ TDETrader::OfferList::iterator it = list.begin();
while (it != list.end())
{
TQString name = (*it)->desktopEntryName();
@@ -131,7 +131,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
continue;
TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
constraint += TQString::fromLatin1("and [Name] == '%1'").arg((*it).name);
- KTrader::OfferList enable = KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
+ TDETrader::OfferList enable = TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
list += enable;
}
@@ -139,7 +139,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
kdDebug() << "=============" << endl
<< " =============" << endl
<< " ============= Plugins for Profile:" << endl;
- for (KTrader::OfferList::const_iterator it = list.begin(); it != list.end(); ++it)
+ for (TDETrader::OfferList::const_iterator it = list.begin(); it != list.end(); ++it)
kdDebug() << " " << (*it)->name() << endl;
kdDebug() << endl << endl;
//END debug*/
@@ -147,7 +147,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
return list;
}
-KTrader::OfferList ProfileEngine::allOffers(OfferType offerType)
+TDETrader::OfferList ProfileEngine::allOffers(OfferType offerType)
{
TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
switch (offerType) {
@@ -161,7 +161,7 @@ KTrader::OfferList ProfileEngine::allOffers(OfferType offerType)
constraint += TQString::fromLatin1(" and [X-TDevelop-Scope] == 'Core'");
break;
}
- return KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
+ return TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
}
void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile,
@@ -208,17 +208,17 @@ KURL::List ProfileEngine::resourcesRecursive(const TQString &profileName, const
}
void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1,
- const TQString &profile2, TQStringList &unload, KTrader::OfferList &load)
+ const TQString &profile2, TQStringList &unload, TDETrader::OfferList &load)
{
- KTrader::OfferList offers1 = offers(profile1, offerType);
- KTrader::OfferList offers2 = offers(profile2, offerType);
+ TDETrader::OfferList offers1 = offers(profile1, offerType);
+ TDETrader::OfferList offers2 = offers(profile2, offerType);
TQStringList offers1List;
- for (KTrader::OfferList::const_iterator it = offers1.constBegin();
+ for (TDETrader::OfferList::const_iterator it = offers1.constBegin();
it != offers1.constEnd(); ++it)
offers1List.append((*it)->desktopEntryName());
TQMap<TQString, KService::Ptr> offers2List;
- for (KTrader::OfferList::const_iterator it = offers2.constBegin();
+ for (TDETrader::OfferList::const_iterator it = offers2.constBegin();
it != offers2.constEnd(); ++it)
offers2List[(*it)->desktopEntryName()] = *it;
diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h
index eb32a8fa..4ea93bdf 100644
--- a/src/profileengine/lib/profileengine.h
+++ b/src/profileengine/lib/profileengine.h
@@ -100,9 +100,9 @@ public:
};
/**@return The list of plugin offers for given profile and type.*/
- KTrader::OfferList offers(const TQString &profileName, OfferType offerType);
+ TDETrader::OfferList offers(const TQString &profileName, OfferType offerType);
/**@return The list of all plugin offers for given type.*/
- KTrader::OfferList allOffers(OfferType offerType);
+ TDETrader::OfferList allOffers(OfferType offerType);
/**@return The list of URLs to the resources (files) with given @p extension.
@param profileName A name of a profile to find resources in.
@@ -135,7 +135,7 @@ public:
@note Resulting lists are not cleared. Pass only clean lists in the
common case.*/
void diffProfiles(OfferType offerType, const TQString &profile1, const TQString &profile2,
- TQStringList &unload, KTrader::OfferList &load);
+ TQStringList &unload, TDETrader::OfferList &load);
/**@return The root profile. Root profile is always named "KDevelop" and it
defines an empty list of plugins. Applications built on KDevelop platform
diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp
index 80b3670f..96e258e9 100644
--- a/src/projectmanager.cpp
+++ b/src/projectmanager.cpp
@@ -535,8 +535,8 @@ bool ProjectManager::loadLanguageSupport(const TQString& lang)
return true;
}
- KTrader::OfferList languageSupportOffers =
- KTrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
+ TDETrader::OfferList languageSupportOffers =
+ TDETrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
TQString::fromLatin1("[X-TDevelop-Language] == '%1' and [X-TDevelop-Version] == %2").arg(lang).arg(TDEVELOP_PLUGIN_VERSION));
if (languageSupportOffers.isEmpty()) {