Rename class KProcIO to TDEProcIO

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/328/head
Michele Calgaro 7 months ago
parent a876c10e90
commit af644c0201
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -148,7 +148,7 @@ that we would like to make for the next binary incompatible release.
- do something about the NoRead comm mode - do something about the NoRead comm mode
- add setComm(); remove comm arg from start(). as a side effect, this will allow for using - add setComm(); remove comm arg from start(). as a side effect, this will allow for using
writeStdin() in Block mode. writeStdin() in Block mode.
- merge KProcIO into TDEProcess; add setBuffered() for separate channels. - merge TDEProcIO into TDEProcess; add setBuffered() for separate channels.
- use QByteArray for writeStdin(). better than the buf+len arg, as it is ref-counted. - use QByteArray for writeStdin(). better than the buf+len arg, as it is ref-counted.
- To discuss: Migrate the about dialog to use qhtml or tdehtml rather then the current - To discuss: Migrate the about dialog to use qhtml or tdehtml rather then the current

@ -67,7 +67,7 @@
#include <tdeparts/componentfactory.h> #include <tdeparts/componentfactory.h>
#include <tdepopupmenu.h> #include <tdepopupmenu.h>
#include <tdeprocess.h> #include <tdeprocess.h>
#include <kprocio.h> #include <tdeprocio.h>
#include <kregexpeditorinterface.h> #include <kregexpeditorinterface.h>
#include <krun.h> #include <krun.h>
#include <kseparator.h> #include <kseparator.h>
@ -1636,11 +1636,11 @@ KateModOnHdPrompt::~KateModOnHdPrompt()
void KateModOnHdPrompt::slotDiff() void KateModOnHdPrompt::slotDiff()
{ {
// Start a TDEProcess that creates a diff // Start a TDEProcess that creates a diff
KProcIO *p = new KProcIO(); TDEProcIO *p = new TDEProcIO();
p->setComm( TDEProcess::All ); p->setComm( TDEProcess::All );
*p << "diff" << "-u" << "-" << m_doc->url().path(); *p << "diff" << "-u" << "-" << m_doc->url().path();
connect( p, TQ_SIGNAL(processExited(TDEProcess*)), this, TQ_SLOT(slotPDone(TDEProcess*)) ); connect( p, TQ_SIGNAL(processExited(TDEProcess*)), this, TQ_SLOT(slotPDone(TDEProcess*)) );
connect( p, TQ_SIGNAL(readReady(KProcIO*)), this, TQ_SLOT(slotPRead(KProcIO*)) ); connect( p, TQ_SIGNAL(readReady(TDEProcIO*)), this, TQ_SLOT(slotPRead(TDEProcIO*)) );
setCursor( WaitCursor ); setCursor( WaitCursor );
@ -1653,7 +1653,7 @@ void KateModOnHdPrompt::slotDiff()
p->closeWhenDone(); p->closeWhenDone();
} }
void KateModOnHdPrompt::slotPRead( KProcIO *p) void KateModOnHdPrompt::slotPRead( TDEProcIO *p)
{ {
// create a file for the diff if we haven't one allready // create a file for the diff if we haven't one allready
if ( ! m_tmpfile ) if ( ! m_tmpfile )

@ -359,7 +359,7 @@ class KateHlDownloadDialog: public KDialogBase
void slotUser1(); void slotUser1();
}; };
class KProcIO; class TDEProcIO;
class TDEProcess; class TDEProcess;
/** /**
* This dialog will prompt the user for what do with a file that is * This dialog will prompt the user for what do with a file that is
@ -393,7 +393,7 @@ class KateModOnHdPrompt : public KDialogBase
void slotUser1(); void slotUser1();
private slots: private slots:
void slotPRead(KProcIO*); ///< Read from the diff process void slotPRead(TDEProcIO*); ///< Read from the diff process
void slotPDone(TDEProcess*); ///< Runs the diff file when done void slotPDone(TDEProcess*); ///< Runs the diff file when done
private: private:

@ -64,7 +64,7 @@ install( FILES
krandomsequence.h knotifyclient.h kiconeffect.h kaudioplayer.h krandomsequence.h knotifyclient.h kiconeffect.h kaudioplayer.h
kdcoppropertyproxy.h netwm.h tdeaccelmanager.h netwm_def.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h netwm_def.h
kpixmapprovider.h kunload.h kstaticdeleter.h kextsock.h kpixmapprovider.h kunload.h kstaticdeleter.h kextsock.h
kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h kbufferedio.h kextendedsocket.h ksockaddr.h tdeprocio.h kasyncio.h kbufferedio.h
kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h tdesycoca.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h tdesycoca.h
tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h
klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc
@ -121,7 +121,7 @@ set( ${target}_SRCS
krandomsequence.cpp kstringhandler.cpp kcompletion.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp
tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp
kaudioplayer.cpp kdcoppropertyproxy.cpp ksockaddr.cpp kaudioplayer.cpp kdcoppropertyproxy.cpp ksockaddr.cpp
kextsock.cpp netsupp.cpp kprocio.cpp kbufferedio.cpp kextsock.cpp netsupp.cpp tdeprocio.cpp kbufferedio.cpp
kpixmapprovider.cpp kurldrag.cpp kmdcodec.cpp ksocks.cpp kpixmapprovider.cpp kurldrag.cpp kmdcodec.cpp ksocks.cpp
fakes.c vsnprintf.c tdesycoca.cpp tdesycocadict.cpp tdesycoca.skel fakes.c vsnprintf.c tdesycoca.cpp tdesycocadict.cpp tdesycoca.skel
tdesycocafactory.cpp kxmessages.cpp tdestartupinfo.cpp tdesycocafactory.cpp kxmessages.cpp tdestartupinfo.cpp

@ -50,7 +50,7 @@ kpalette.cpp Waldo Bastian <bastian@kde.org>
kpixmapprovider.cpp Carsten Pfeiffer <pfeiffer@kde.org> kpixmapprovider.cpp Carsten Pfeiffer <pfeiffer@kde.org>
tdeprocctrl.cpp Waldo Bastian <bastian@kde.org> tdeprocctrl.cpp Waldo Bastian <bastian@kde.org>
tdeprocess.cpp Waldo Bastian <bastian@kde.org> tdeprocess.cpp Waldo Bastian <bastian@kde.org>
kprocio.cpp Waldo Bastian <bastian@kde.org> tdeprocio.cpp Waldo Bastian <bastian@kde.org>
krandomsequence.cpp Waldo Bastian <bastian@kde.org> krandomsequence.cpp Waldo Bastian <bastian@kde.org>
kregexp.cpp kregexp.cpp
krfcdate.cpp Waldo Bastian <bastian@kde.org> krfcdate.cpp Waldo Bastian <bastian@kde.org>

@ -51,7 +51,7 @@ include_HEADERS = tdeconfig.h tdeconfigskeleton.h \
krandomsequence.h knotifyclient.h kiconeffect.h \ krandomsequence.h knotifyclient.h kiconeffect.h \
kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h \ kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h \
netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h \ netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h \
kextsock.h kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h \ kextsock.h kextendedsocket.h ksockaddr.h tdeprocio.h kasyncio.h \
kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h \ kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h \
tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h \ tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h \
klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc \ klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc \
@ -105,7 +105,7 @@ libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \
ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp \ ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp \
tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \ tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \
kaudioplayer.cpp kdcoppropertyproxy.cpp \ kaudioplayer.cpp kdcoppropertyproxy.cpp \
ksockaddr.cpp kextsock.cpp netsupp.cpp kprocio.cpp kbufferedio.cpp \ ksockaddr.cpp kextsock.cpp netsupp.cpp tdeprocio.cpp kbufferedio.cpp \
kpixmapprovider.cpp kurldrag.cpp \ kpixmapprovider.cpp kurldrag.cpp \
kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c \ kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c \
tdesycoca.cpp tdesycocadict.cpp tdesycocafactory.cpp tdesycoca.skel \ tdesycoca.cpp tdesycocadict.cpp tdesycocafactory.cpp tdesycoca.skel \

@ -16,9 +16,9 @@ child of your process, e.g. because you want to catch stdout/stderr or need
to send it data via stdin. You should never use this to start other KDE to send it data via stdin. You should never use this to start other KDE
applications unless your application is called kgdb :-) If you need to applications unless your application is called kgdb :-) If you need to
send/receive text like data to/from the process, you are probably better send/receive text like data to/from the process, you are probably better
off with KProcIO off with TDEProcIO
3. KProcIO 3. TDEProcIO
Like TDEProcess. Unlike TDEProcess, this class actually makes it easy to Like TDEProcess. Unlike TDEProcess, this class actually makes it easy to
send data to and receive data from the process. send data to and receive data from the process.

@ -18,7 +18,7 @@
171 tdecore (KSocks) 171 tdecore (KSocks)
172 tdecore (TDEStartupInfo) 172 tdecore (TDEStartupInfo)
173 tdecore (TDELocale) 173 tdecore (TDELocale)
174 tdecore (KProcIO) 174 tdecore (TDEProcIO)
175 tdecore (TDEProcess) 175 tdecore (TDEProcess)
176 tdecore (KWin) 176 tdecore (KWin)
177 tdecore (TDEConfigSkeleton) 177 tdecore (TDEConfigSkeleton)

@ -47,7 +47,7 @@ class KPty;
* This class allows a KDE application to start child processes without having * This class allows a KDE application to start child processes without having
* to worry about UN*X signal handling issues and zombie process reaping. * to worry about UN*X signal handling issues and zombie process reaping.
* *
* @see KProcIO * @see TDEProcIO
* *
* Basically, this class distinguishes three different ways of running * Basically, this class distinguishes three different ways of running
* child processes: * child processes:

@ -24,19 +24,19 @@
#include <stdio.h> #include <stdio.h>
#include "kprocio.h" #include "tdeprocio.h"
#include <kdebug.h> #include <kdebug.h>
#include <tqtextcodec.h> #include <tqtextcodec.h>
class KProcIOPrivate { class TDEProcIOPrivate {
public: public:
KProcIOPrivate() : comm(TDEProcess::All) {} TDEProcIOPrivate() : comm(TDEProcess::All) {}
TDEProcess::Communication comm; TDEProcess::Communication comm;
}; };
KProcIO::KProcIO ( TQTextCodec *_codec) TDEProcIO::TDEProcIO ( TQTextCodec *_codec)
: codec(_codec), d(new KProcIOPrivate) : codec(_codec), d(new TDEProcIOPrivate)
{ {
rbi=0; rbi=0;
readsignalon=writeready=true; readsignalon=writeready=true;
@ -52,13 +52,13 @@ KProcIO::KProcIO ( TQTextCodec *_codec)
} }
} }
KProcIO::~KProcIO() TDEProcIO::~TDEProcIO()
{ {
delete d; delete d;
} }
void void
KProcIO::resetAll () TDEProcIO::resetAll ()
{ {
if (isRunning()) if (isRunning())
kill(); kill();
@ -80,12 +80,12 @@ KProcIO::resetAll ()
} }
void KProcIO::setComm (Communication comm) void TDEProcIO::setComm (Communication comm)
{ {
d->comm = comm; d->comm = comm;
} }
bool KProcIO::start (RunMode runmode, bool includeStderr) bool TDEProcIO::start (RunMode runmode, bool includeStderr)
{ {
connect (this, TQ_SIGNAL (receivedStdout (TDEProcess *, char *, int)), connect (this, TQ_SIGNAL (receivedStdout (TDEProcess *, char *, int)),
this, TQ_SLOT (received (TDEProcess *, char *, int))); this, TQ_SLOT (received (TDEProcess *, char *, int)));
@ -102,12 +102,12 @@ bool KProcIO::start (RunMode runmode, bool includeStderr)
return TDEProcess::start (runmode, d->comm); return TDEProcess::start (runmode, d->comm);
} }
bool KProcIO::writeStdin (const TQString &line, bool appendnewline) bool TDEProcIO::writeStdin (const TQString &line, bool appendnewline)
{ {
return writeStdin(TQCString(codec->fromUnicode(line)), appendnewline); return writeStdin(TQCString(codec->fromUnicode(line)), appendnewline);
} }
bool KProcIO::writeStdin (const TQCString &line, bool appendnewline) bool TDEProcIO::writeStdin (const TQCString &line, bool appendnewline)
{ {
TQCString *qs = new TQCString(line); TQCString *qs = new TQCString(line);
@ -136,7 +136,7 @@ bool KProcIO::writeStdin (const TQCString &line, bool appendnewline)
return true; return true;
} }
bool KProcIO::writeStdin(const TQByteArray &data) bool TDEProcIO::writeStdin(const TQByteArray &data)
{ {
if (!data.size()) if (!data.size())
return true; return true;
@ -151,7 +151,7 @@ bool KProcIO::writeStdin(const TQByteArray &data)
return true; return true;
} }
void KProcIO::closeWhenDone() void TDEProcIO::closeWhenDone()
{ {
if (writeready) if (writeready)
{ {
@ -163,7 +163,7 @@ void KProcIO::closeWhenDone()
return; return;
} }
void KProcIO::sent(TDEProcess *) void TDEProcIO::sent(TDEProcess *)
{ {
outbuffer.removeFirst(); outbuffer.removeFirst();
@ -186,21 +186,21 @@ void KProcIO::sent(TDEProcess *)
} }
void KProcIO::received (TDEProcess *, char *buffer, int buflen) void TDEProcIO::received (TDEProcess *, char *buffer, int buflen)
{ {
recvbuffer += TQCString(buffer, buflen+1); recvbuffer += TQCString(buffer, buflen+1);
controlledEmission(); controlledEmission();
} }
void KProcIO::ackRead () void TDEProcIO::ackRead ()
{ {
readsignalon=true; readsignalon=true;
if (needreadsignal || recvbuffer.length()!=0) if (needreadsignal || recvbuffer.length()!=0)
controlledEmission(); controlledEmission();
} }
void KProcIO::controlledEmission () void TDEProcIO::controlledEmission ()
{ {
if (readsignalon) if (readsignalon)
{ {
@ -214,7 +214,7 @@ void KProcIO::controlledEmission ()
} }
} }
void KProcIO::enableReadSignals (bool enable) void TDEProcIO::enableReadSignals (bool enable)
{ {
readsignalon=enable; readsignalon=enable;
@ -222,7 +222,7 @@ void KProcIO::enableReadSignals (bool enable)
emit readReady (this); emit readReady (this);
} }
int KProcIO::readln (TQString &line, bool autoAck, bool *partial) int TDEProcIO::readln (TQString &line, bool autoAck, bool *partial)
{ {
int len; int len;
@ -269,8 +269,8 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial)
} }
void KProcIO::virtual_hook( int id, void* data ) void TDEProcIO::virtual_hook( int id, void* data )
{ TDEProcess::virtual_hook( id, data ); } { TDEProcess::virtual_hook( id, data ); }
#include "kprocio.moc" #include "tdeprocio.moc"

@ -1,4 +1,4 @@
/* This file is part of the KDE libraries /* This file is part of the TDE libraries
Copyright (C) 1997 David Sweet <dsweet@kde.org> Copyright (C) 1997 David Sweet <dsweet@kde.org>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -15,29 +15,29 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KPROCIO_H_ #ifndef TDEPROCIO_H_
#define KPROCIO_H_ #define TDEPROCIO_H_
#include <tqstring.h> #include <tqstring.h>
#include <tdeprocess.h> #include <tdeprocess.h>
#include <tqstrlist.h> #include <tqstrlist.h>
#include "tdelibs_export.h" #include "tdelibs_export.h"
class KProcIOPrivate; class TDEProcIOPrivate;
class TQTextCodec; class TQTextCodec;
/** /**
* KProcIO * TDEProcIO
* *
* This class provides a slightly simpler interface to the communication * This class provides a slightly simpler interface to the communication
* functions provided by TDEProcess. The simplifications are: * functions provided by TDEProcess. The simplifications are:
* @li The buffer for a write is copied to an internal KProcIO * @li The buffer for a write is copied to an internal TDEProcIO
* buffer and maintained/freed appropriately. There is no need * buffer and maintained/freed appropriately. There is no need
* to be concerned with wroteStdin() signals _at_all_. * to be concerned with wroteStdin() signals _at_all_.
* @li readln() reads a line of data and buffers any leftovers. * @li readln() reads a line of data and buffers any leftovers.
* @li Conversion from/to unicode. * @li Conversion from/to unicode.
* *
* Basically, KProcIO gives you buffered I/O similar to fgets()/fputs(). * Basically, TDEProcIO gives you buffered I/O similar to fgets()/fputs().
* *
* Aside from these, and the fact that start() takes different * Aside from these, and the fact that start() takes different
* parameters, use this class just like TDEProcess. * parameters, use this class just like TDEProcess.
@ -47,7 +47,7 @@ class TQTextCodec;
**/ **/
class TDECORE_EXPORT KProcIO : public TDEProcess class TDECORE_EXPORT TDEProcIO : public TDEProcess
{ {
TQ_OBJECT TQ_OBJECT
@ -55,12 +55,12 @@ public:
/** /**
* Constructor * Constructor
*/ */
KProcIO ( TQTextCodec *codec = 0 ); TDEProcIO ( TQTextCodec *codec = 0 );
/** /**
* Destructor * Destructor
*/ */
~KProcIO(); ~TDEProcIO();
/** /**
* Sets the communication mode to be passed to TDEProcess::start() * Sets the communication mode to be passed to TDEProcess::start()
@ -135,7 +135,7 @@ public:
* You may use it multiple times if more than one line of data is * You may use it multiple times if more than one line of data is
* available. * available.
* Be sure to use ackRead() when you have finished processing the * Be sure to use ackRead() when you have finished processing the
* readReady() signal. This informs KProcIO that you are ready for * readReady() signal. This informs TDEProcIO that you are ready for
* another readReady() signal. * another readReady() signal.
* *
* readln() never blocks. * readln() never blocks.
@ -192,7 +192,7 @@ signals:
* @param pio the process that emitted the signal * @param pio the process that emitted the signal
* @see enableReadSignals() * @see enableReadSignals()
*/ */
void readReady(KProcIO *pio); void readReady(TDEProcIO *pio);
protected: protected:
TQPtrList<TQByteArray> outbuffer; TQPtrList<TQByteArray> outbuffer;
@ -210,8 +210,7 @@ protected slots:
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
private: private:
KProcIOPrivate *d; TDEProcIOPrivate *d;
}; };
#endif // KPROCIO_H_ #endif

