summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/tests/test_gnupgprocessbase.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /certmanager/lib/tests/test_gnupgprocessbase.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/tests/test_gnupgprocessbase.cpp')
-rw-r--r--certmanager/lib/tests/test_gnupgprocessbase.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp
index 37e961801..29ca483f1 100644
--- a/certmanager/lib/tests/test_gnupgprocessbase.cpp
+++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp
@@ -44,10 +44,10 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
-GnuPGViewer::GnuPGViewer( QWidget * parent, const char * name )
- : QTextEdit( parent, name ), mProcess( 0 )
+GnuPGViewer::GnuPGViewer( TQWidget * parent, const char * name )
+ : TQTextEdit( parent, name ), mProcess( 0 )
{
setTextFormat( LogText );
setMaxLogLines( 10000 );
@@ -62,24 +62,24 @@ void GnuPGViewer::setProcess( Kleo::GnuPGProcessBase * process ) {
if ( !process )
return;
mProcess = process;
- connect( mProcess, SIGNAL(processExited(KProcess*)),
- SLOT(slotProcessExited(KProcess*)) );
- connect( mProcess, SIGNAL(receivedStdout(KProcess*,char*,int)),
- SLOT(slotStdout(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(receivedStderr(KProcess*,char*,int)),
- SLOT(slotStderr(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)),
- SLOT(slotStatus(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)) );
+ connect( mProcess, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotProcessExited(KProcess*)) );
+ connect( mProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ TQT_SLOT(slotStdout(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ TQT_SLOT(slotStderr(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)),
+ TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) );
}
-static QStringList split( char * buffer, int buflen, QString & old ) {
- // when done right, this would need to use QTextCodec...
- const QString str = old + QString::fromLocal8Bit( buffer, buflen );
- QStringList l = QStringList::split( '\n', str, true );
+static TQStringList split( char * buffer, int buflen, TQString & old ) {
+ // when done right, this would need to use TQTextCodec...
+ const TQString str = old + TQString::fromLocal8Bit( buffer, buflen );
+ TQStringList l = TQStringList::split( '\n', str, true );
if ( l.empty() )
return l;
if ( str.endsWith( "\n" ) ) {
- old = QString::null;
+ old = TQString::null;
} else {
old = l.back();
l.pop_back();
@@ -87,29 +87,29 @@ static QStringList split( char * buffer, int buflen, QString & old ) {
return l;
}
-static QString escape( QString str ) {
+static TQString escape( TQString str ) {
return str.replace( '&', "&amp" ).replace( '<', "&lt;" ).replace( '>', "&gt;" );
}
void GnuPGViewer::slotStdout( KProcess *, char * buffer, int buflen ) {
- const QStringList l = split( buffer, buflen, mLastStdout );
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
+ const TQStringList l = split( buffer, buflen, mLastStdout );
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
append( "stdout: " + escape( *it ) );
}
void GnuPGViewer::slotStderr( KProcess *, char * buffer, int buflen ) {
- const QStringList l = split( buffer, buflen, mLastStderr );
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
+ const TQStringList l = split( buffer, buflen, mLastStderr );
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
append( "<b>stderr: " + escape( *it ) + "</b>" );
}
-void GnuPGViewer::slotStatus( Kleo::GnuPGProcessBase *, const QString & type, const QStringList & args ) {
+void GnuPGViewer::slotStatus( Kleo::GnuPGProcessBase *, const TQString & type, const TQStringList & args ) {
append( "<b><font color=\"red\">status: " + escape( type + ' ' + args.join( " " ) ) + "</font></b>" );
}
void GnuPGViewer::slotProcessExited( KProcess * proc ) {
if ( !proc )
return;
if ( proc->normalExit() )
- append( QString( "<b>Process exit: return code %1</b>" ).arg ( proc->exitStatus() ) );
+ append( TQString( "<b>Process exit: return code %1</b>" ).arg ( proc->exitStatus() ) );
else
append( "<b>Process exit: killed</b>" );
}