summaryrefslogtreecommitdiffstats
path: root/src/profileengine/lib/profileengine.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /src/profileengine/lib/profileengine.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/profileengine/lib/profileengine.cpp')
-rw-r--r--src/profileengine/lib/profileengine.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp
index af8f2afe..7a6d65d8 100644
--- a/src/profileengine/lib/profileengine.cpp
+++ b/src/profileengine/lib/profileengine.cpp
@@ -57,7 +57,7 @@ void ProfileEngine::processDir(const TQString &dir, const TQString &currPath, TQ
{
TQString dirName = *eit;
Profile *profile = 0;
- if (passedPaths.contains(currPath + dirName))
+ if (passedPaths.tqcontains(currPath + dirName))
profile = passedPaths[currPath + dirName];
else
{
@@ -78,24 +78,24 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
if (!profile)
return KTrader::OfferList();
- TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION);
+ TQString constraint = TQString::tqfromLatin1("[X-KDevelop-Version] == %1").tqarg(KDEVELOP_PLUGIN_VERSION);
switch (offerType) {
case Global:
- constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'");
+ constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Global'");
break;
case Project:
- constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'");
+ constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Project'");
break;
case Core:
- constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'");
+ constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Core'");
break;
}
TQString constraint_add = "";
Profile::EntryList properties = profile->list(Profile::Properties);
int i = 0;
for (Profile::EntryList::const_iterator it = properties.begin(); it != properties.end(); ++it)
- constraint_add += TQString::fromLatin1(" %1 '%2' in [X-KDevelop-Properties]").
- arg((i++)==0?"":"or").arg((*it).name);
+ constraint_add += TQString::tqfromLatin1(" %1 '%2' in [X-KDevelop-Properties]").
+ tqarg((i++)==0?"":"or").tqarg((*it).name);
if (!constraint_add.isEmpty())
constraint += " and ( " + constraint_add + " ) ";
@@ -106,7 +106,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
<< " " << constraint << endl << endl << endl;*/
//END debug
- KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint);
+ KTrader::OfferList list = KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin"), constraint);
TQStringList names;
/* Wrong, this is not what we want to do.
@@ -127,11 +127,11 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
Profile::EntryList enableList = profile->list(Profile::ExplicitEnable);
for (Profile::EntryList::const_iterator it = enableList.begin(); it != enableList.end(); ++it)
{
- if (names.contains((*it).name))
+ if (names.tqcontains((*it).name))
continue;
- TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION);
- constraint += TQString::fromLatin1("and [Name] == '%1'").arg((*it).name);
- KTrader::OfferList enable = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint);
+ TQString constraint = TQString::tqfromLatin1("[X-KDevelop-Version] == %1").tqarg(KDEVELOP_PLUGIN_VERSION);
+ constraint += TQString::tqfromLatin1("and [Name] == '%1'").tqarg((*it).name);
+ KTrader::OfferList enable = KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin"), constraint);
list += enable;
}
@@ -149,19 +149,19 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
KTrader::OfferList ProfileEngine::allOffers(OfferType offerType)
{
- TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION);
+ TQString constraint = TQString::tqfromLatin1("[X-KDevelop-Version] == %1").tqarg(KDEVELOP_PLUGIN_VERSION);
switch (offerType) {
case Global:
- constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'");
+ constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Global'");
break;
case Project:
- constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'");
+ constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Project'");
break;
case Core:
- constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'");
+ constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Core'");
break;
}
- return KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint);
+ return KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin"), constraint);
}
void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile,
@@ -229,7 +229,7 @@ void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1,
it != offers1List.constEnd(); ++it)
{
// kdDebug() << "checking: " << *it << endl;
- if (offers2List.contains(*it))
+ if (offers2List.tqcontains(*it))
{
// kdDebug() << " keep" << endl;
offers2.remove(offers2List[*it]);