@ -36,7 +36,7 @@ set( CHECKS
ksocktest kstringhandlertest kcmdlineargstest tdeapptest kmemtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest kmemtest
dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest
kmdcodectest knotifytest ksortablevaluelisttest krfcdatetest testqtargs kmdcodectest knotifytest ksortablevaluelisttest krfcdatetest testqtargs
kprociotest kcharsetstest kcalendartest kmacroexpandertest kshelltest tdeprociotest kcharsetstest kcalendartest kmacroexpandertest kshelltest
kxerrorhandlertest startserviceby kglobaltest ktimezonestest kxerrorhandlertest startserviceby kglobaltest ktimezonestest
) )

@ -26,14 +26,14 @@ check_PROGRAMS = tdeconfigtestgui klocaletest tdeprocesstest ksimpleconfigtest \
kdebugtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest \ kdebugtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest \
kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \ kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \
cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \ cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \
ksortablevaluelisttest krfcdatetest testqtargs kprociotest \ ksortablevaluelisttest krfcdatetest testqtargs tdeprociotest \
kcharsetstest kcalendartest kmacroexpandertest kshelltest \ kcharsetstest kcalendartest kmacroexpandertest kshelltest \
kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest
TESTS = kurltest tdestdacceltest TESTS = kurltest tdestdacceltest
noinst_HEADERS = klocaletest.h tdeprocesstest.h KIDLTest.h \ noinst_HEADERS = klocaletest.h tdeprocesstest.h KIDLTest.h \
kipctest.h kprociotest.h kipctest.h tdeprociotest.h
METASOURCES = AUTO METASOURCES = AUTO
@ -68,7 +68,7 @@ knotifytest_SOURCES = knotifytest.cpp
ksortablevaluelisttest_SOURCES = ksortablevaluelisttest.cpp ksortablevaluelisttest_SOURCES = ksortablevaluelisttest.cpp
krfcdatetest_SOURCES = krfcdatetest.cpp krfcdatetest_SOURCES = krfcdatetest.cpp
testqtargs_SOURCES = testqtargs.cpp testqtargs_SOURCES = testqtargs.cpp
kprociotest_SOURCES = kprociotest.cpp tdeprociotest_SOURCES = tdeprociotest.cpp
kcharsetstest_SOURCES = kcharsetstest.cpp kcharsetstest_SOURCES = kcharsetstest.cpp
kcalendartest_SOURCES = kcalendartest.cpp kcalendartest_SOURCES = kcalendartest.cpp
kmacroexpandertest_SOURCES = kmacroexpandertest.cpp kmacroexpandertest_SOURCES = kmacroexpandertest.cpp

