summaryrefslogtreecommitdiffstats
path: root/kommander/widget/myprocess.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/widget/myprocess.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widget/myprocess.cpp')
-rw-r--r--kommander/widget/myprocess.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp
index e7e05e3b..59eb67fb 100644
--- a/kommander/widget/myprocess.cpp
+++ b/kommander/widget/myprocess.cpp
@@ -19,9 +19,9 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qapplication.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include "myprocess.h"
@@ -32,15 +32,15 @@ MyProcess::MyProcess(const KommanderWidget *a_atw)
{
}
-void qt_enter_modal(QWidget *widget);
-void qt_leave_modal(QWidget *widget);
+void qt_enter_modal(TQWidget *widget);
+void qt_leave_modal(TQWidget *widget);
void MyProcess::setBlocking(bool blocking)
{
m_blocking = blocking;
}
-QString MyProcess::output() const
+TQString MyProcess::output() const
{
return m_output;
}
@@ -59,16 +59,16 @@ void MyProcess::cancel()
}
}
-QString MyProcess::run(const QString& a_command, const QString& a_shell)
+TQString MyProcess::run(const TQString& a_command, const TQString& a_shell)
{
- QString at = a_command.stripWhiteSpace();
+ TQString at = a_command.stripWhiteSpace();
if (at.isEmpty())
{
emit processExited(0);
- return QString();
+ return TQString();
}
- QString shellName = a_shell;
+ TQString shellName = a_shell;
if (shellName.isEmpty())
shellName = "/bin/sh";
@@ -85,24 +85,24 @@ QString MyProcess::run(const QString& a_command, const QString& a_shell)
mProcess = new KProcess;
(*mProcess) << shellName.latin1();
- connect(mProcess, SIGNAL(receivedStdout(KProcess*, char*, int)),
- SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(mProcess, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(mProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
if(!mProcess->start(KProcess::NotifyOnExit, KProcess::All))
{
m_atw->printError(i18n("<qt>Failed to start shell process<br><b>%1</b></qt>").arg(shellName));
- return QString();
+ return TQString();
}
mProcess->writeStdin(m_input, m_input.length());
mProcess->closeStdin();
if (!m_blocking)
- return QString();
+ return TQString();
else
{
- QWidget dummy(0, 0, WType_Dialog | WShowModal);
- dummy.setFocusPolicy(QWidget::NoFocus);
+ TQWidget dummy(0, 0, WType_Dialog | WShowModal);
+ dummy.setFocusPolicy(TQWidget::NoFocus);
m_loopStarted = true;
qt_enter_modal(&dummy);
qApp->enter_loop();
@@ -117,7 +117,7 @@ QString MyProcess::run(const QString& a_command, const QString& a_shell)
void MyProcess::slotReceivedStdout(KProcess*, char* a_buffer, int a_len)
{
- m_output += QString::fromLocal8Bit(a_buffer, a_len);
+ m_output += TQString::fromLocal8Bit(a_buffer, a_len);
emit processReceivedStdout(this, a_buffer, a_len);
}