summaryrefslogtreecommitdiffstats
path: root/ksirc/iocontroller.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/iocontroller.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/iocontroller.cpp')
-rw-r--r--ksirc/iocontroller.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/ksirc/iocontroller.cpp b/ksirc/iocontroller.cpp
index 61b0b49c..d63fba7b 100644
--- a/ksirc/iocontroller.cpp
+++ b/ksirc/iocontroller.cpp
@@ -54,9 +54,9 @@
- Should be called for stderr data, not connected, does
nothing.
- stdin_write(QString):
+ stdin_write(TQString):
- Slot that get's connected to by KSircProcess to each
- window. QString shold be written un touched! Let the
+ window. TQString shold be written un touched! Let the
writter figure out what ever he wants to do.
sircDied:
@@ -74,11 +74,11 @@
#include "messageReceiver.h"
#include "ksopts.h"
-#include <qlistbox.h>
-#include <qtextcodec.h>
+#include <tqlistbox.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kglobal.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -89,7 +89,7 @@
int KSircIOController::counter = 0;
KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc)
- : QObject()
+ : TQObject()
{
counter++;
@@ -103,20 +103,20 @@ KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc)
// Connect the data arrived
// to sirc receive for adding
// the main text window
- connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
- this, SLOT(stdout_read(KProcess*, char*, int)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ this, TQT_SLOT(stdout_read(KProcess*, char*, int)));
// Connect the stderr data
// to sirc receive for adding
// the main text window
- connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)),
- this, SLOT(stderr_read(KProcess*, char*, int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this, TQT_SLOT(stderr_read(KProcess*, char*, int)));
- connect(proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(sircDied(KProcess *)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(sircDied(KProcess *)));
// Notify on sirc dying
- connect(proc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(procCTS(KProcess*)));
+ connect(proc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(procCTS(KProcess*)));
proc_CTS = TRUE;
#if 0
showDebugTraffic(true);
@@ -175,12 +175,12 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
*/
int pos,pos2,pos3;
- QCString name, line;
+ TQCString name, line;
assert(_buffer != 0);
assert(buflen > 0);
- QCString buffer(_buffer, buflen+1);
+ TQCString buffer(_buffer, buflen+1);
//fprintf(stderr, "first print: \n");
//my_print(buffer);
//kdDebug(5008) << "<-- read: " << buffer << endl;
@@ -229,7 +229,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
line = buffer.mid(pos, pos2 - pos);
if(m_debugLB){
- QString s = QString::fromUtf8(line);
+ TQString s = TQString::fromUtf8(line);
m_debugLB->insertItem(s);
}
@@ -243,9 +243,9 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
line.remove(0, pos3+1);
}
}
- QString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding );
- QTextCodec *qtc = KGlobal::charsets()->codecForName( enc );
- QString qsname = qtc->toUnicode(name);
+ TQString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding );
+ TQTextCodec *qtc = KGlobal::charsets()->codecForName( enc );
+ TQString qsname = qtc->toUnicode(name);
/*
char *b = qstrdup(line);
kdDebug(5008) << "----------------------------------------" << endl;
@@ -302,7 +302,7 @@ void KSircIOController::stderr_read(KProcess *p, char *b, int l)
stdout_read(p, b, l);
}
-void KSircIOController::stdin_write(QCString s)
+void KSircIOController::stdin_write(TQCString s)
{
if (!proc->isRunning())
{
@@ -328,7 +328,7 @@ void KSircIOController::stdin_write(QCString s)
}
else{
if(m_debugLB){
- QString s = QString::fromUtf8(buffer);
+ TQString s = TQString::fromUtf8(buffer);
m_debugLB->insertItem(s);
m_debugLB->setContentsPos( 0, m_debugLB->contentsHeight());
}
@@ -351,7 +351,7 @@ void KSircIOController::sircDied(KProcess *process)
kdDebug(5008) << "IOController: KProcess died!\n";
ksircproc->TopList["!all"]->sirc_receive("*E* DSIRC IS DEAD");
ksircproc->TopList["!all"]->sirc_receive("*E* KSIRC WINDOW HALTED");
- ksircproc->TopList["!all"]->sirc_receive( QCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + QCString( "\n" ) );
+ ksircproc->TopList["!all"]->sirc_receive( TQCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + TQCString( "\n" ) );
ksircproc->TopList["!all"]->sirc_receive("*E* DID YOU READ THE INSTALL INTRUCTIONS?");
}
@@ -361,30 +361,30 @@ void KSircIOController::procCTS ( KProcess *)
delete[] send_buf;
send_buf = 0x0;
if(!buffer.isEmpty()){
- QCString str = "";
+ TQCString str = "";
stdin_write(str);
}
}
-void KSircIOController::showContextMenuOnDebugWindow(QListBoxItem *, const QPoint &pos)
+void KSircIOController::showContextMenuOnDebugWindow(TQListBoxItem *, const TQPoint &pos)
{
if (!m_debugLB)
return;
- QPopupMenu popup(m_debugLB);
+ TQPopupMenu popup(m_debugLB);
popup.insertItem("Save Contents to File...", 1);
if (popup.exec( pos ) != 1)
return;
- QString path = KFileDialog::getSaveFileName();
+ TQString path = KFileDialog::getSaveFileName();
if (path.isEmpty())
return;
- QFile file(path);
+ TQFile file(path);
if (!file.open(IO_WriteOnly))
return;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
for (uint i = 0; i < m_debugLB->count(); ++i)
stream << m_debugLB->text(i) << endl;
@@ -394,11 +394,11 @@ void KSircIOController::showDebugTraffic(bool show)
{
kdDebug(5008) << "Got show request: " << show << endl;
if(m_debugLB == 0 && show == true){
- m_debugLB = new QListBox(0x0, QCString(this->name()) + "_debugWindow");
+ m_debugLB = new TQListBox(0x0, TQCString(this->name()) + "_debugWindow");
m_debugLB->resize(600, 300);
m_debugLB->show();
- connect(m_debugLB,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)),
- this,SLOT(showContextMenuOnDebugWindow(QListBoxItem *,const QPoint &)));
+ connect(m_debugLB,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)),
+ this,TQT_SLOT(showContextMenuOnDebugWindow(TQListBoxItem *,const TQPoint &)));
}
else if(m_debugLB != 0 && show == false){
delete m_debugLB;
@@ -415,7 +415,7 @@ bool KSircIOController::isDebugTraffic()
return false;
}
-void KSircIOController::appendDebug(QString s)
+void KSircIOController::appendDebug(TQString s)
{
if(m_debugLB){
m_debugLB->insertItem(s);