@ -17,7 +17,7 @@
#include <signal.h> #include <signal.h>
#include "kprociotest.h" #include "tdeprociotest.h"
@ -32,17 +32,17 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
Dummy dummy; Dummy dummy;
TDEApplication app(argc, argv, TQCString("kprociotest")); TDEApplication app(argc, argv, TQCString("tdeprociotest"));
printf("Welcome to the KProcIO Demo Application!\n"); printf("Welcome to the TDEProcIO Demo Application!\n");
KProcIO p; TDEProcIO p;
p << "rev"; p << "rev";
p.connect(&p, TQ_SIGNAL(processExited(TDEProcess*)), &dummy, TQ_SLOT(printMessage(TDEProcess*))); p.connect(&p, TQ_SIGNAL(processExited(TDEProcess*)), &dummy, TQ_SLOT(printMessage(TDEProcess*)));
p.connect(&p, TQ_SIGNAL(readReady(KProcIO*)), &dummy, TQ_SLOT(gotOutput(KProcIO*))); p.connect(&p, TQ_SIGNAL(readReady(TDEProcIO*)), &dummy, TQ_SLOT(gotOutput(TDEProcIO*)));
bool b; bool b;
@ -62,4 +62,4 @@ int main(int argc, char *argv[])
return 0; return 0;
} }
#include "kprociotest.moc" #include "tdeprociotest.moc"

