summaryrefslogtreecommitdiffstats
path: root/kfilereplace/commandengine.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kfilereplace/commandengine.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfilereplace/commandengine.cpp')
-rw-r--r--kfilereplace/commandengine.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kfilereplace/commandengine.cpp b/kfilereplace/commandengine.cpp
index ffb1919d..aaf40f38 100644
--- a/kfilereplace/commandengine.cpp
+++ b/kfilereplace/commandengine.cpp
@@ -34,10 +34,10 @@ TQString CommandEngine::datetime(const TQString& opt, const TQString& arg)
{
Q_UNUSED(arg);
if(opt == "iso")
- return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate);
+ return TQDateTime::tqcurrentDateTime(Qt::LocalTime).toString(Qt::ISODate);
if(opt == "local")
- return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate);
- return TQString::null;
+ return TQDateTime::tqcurrentDateTime(Qt::LocalTime).toString(Qt::LocalDate);
+ return TQString();
}
TQString CommandEngine::user(const TQString& opt, const TQString& arg)
@@ -56,7 +56,7 @@ TQString CommandEngine::user(const TQString& opt, const TQString& arg)
return u.homeDir();
if(opt == "shell")
return u.shell();
- return TQString::null;
+ return TQString();
}
TQString CommandEngine::loadfile(const TQString& opt, const TQString& arg)
@@ -64,7 +64,7 @@ TQString CommandEngine::loadfile(const TQString& opt, const TQString& arg)
Q_UNUSED(arg);
TQFile f(opt);
- if(!f.open(IO_ReadOnly)) return TQString::null;
+ if(!f.open(IO_ReadOnly)) return TQString();
TQTextStream t(&f);
@@ -89,11 +89,11 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg)
Q_UNUSED(arg);
TQString tempOpt = opt;
- tempOpt.replace("ln","l");
- tempOpt.replace("sin","s");
- tempOpt.replace("cos","c");
- tempOpt.replace("arctan","a");
- tempOpt.replace("exp","e");
+ tempOpt.tqreplace("ln","l");
+ tempOpt.tqreplace("sin","s");
+ tempOpt.tqreplace("cos","c");
+ tempOpt.tqreplace("arctan","a");
+ tempOpt.tqreplace("exp","e");
TQString program = "var=("+tempOpt+");print var";
TQString script = "echo '"+program+"' | bc -l;";
@@ -111,7 +111,7 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg)
//Through slotGetScriptOutput, m_processOutput contains the result of the KProcess call
if(!proc->start(KProcess::Block, KProcess::All))
{
- return TQString::null;
+ return TQString();
}
else
{
@@ -121,7 +121,7 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg)
delete proc;
TQString tempbuf = m_processOutput;
- m_processOutput = TQString::null;
+ m_processOutput = TQString();
return tempbuf;
@@ -156,7 +156,7 @@ TQString CommandEngine::variableValue(const TQString &variable)
s.remove("[$").remove("$]").remove(" ");
- if(s.contains(":") == 0)
+ if(s.tqcontains(":") == 0)
return variable;
else
{