summaryrefslogtreecommitdiffstats
path: root/parts/tools/tools_part.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 /parts/tools/tools_part.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 'parts/tools/tools_part.cpp')
-rw-r--r--parts/tools/tools_part.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/parts/tools/tools_part.cpp b/parts/tools/tools_part.cpp
index f9daca4b..ac1b9464 100644
--- a/parts/tools/tools_part.cpp
+++ b/parts/tools/tools_part.cpp
@@ -39,8 +39,8 @@ K_EXPORT_COMPONENT_FACTORY( libkdevtools, ToolsFactory( data ) )
TQMap<int, TQString> externalToolMenuEntries;
-ToolsPart::ToolsPart(TQObject *parent, const char *name, const TQStringList &)
- : KDevPlugin( &data, parent, name ? name : "ToolsPart")
+ToolsPart::ToolsPart(TQObject *tqparent, const char *name, const TQStringList &)
+ : KDevPlugin( &data, tqparent, name ? name : "ToolsPart")
{
setInstance(ToolsFactory::instance());
@@ -57,7 +57,7 @@ ToolsPart::ToolsPart(TQObject *parent, const char *name, const TQStringList &)
connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)),
this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) );
- // Apparently action lists can only be plugged after the
+ // Aptqparently action lists can only be plugged after the
// xmlgui client has been registered
TQTimer::singleShot(0, this, TQT_SLOT(updateToolsMenu()));
}
@@ -113,7 +113,7 @@ void ToolsPart::updateMenu()
void ToolsPart::slotToolActivated()
{
- TQString df = sender()->name();
+ TQString df = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name();
kapp->startServiceByDesktopPath(df);
}
@@ -135,21 +135,21 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName)
TQString word = KDevEditorUtil::currentWord( doc );
// This should really be checked before inserting into the popup
- if (cmdline.contains("%D") && projectDirectory.isNull())
+ if (cmdline.tqcontains("%D") && projectDirectory.isNull())
return;
- cmdline.replace(TQRegExp("%D"), projectDirectory);
+ cmdline.tqreplace(TQRegExp("%D"), projectDirectory);
- if (cmdline.contains("%S") && fileName.isNull())
+ if (cmdline.tqcontains("%S") && fileName.isNull())
return;
- cmdline.replace(TQRegExp("%S"), fileName);
+ cmdline.tqreplace(TQRegExp("%S"), fileName);
- if (cmdline.contains("%T") && selection.isNull())
+ if (cmdline.tqcontains("%T") && selection.isNull())
return;
- cmdline.replace(TQRegExp("%T"), selection);
+ cmdline.tqreplace(TQRegExp("%T"), selection);
- if (cmdline.contains("%W") && word.isNull())
+ if (cmdline.tqcontains("%W") && word.isNull())
return;
- cmdline.replace(TQRegExp("%W"), word);
+ cmdline.tqreplace(TQRegExp("%W"), word);
if (captured)
{
@@ -224,7 +224,7 @@ void ToolsPart::contextMenu(TQPopupMenu *popup, const Context *context)
void ToolsPart::toolsMenuActivated()
{
- TQString menutext = sender()->name();
+ TQString menutext = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name();
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Tool Menu " + menutext);
TQString cmdline = config->readPathEntry("CommandLine");
@@ -236,7 +236,7 @@ void ToolsPart::toolsMenuActivated()
if (isdesktopfile)
kapp->startServiceByDesktopPath(cmdline);
else
- startCommand(cmdline, captured, TQString::null);
+ startCommand(cmdline, captured, TQString());
}