@ -13,7 +13,7 @@
#include <stdio.h> #include <stdio.h>
#include <tqobject.h> #include <tqobject.h>
#include "kprocio.h" #include "tdeprocio.h"
class Dummy : public TQObject class Dummy : public TQObject
{ {
@ -25,7 +25,7 @@ class Dummy : public TQObject
printf("Process %d exited!\n", (int)proc->getPid()); printf("Process %d exited!\n", (int)proc->getPid());
} }
void gotOutput(KProcIO*proc) void gotOutput(TDEProcIO*proc)
{ {
TQString line; TQString line;
while(true) { while(true) {

@ -42,7 +42,7 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <kprocio.h> #include <tdeprocio.h>
#include <kurl.h> #include <kurl.h>
#include "discovery.moc" #include "discovery.moc"
@ -51,9 +51,9 @@ namespace KPAC
{ {
Discovery::Discovery( TQObject* parent ) Discovery::Discovery( TQObject* parent )
: Downloader( parent ), : Downloader( parent ),
m_helper( new KProcIO ) m_helper( new TDEProcIO )
{ {
connect( m_helper, TQ_SIGNAL( readReady( KProcIO* ) ), TQ_SLOT( helperOutput() ) ); connect( m_helper, TQ_SIGNAL( readReady( TDEProcIO* ) ), TQ_SLOT( helperOutput() ) );
connect( m_helper, TQ_SIGNAL( processExited( TDEProcess* ) ), TQ_SLOT( failed() ) ); connect( m_helper, TQ_SIGNAL( processExited( TDEProcess* ) ), TQ_SLOT( failed() ) );
*m_helper << "kpac_dhcp_helper"; *m_helper << "kpac_dhcp_helper";

@ -25,7 +25,7 @@
#include "downloader.h" #include "downloader.h"
class KProcIO; class TDEProcIO;
namespace KPAC namespace KPAC
{ {
@ -45,7 +45,7 @@ namespace KPAC
bool initHostName(); bool initHostName();
bool checkDomain() const; bool checkDomain() const;
KProcIO* m_helper; TDEProcIO* m_helper;
TQString m_hostname; TQString m_hostname;
}; };
} }

@ -26,7 +26,7 @@
#include <tqlayout.h> #include <tqlayout.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tdeprocess.h> #include <tdeprocess.h>
#include <kprocio.h> #include <tdeprocio.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>

@ -22,7 +22,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tdeprocess.h> #include <tdeprocess.h>
#include <kprocio.h> #include <tdeprocio.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -179,7 +179,7 @@ void KFileShare::readShareList()
s_authorization = ErrorNotFound; s_authorization = ErrorNotFound;
return; return;
} }
KProcIO proc; TDEProcIO proc;
proc << exe; proc << exe;
if ( !proc.start( TDEProcess::Block ) ) { if ( !proc.start( TDEProcess::Block ) ) {
kdError() << "Can't run " << exe << endl; kdError() << "Can't run " << exe << endl;

@ -26,7 +26,7 @@
#include <kmdcodec.h> #include <kmdcodec.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <kpassdlg.h> #include <kpassdlg.h>
#include <kprocio.h> #include <tdeprocio.h>
//app includes //app includes
#include "security.h" #include "security.h"
@ -55,10 +55,10 @@ void Security::readKeys()
} }
m_runMode = List; m_runMode = List;
m_keys.clear(); m_keys.clear();
KProcIO *readProcess=new KProcIO(); TDEProcIO *readProcess=new TDEProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys"; *readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
connect(readProcess, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(slotProcessExited(TDEProcess *))); connect(readProcess, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(slotProcessExited(TDEProcess *)));
connect(readProcess, TQ_SIGNAL(readReady(KProcIO *)) ,this, TQ_SLOT(slotDataArrived(KProcIO *))); connect(readProcess, TQ_SIGNAL(readReady(TDEProcIO *)) ,this, TQ_SLOT(slotDataArrived(TDEProcIO *)));
if (!readProcess->start(TDEProcess::NotifyOnExit, true)) if (!readProcess->start(TDEProcess::NotifyOnExit, true))
KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>")); KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
else else
@ -73,10 +73,10 @@ void Security::readSecretKeys()
return; return;
} }
m_runMode = ListSecret; m_runMode = ListSecret;
KProcIO *readProcess=new KProcIO(); TDEProcIO *readProcess=new TDEProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys"; *readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys";
connect(readProcess, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(slotProcessExited(TDEProcess *))); connect(readProcess, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(slotProcessExited(TDEProcess *)));
connect(readProcess, TQ_SIGNAL(readReady(KProcIO *)) ,this, TQ_SLOT(slotDataArrived(KProcIO *))); connect(readProcess, TQ_SIGNAL(readReady(TDEProcIO *)) ,this, TQ_SLOT(slotDataArrived(TDEProcIO *)));
if (readProcess->start(TDEProcess::NotifyOnExit, true)) if (readProcess->start(TDEProcess::NotifyOnExit, true))
m_gpgRunning = true; m_gpgRunning = true;
} }
@ -98,7 +98,7 @@ void Security::slotProcessExited(TDEProcess *process)
delete process; delete process;
} }
void Security::slotDataArrived(KProcIO *procIO) void Security::slotDataArrived(TDEProcIO *procIO)
{ {
TQString data; TQString data;
while (procIO->readln(data, true) != -1) while (procIO->readln(data, true) != -1)
@ -246,10 +246,10 @@ void Security::slotCheckValidity()
m_signatureKey.trusted = false; m_signatureKey.trusted = false;
//verify the signature //verify the signature
KProcIO *verifyProcess=new KProcIO(); TDEProcIO *verifyProcess=new TDEProcIO();
*verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName; *verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName;
connect(verifyProcess, TQ_SIGNAL(processExited(TDEProcess *)),this, TQ_SLOT(slotProcessExited(TDEProcess *))); connect(verifyProcess, TQ_SIGNAL(processExited(TDEProcess *)),this, TQ_SLOT(slotProcessExited(TDEProcess *)));
connect(verifyProcess, TQ_SIGNAL(readReady(KProcIO *)),this, TQ_SLOT(slotDataArrived(KProcIO *))); connect(verifyProcess, TQ_SIGNAL(readReady(TDEProcIO *)),this, TQ_SLOT(slotDataArrived(TDEProcIO *)));
if (verifyProcess->start(TDEProcess::NotifyOnExit,true)) if (verifyProcess->start(TDEProcess::NotifyOnExit,true))
m_gpgRunning = true; m_gpgRunning = true;
else else
@ -326,10 +326,10 @@ void Security::slotSignFile()
m_secretKey = secretKeys[0]; m_secretKey = secretKeys[0];
//verify the signature //verify the signature
KProcIO *signProcess=new KProcIO(); TDEProcIO *signProcess=new TDEProcIO();
*signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName; *signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName;
connect(signProcess, TQ_SIGNAL(processExited(TDEProcess *)),this, TQ_SLOT(slotProcessExited(TDEProcess *))); connect(signProcess, TQ_SIGNAL(processExited(TDEProcess *)),this, TQ_SLOT(slotProcessExited(TDEProcess *)));
connect(signProcess, TQ_SIGNAL(readReady(KProcIO *)),this, TQ_SLOT(slotDataArrived(KProcIO *))); connect(signProcess, TQ_SIGNAL(readReady(TDEProcIO *)),this, TQ_SLOT(slotDataArrived(TDEProcIO *)));
m_runMode = Sign; m_runMode = Sign;
if (signProcess->start(TDEProcess::NotifyOnExit,true)) if (signProcess->start(TDEProcess::NotifyOnExit,true))
m_gpgRunning = true; m_gpgRunning = true;

@ -21,7 +21,7 @@
#include <tqmap.h> #include <tqmap.h>
#include <tqobject.h> #include <tqobject.h>
class KProcIO; class TDEProcIO;
class TDEProcess; class TDEProcess;
struct KeyStruct { struct KeyStruct {
@ -121,7 +121,7 @@ private:
private slots: private slots:
void slotProcessExited(TDEProcess *process); void slotProcessExited(TDEProcess *process);
void slotDataArrived(KProcIO *process); void slotDataArrived(TDEProcIO *process);
signals: signals:
/** Sent when the validity check is done. /** Sent when the validity check is done.

@ -43,7 +43,7 @@
#include <tdelistview.h> #include <tdelistview.h>
#include <kdebug.h> #include <kdebug.h>
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kprocio.h> #include <tdeprocio.h>
static const char * const lineseparatorstring = I18N_NOOP("--- line separator ---"); static const char * const lineseparatorstring = I18N_NOOP("--- line separator ---");
static const char * const separatorstring = I18N_NOOP("--- separator ---"); static const char * const separatorstring = I18N_NOOP("--- separator ---");
@ -357,7 +357,7 @@ public:
KSeparator *m_comboSeparator; KSeparator *m_comboSeparator;
TQLabel * m_helpArea; TQLabel * m_helpArea;
KPushButton* m_changeIcon; KPushButton* m_changeIcon;
KProcIO* m_kdialogProcess; TDEProcIO* m_kdialogProcess;
bool m_hasKDialog; bool m_hasKDialog;
}; };
@ -1387,7 +1387,7 @@ void KEditToolbarWidget::slotChangeIcon()
if ( d->m_kdialogProcess && d->m_kdialogProcess->isRunning() ) if ( d->m_kdialogProcess && d->m_kdialogProcess->isRunning() )
return; return;
d->m_kdialogProcess = new KProcIO; d->m_kdialogProcess = new TDEProcIO;
TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog")); TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog"));
(*d->m_kdialogProcess) << kdialogExe; (*d->m_kdialogProcess) << kdialogExe;
(*d->m_kdialogProcess) << "--embed"; (*d->m_kdialogProcess) << "--embed";

@ -44,7 +44,7 @@
#include "tdespell.h" #include "tdespell.h"
#include "tdespelldlg.h" #include "tdespelldlg.h"
#include <twin.h> #include <twin.h>
#include <kprocio.h> #include <tdeprocio.h>
#define MAXLINELENGTH 10000 #define MAXLINELENGTH 10000
#undef IGNORE //fix possible conflict #undef IGNORE //fix possible conflict
@ -96,11 +96,11 @@ public:
*/ */
// Connects a slot to KProcIO's output signal // Connects a slot to TDEProcIO's output signal
#define OUTPUT(x) (connect (proc, TQ_SIGNAL (readReady(KProcIO *)), this, TQ_SLOT (x(KProcIO *)))) #define OUTPUT(x) (connect (proc, TQ_SIGNAL (readReady(TDEProcIO *)), this, TQ_SLOT (x(TDEProcIO *))))
// Disconnect a slot from... // Disconnect a slot from...
#define NOOUTPUT(x) (disconnect (proc, TQ_SIGNAL (readReady(KProcIO *)), this, TQ_SLOT (x(KProcIO *)))) #define NOOUTPUT(x) (disconnect (proc, TQ_SIGNAL (readReady(TDEProcIO *)), this, TQ_SLOT (x(TDEProcIO *))))
@ -319,7 +319,7 @@ KSpell::ispellErrors( TDEProcess *, char *buffer, int buflen )
// kdDebug(750) << "ispellErrors [" << buffer << "]\n" << endl; // kdDebug(750) << "ispellErrors [" << buffer << "]\n" << endl;
} }
void KSpell::KSpell2( KProcIO * ) void KSpell::KSpell2( TDEProcIO * )
{ {
TQString line; TQString line;
@ -555,7 +555,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest )
return true; return true;
} }
void KSpell::checkWord2( KProcIO* ) void KSpell::checkWord2( TDEProcIO* )
{ {
TQString word; TQString word;
TQString line; TQString line;
@ -608,7 +608,7 @@ void KSpell::checkNext()
} }
} }
void KSpell::suggestWord( KProcIO * ) void KSpell::suggestWord( TDEProcIO * )
{ {
TQString word; TQString word;
TQString line; TQString line;
@ -800,14 +800,14 @@ bool KSpell::checkList (TQStringList *_wordlist, bool _usedialog)
lastpos = -1; lastpos = -1;
checkList2(); checkList2();
// when checked, KProcIO calls checkList3a // when checked, TDEProcIO calls checkList3a
OUTPUT(checkList3a); OUTPUT(checkList3a);
return true; return true;
} }
void KSpell::checkList2 () void KSpell::checkList2 ()
// send one word from the list to KProcIO // send one word from the list to TDEProcIO
// invoked first time by checkList, later by checkListReplaceCurrent and checkList4 // invoked first time by checkList, later by checkListReplaceCurrent and checkList4
{ {
// send next word // send next word
@ -837,8 +837,8 @@ void KSpell::checkList2 ()
} }
} }
void KSpell::checkList3a (KProcIO *) void KSpell::checkList3a (TDEProcIO *)
// invoked by KProcIO, when data from ispell are read // invoked by TDEProcIO, when data from ispell are read
{ {
//kdDebug(750) << "start of checkList3a" << endl; //kdDebug(750) << "start of checkList3a" << endl;
@ -961,7 +961,7 @@ void KSpell::checkList4 ()
//proc->disconnect(); //proc->disconnect();
//proc->kill(); //proc->kill();
//delete proc; //delete proc;
//proc = new KProcIO( codec ); //proc = new TDEProcIO( codec );
//startIspell(); //startIspell();
return; return;
}; };
@ -1006,7 +1006,7 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog )
newbuffer = origbuffer; newbuffer = origbuffer;
// KProcIO calls check2 when read from ispell // TDEProcIO calls check2 when read from ispell
OUTPUT( check2 ); OUTPUT( check2 );
proc->writeStdin(TQString("!")); proc->writeStdin(TQString("!"));
@ -1033,8 +1033,8 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog )
} }
void KSpell::check2( KProcIO * ) void KSpell::check2( TDEProcIO * )
// invoked by KProcIO when read from ispell // invoked by TDEProcIO when read from ispell
{ {
int e, tempe; int e, tempe;
TQString word; TQString word;
@ -1564,7 +1564,7 @@ void KSpell::initialize( TQWidget *_parent, const TQString &_caption,
// Hack for modal spell checking // Hack for modal spell checking
connect( this, TQ_SIGNAL(ready(KSpell *)), this, TQ_SLOT(slotModalReady()) ); connect( this, TQ_SIGNAL(ready(KSpell *)), this, TQ_SLOT(slotModalReady()) );
proc = new KProcIO( codec ); proc = new TDEProcIO( codec );
startIspell(); startIspell();
} }

@ -27,7 +27,7 @@
#include <tdelibs_export.h> #include <tdelibs_export.h>
class TQTextCodec; class TQTextCodec;
class KProcIO; class TDEProcIO;
class TDEProcess; class TDEProcess;
class KSpellDlg; class KSpellDlg;
@ -447,18 +447,18 @@ signals:
protected slots: protected slots:
/* All of those signals from KProcIO get sent here. */ /* All of those signals from TDEProcIO get sent here. */
void KSpell2 (KProcIO *); void KSpell2 (TDEProcIO *);
void checkWord2 (KProcIO *); void checkWord2 (TDEProcIO *);
void checkWord3 (); void checkWord3 ();
void check2 (KProcIO *); void check2 (TDEProcIO *);
void checkList2 (); void checkList2 ();
void checkList3a (KProcIO *); void checkList3a (TDEProcIO *);
void checkListReplaceCurrent (); void checkListReplaceCurrent ();
void checkList4 (); void checkList4 ();
void dialog2 (int dlgresult); void dialog2 (int dlgresult);
void check3 (); void check3 ();
void suggestWord( KProcIO * ); void suggestWord( TDEProcIO * );
void slotStopCancel (int); void slotStopCancel (int);
void ispellExit (TDEProcess *); void ispellExit (TDEProcess *);
@ -492,7 +492,7 @@ signals:
protected: protected:
KProcIO *proc; TDEProcIO *proc;
TQWidget *parent; TQWidget *parent;
KSpellConfig *ksconfig; KSpellConfig *ksconfig;
KSpellDlg *ksdlg; KSpellDlg *ksdlg;

@ -22,7 +22,7 @@ fakes.c \
kpixmapprovider.cpp \ kpixmapprovider.cpp \
kpalette.cpp \ kpalette.cpp \
tdeprocess.cpp \ tdeprocess.cpp \
kprocio.cpp \ tdeprocio.cpp \
kcrash.cpp \ kcrash.cpp \
kallocator.cpp \ kallocator.cpp \
knotifyclient.cpp \ knotifyclient.cpp \

Loading…
Cancel
Save