From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: 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 --- buildtools/autotools/misc.cpp | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'buildtools/autotools/misc.cpp') diff --git a/buildtools/autotools/misc.cpp b/buildtools/autotools/misc.cpp index e44a32c3..9dfffefb 100644 --- a/buildtools/autotools/misc.cpp +++ b/buildtools/autotools/misc.cpp @@ -24,7 +24,7 @@ #include "kdevcompileroptions.h" -static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) +static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *tqparent ) { KService::Ptr service = KService::serviceByDesktopName( name ); if ( !service ) @@ -47,7 +47,7 @@ static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec if (prop.isValid()) args = TQStringList::split(" ", prop.toString()); - TQObject *obj = factory->create(parent, service->name().latin1(), + TQObject *obj = factory->create(tqparent, service->name().latin1(), "KDevCompilerOptions", args); if (!obj->inherits("KDevCompilerOptions")) { @@ -65,22 +65,22 @@ static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec args = TQStringList::split( " ", prop.toString() ); return KParts::ComponentFactory - ::createInstanceFromService( service, parent, + ::createInstanceFromService( service, tqparent, service->name().latin1(), args );*/ } -TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *parent ) +TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *tqparent ) { - KDevCompilerOptions * plugin = createCompilerOptions( compiler, parent ); + KDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(tqparent) ); if ( plugin ) { - TQString newflags = plugin->exec( parent, flags ); + TQString newflags = plugin->exec( tqparent, flags ); delete plugin; return newflags; } - return TQString::null; + return TQString(); } @@ -128,7 +128,7 @@ void AutoProjectTool::parseMakefileam(const TQString &fileName, TQMap* ourRhs = interest.find(lhs); + TQMap* ourRhs = interest.tqfind(lhs); if (!ourRhs) { @@ -478,7 +478,7 @@ void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap::iterator findEntry = ourRhs->find(bits[index]); + TQMap::iterator findEntry = ourRhs->tqfind(bits[index]); if (findEntry == ourRhs->end()) { // we haven't seen it, so add it, so we don't add it again later.. @@ -490,7 +490,7 @@ void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap::iterator findEntry = ourRhs->find(*posIter); + TQMap::iterator findEntry = ourRhs->tqfind(*posIter); if (findEntry == ourRhs->end()) { // we do not want to remove it.. @@ -598,7 +598,7 @@ void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap* ourRhs = interest.find(lastLhs); + TQMap* ourRhs = interest.tqfind(lastLhs); if (add) { @@ -607,7 +607,7 @@ void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap::iterator findEntry = ourRhs->find(lastRhs[index]); + TQMap::iterator findEntry = ourRhs->tqfind(lastRhs[index]); if (findEntry == ourRhs->end()) { // we haven't seen it, so add it, so we don't add it again later.. @@ -619,7 +619,7 @@ void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap::iterator findEntry = ourRhs->find(*posIter); + TQMap::iterator findEntry = ourRhs->tqfind(*posIter); if (findEntry == ourRhs->end()) { // we do not want to remove it.. @@ -724,7 +724,7 @@ void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap* ourRhs = it.current(); TQString newLine(lhs); - if (seenLhs.find(lhs) == seenLhs.end()) + if (seenLhs.tqfind(lhs) == seenLhs.end()) { newLine += " = "; seenLhs[lastLhs] = ""; @@ -814,7 +814,7 @@ TQStringList AutoProjectTool::configureinLoadMakefiles(TQString configureinpath) { if (close.search(line) >= 0) { - line = line.replace(close.search(line), 1, ""); + line = line.tqreplace(close.search(line), 1, ""); list += TQStringList::split(" ", line); break; } @@ -829,11 +829,11 @@ TQStringList AutoProjectTool::configureinLoadMakefiles(TQString configureinpath) } else if (ac_regex.search(line) >= 0) { - line = line.replace(ac_regex.search(line), ac_match.length() - 1, ""); + line = line.tqreplace(ac_regex.search(line), ac_match.length() - 1, ""); if (open.search(line) >= 0) { - line = line.replace(open.search(line), 1, ""); + line = line.tqreplace(open.search(line), 1, ""); } if (line.endsWith(cont)) @@ -845,7 +845,7 @@ TQStringList AutoProjectTool::configureinLoadMakefiles(TQString configureinpath) { if (close.search(line) >= 0) { - line = line.replace(close.search(line), 1, ""); + line = line.tqreplace(close.search(line), 1, ""); } } @@ -946,7 +946,7 @@ void AutoProjectTool::configureinSaveMakefiles(TQString fileName, TQStringList m else if (ac_regex.search(line) >= 0) { line = line.stripWhiteSpace(); - line = line.replace(ac_regex.search(line), ac_match.length() - 1, ""); + line = line.tqreplace(ac_regex.search(line), ac_match.length() - 1, ""); if (line.endsWith(cont)) { line.setLength(line.length() - 1); @@ -954,11 +954,11 @@ void AutoProjectTool::configureinSaveMakefiles(TQString fileName, TQStringList m } if (open.search(line) >= 0) { - line = line.replace(open.search(line), 1, ""); + line = line.tqreplace(open.search(line), 1, ""); } if (close.search(line) >= 0) { - line = line.replace(close.search(line), 1, ""); + line = line.tqreplace(close.search(line), 1, ""); } if (!multiLine) -- cgit v1.2.1