Use TDEProcIO class

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

@ -51,7 +51,7 @@
#include <kdialogbase.h>
#include <tdemessagebox.h>
#include <kdebug.h>
#include <kprocio.h>
#include <tdeprocio.h>
#include <tdeglobalsettings.h>
// TQt
@ -274,12 +274,12 @@ void CertificateInfoWidgetImpl::startCertificateDump() {
void CertificateInfoWidgetImpl::slotCollectStdout(TDEProcess *, char *buffer, int buflen)
{
mDumpOutput += TQCString(buffer, buflen+1); // like KProcIO does
mDumpOutput += TQCString(buffer, buflen+1); // like TDEProcIO does
}
void CertificateInfoWidgetImpl::slotCollectStderr(TDEProcess *, char *buffer, int buflen)
{
mDumpError += TQCString(buffer, buflen+1); // like KProcIO does
mDumpError += TQCString(buffer, buflen+1); // like TDEProcIO does
}
void CertificateInfoWidgetImpl::slotDumpProcessExited(TDEProcess* proc) {

@ -43,7 +43,7 @@
#include <tdeapplication.h>
#include <tdeaction.h>
#include <kstdaction.h>
#include <kprocio.h>
#include <tdeprocio.h>
#include <tdeconfig.h>
#include <tdefiledialog.h>
#include <kedittoolbar.h>
@ -68,10 +68,10 @@ KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( TQWidget* parent, const char* name
mCentralWidget->setTextFormat( TQTextEdit::LogText );
setCentralWidget( mCentralWidget );
mWatcher = new KProcIO( TQTextCodec::codecForMib( 106 /*utf-8*/ ) );
mWatcher = new TDEProcIO( TQTextCodec::codecForMib( 106 /*utf-8*/ ) );
connect( mWatcher, TQ_SIGNAL( processExited(TDEProcess*) ),
this, TQ_SLOT( slotWatcherExited() ) );
connect( mWatcher, TQ_SIGNAL( readReady(KProcIO*) ),
connect( mWatcher, TQ_SIGNAL( readReady(TDEProcIO*) ),
this, TQ_SLOT( slotReadStdout() ) );
slotReadConfig();

@ -37,7 +37,7 @@
class KWatchGnuPGTray;
class KWatchGnuPGConfig;
class KProcIO;
class TDEProcIO;
class TQTextEdit;
class KWatchGnuPGMainWindow : public TDEMainWindow {
@ -68,7 +68,7 @@ private:
void startWatcher();
void setGnuPGConfig();
KProcIO* mWatcher;
TDEProcIO* mWatcher;
TQTextEdit* mCentralWidget;
KWatchGnuPGTray* mSysTray;

@ -32,7 +32,7 @@
#include "qgpgmecryptoconfig.h"
#include <kdebug.h>
#include <kprocio.h>
#include <tdeprocio.h>
#include <errno.h>
#include <tdemessagebox.h>
#include <tdelocale.h>
@ -71,12 +71,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
{
// Run gpgconf --list-components to make the list of components
KProcIO proc( TQTextCodec::codecForName( "utf8" ) );
TDEProcIO proc( TQTextCodec::codecForName( "utf8" ) );
proc << "gpgconf"; // must be in the PATH
proc << "--list-components";
TQObject::connect( &proc, TQ_SIGNAL( readReady(KProcIO*) ),
this, TQ_SLOT( slotCollectStdOut(KProcIO*) ) );
TQObject::connect( &proc, TQ_SIGNAL( readReady(TDEProcIO*) ),
this, TQ_SLOT( slotCollectStdOut(TDEProcIO*) ) );
// run the process:
int rc = 0;
@ -100,7 +100,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
mParsed = true;
}
void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc )
void QGpgMECryptoConfig::slotCollectStdOut( TDEProcIO* proc )
{
TQString line;
int result;
@ -166,15 +166,15 @@ void QGpgMECryptoConfigComponent::runGpgConf()
{
// Run gpgconf --list-options <component>, and create all groups and entries for that component
KProcIO proc( TQTextCodec::codecForName( "utf8" ) );
TDEProcIO proc( TQTextCodec::codecForName( "utf8" ) );
proc << "gpgconf"; // must be in the PATH
proc << "--list-options";
proc << mName;
//kdDebug(5150) << "Running gpgconf --list-options " << mName << endl;
TQObject::connect( &proc, TQ_SIGNAL( readReady(KProcIO*) ),
this, TQ_SLOT( slotCollectStdOut(KProcIO*) ) );
TQObject::connect( &proc, TQ_SIGNAL( readReady(TDEProcIO*) ),
this, TQ_SLOT( slotCollectStdOut(TDEProcIO*) ) );
mCurrentGroup = 0;
// run the process:
@ -192,7 +192,7 @@ void QGpgMECryptoConfigComponent::runGpgConf()
}
}
void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc )
void QGpgMECryptoConfigComponent::slotCollectStdOut( TDEProcIO* proc )
{
TQString line;
int result;
@ -265,7 +265,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
line += ":16:";
}
line += '\n';
TQCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading.
TQCString line8bit = line.utf8(); // encode with utf8, and TDEProcIO uses utf8 when reading.
tmpFile.file()->writeBlock( line8bit.data(), line8bit.size()-1 /*no 0*/ );
dirtyEntries.append( it.current() );
}

@ -38,7 +38,7 @@
#include <tqstringlist.h>
#include <tqobject.h>
#include <tqvariant.h>
class KProcIO;
class TDEProcIO;
class QGpgMECryptoConfigComponent;
class QGpgMECryptoConfigEntry;
@ -65,7 +65,7 @@ public:
virtual void sync( bool runtime );
private slots:
void slotCollectStdOut( KProcIO* proc );
void slotCollectStdOut( TDEProcIO* proc );
private:
/// @param showErrors if true, a messagebox will be shown if e.g. gpgconf wasn't found
void runGpgConf( bool showErrors );
@ -95,7 +95,7 @@ public:
void sync( bool runtime );
private slots:
void slotCollectStdOut( KProcIO* proc );
void slotCollectStdOut( TDEProcIO* proc );
private:
void runGpgConf();

Loading…
Cancel
Save