summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/tests
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
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')
-rw-r--r--certmanager/lib/tests/gnupgviewer.h12
-rw-r--r--certmanager/lib/tests/test_cryptoconfig.cpp42
-rw-r--r--certmanager/lib/tests/test_gnupgprocessbase.cpp46
-rw-r--r--certmanager/lib/tests/test_jobs.cpp8
-rw-r--r--certmanager/lib/tests/test_keygen.cpp40
-rw-r--r--certmanager/lib/tests/test_keygen.h8
-rw-r--r--certmanager/lib/tests/test_keylister.cpp58
-rw-r--r--certmanager/lib/tests/test_keylister.h2
-rw-r--r--certmanager/lib/tests/test_keyselectiondialog.cpp2
-rw-r--r--certmanager/lib/tests/test_verify.cpp20
10 files changed, 119 insertions, 119 deletions
diff --git a/certmanager/lib/tests/gnupgviewer.h b/certmanager/lib/tests/gnupgviewer.h
index efba1760b..98fb44a61 100644
--- a/certmanager/lib/tests/gnupgviewer.h
+++ b/certmanager/lib/tests/gnupgviewer.h
@@ -33,8 +33,8 @@
#ifndef __KLEO_TESTS_GNUPGVIEWER_H__
#define __KLEO_TESTS_GNUPGVIEWER_H__
-#include <qtextedit.h>
-#include <qstring.h>
+#include <tqtextedit.h>
+#include <tqstring.h>
namespace Kleo {
class GnuPGProcessBase;
@@ -42,10 +42,10 @@ namespace Kleo {
class KProcess;
class QStringList;
-class GnuPGViewer : public QTextEdit {
+class GnuPGViewer : public TQTextEdit {
Q_OBJECT
public:
- GnuPGViewer( QWidget * parent=0, const char * name=0 );
+ GnuPGViewer( TQWidget * parent=0, const char * name=0 );
~GnuPGViewer();
void setProcess( Kleo::GnuPGProcessBase * process );
@@ -53,12 +53,12 @@ public:
private slots:
void slotStdout( KProcess *, char *, int );
void slotStderr( KProcess *, char *, int );
- void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & );
+ void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & );
void slotProcessExited( KProcess * );
private:
Kleo::GnuPGProcessBase * mProcess;
- QString mLastStdout, mLastStderr, mLastStatus;
+ TQString mLastStdout, mLastStderr, mLastStatus;
};
#endif // __KLEO_TESTS_GNUPGVIEWER_H__
diff --git a/certmanager/lib/tests/test_cryptoconfig.cpp b/certmanager/lib/tests/test_cryptoconfig.cpp
index 17d1b4471..4aadb7ff1 100644
--- a/certmanager/lib/tests/test_cryptoconfig.cpp
+++ b/certmanager/lib/tests/test_cryptoconfig.cpp
@@ -50,20 +50,20 @@ int main( int argc, char** argv ) {
// Dynamic querying of the options
cout << "Components:" << endl;
- QStringList components = config->componentList();
+ TQStringList components = config->componentList();
- for( QStringList::Iterator compit = components.begin(); compit != components.end(); ++compit ) {
+ for( TQStringList::Iterator compit = components.begin(); compit != components.end(); ++compit ) {
cout << "Component " << (*compit).local8Bit() << ":" << endl;
const Kleo::CryptoConfigComponent* comp = config->component( *compit );
assert( comp );
- QStringList groups = comp->groupList();
- for( QStringList::Iterator groupit = groups.begin(); groupit != groups.end(); ++groupit ) {
+ TQStringList groups = comp->groupList();
+ for( TQStringList::Iterator groupit = groups.begin(); groupit != groups.end(); ++groupit ) {
const Kleo::CryptoConfigGroup* group = comp->group( *groupit );
assert( group );
cout << " Group " << (*groupit).local8Bit() << ": descr=\"" << group->description().local8Bit() << "\""
<< " level=" << group->level() << endl;
- QStringList entries = group->entryList();
- for( QStringList::Iterator entryit = entries.begin(); entryit != entries.end(); ++entryit ) {
+ TQStringList entries = group->entryList();
+ for( TQStringList::Iterator entryit = entries.begin(); entryit != entries.end(); ++entryit ) {
const Kleo::CryptoConfigEntry* entry = group->entry( *entryit );
assert( entry );
cout << " Entry " << (*entryit).local8Bit() << ":"
@@ -101,20 +101,20 @@ int main( int argc, char** argv ) {
}
case Kleo::CryptoConfigEntry::ArgType_Int: {
assert( entry->isOptional() ); // empty lists must be allowed (see issue121)
- QValueList<int> lst = entry->intValueList();
- QString str;
- for( QValueList<int>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- str += QString::number( *it );
+ TQValueList<int> lst = entry->intValueList();
+ TQString str;
+ for( TQValueList<int>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ str += TQString::number( *it );
}
cout << " int values=" << str.local8Bit();
break;
}
case Kleo::CryptoConfigEntry::ArgType_UInt: {
assert( entry->isOptional() ); // empty lists must be allowed (see issue121)
- QValueList<uint> lst = entry->uintValueList();
- QString str;
- for( QValueList<uint>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- str += QString::number( *it );
+ TQValueList<uint> lst = entry->uintValueList();
+ TQString str;
+ for( TQValueList<uint>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ str += TQString::number( *it );
}
cout << " uint values=" << str.local8Bit();
break;
@@ -132,7 +132,7 @@ int main( int argc, char** argv ) {
// fallthrough
case Kleo::CryptoConfigEntry::ArgType_String: {
assert( entry->isOptional() ); // empty lists must be allowed (see issue121)
- QStringList lst = entry->stringValueList();
+ TQStringList lst = entry->stringValueList();
cout << " string values=" << lst.join(" ").local8Bit();
break;
}
@@ -254,11 +254,11 @@ int main( int argc, char** argv ) {
Kleo::CryptoConfigEntry* entry = config->entry( "dirmngr", s_groupName, s_entryName );
if ( entry ) {
assert( entry->argType() == Kleo::CryptoConfigEntry::ArgType_Path );
- QString val = entry->stringValue();
+ TQString val = entry->stringValue();
cout << "Log-file initially: " << val.local8Bit() << endl;
// Test setting the option, sync'ing, then querying again
- entry->setStringValue( QString::fromUtf8( "/tmp/test:%e5ä" ) );
+ entry->setStringValue( TQString::fromUtf8( "/tmp/test:%e5ä" ) );
assert( entry->isDirty() );
config->sync( true );
@@ -273,14 +273,14 @@ int main( int argc, char** argv ) {
assert( entry );
assert( entry->argType() == Kleo::CryptoConfigEntry::ArgType_Path );
cout << "Log-file now: " << entry->stringValue().local8Bit() << endl;
- assert( entry->stringValue() == QString::fromUtf8( "/tmp/test:%e5ä" ) ); // (or even with %e5 decoded)
+ assert( entry->stringValue() == TQString::fromUtf8( "/tmp/test:%e5ä" ) ); // (or even with %e5 decoded)
// Reset old value
#if 0
- QString arg( val );
+ TQString arg( val );
if ( !arg.isEmpty() )
arg.prepend( '"' );
- QCString sys;
+ TQCString sys;
sys.sprintf( "echo 'log-file:%s' | gpgconf --change-options dirmngr", arg.local8Bit().data() );
system( sys.data() );
#endif
@@ -332,7 +332,7 @@ int main( int argc, char** argv ) {
assert( entry->argType() == Kleo::CryptoConfigEntry::ArgType_LDAPURL );
assert( entry->isList() );
// Get raw a:b:c:d:e form
- QStringList asStringList = entry->stringValueList();
+ TQStringList asStringList = entry->stringValueList();
assert( asStringList.count() == 3 );
cout << "asStringList[0]=" << asStringList[0].local8Bit() << endl;
cout << "asStringList[1]=" << asStringList[1].local8Bit() << endl;
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>" );
}
diff --git a/certmanager/lib/tests/test_jobs.cpp b/certmanager/lib/tests/test_jobs.cpp
index 22d9136d4..dfa17a450 100644
--- a/certmanager/lib/tests/test_jobs.cpp
+++ b/certmanager/lib/tests/test_jobs.cpp
@@ -72,14 +72,14 @@ static void testSign()
Kleo::SignJob* job = proto->signJob( true, true );
- QCString cText = "Hallo Leute\n"; // like gpgme's t-sign.c
- QByteArray plainText;
+ TQCString cText = "Hallo Leute\n"; // like gpgme's t-sign.c
+ TQByteArray plainText;
plainText.duplicate( cText.data(), cText.length() ); // hrmpf...
kdDebug() << k_funcinfo << "plainText=" << cText.data() << endl;
kdDebug() << k_funcinfo << " signing with " << signingKeys[0].primaryFingerprint() << endl;
- QByteArray signature;
+ TQByteArray signature;
const GpgME::SigningResult res =
job->exec( signingKeys, plainText, GpgME::Context::Clearsigned, signature );
if ( res.error().isCanceled() ) {
@@ -91,7 +91,7 @@ static void testSign()
return;
}
kdDebug() << k_funcinfo << "signing resulted in signature="
- << QCString( signature.data(), signature.size() + 1 ) << endl;
+ << TQCString( signature.data(), signature.size() + 1 ) << endl;
}
int main( int argc, char** argv ) {
diff --git a/certmanager/lib/tests/test_keygen.cpp b/certmanager/lib/tests/test_keygen.cpp
index 9303b331c..7a751bc1d 100644
--- a/certmanager/lib/tests/test_keygen.cpp
+++ b/certmanager/lib/tests/test_keygen.cpp
@@ -49,12 +49,12 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqmessagebox.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <assert.h>
@@ -69,40 +69,40 @@ static const int numKeyParams = sizeof keyParams / sizeof *keyParams;
static const char * protocol = 0;
-KeyGenerator::KeyGenerator( QWidget * parent, const char * name, WFlags )
+KeyGenerator::KeyGenerator( TQWidget * parent, const char * name, WFlags )
: KDialogBase( parent, name, true, "KeyGenerationJob test",
Close|User1, User1, true, KGuiItem( "Create" ) )
{
- QWidget * w = new QWidget( this );
+ TQWidget * w = new TQWidget( this );
setMainWidget( w );
- QGridLayout * glay = new QGridLayout( w, numKeyParams+3, 2, marginHint(), spacingHint() );
+ TQGridLayout * glay = new TQGridLayout( w, numKeyParams+3, 2, marginHint(), spacingHint() );
int row = -1;
++row;
- glay->addMultiCellWidget( new QLabel( "<GnupgKeyParms format=\"internal\">", w ),
+ glay->addMultiCellWidget( new TQLabel( "<GnupgKeyParms format=\"internal\">", w ),
row, row, 0, 1 );
for ( int i = 0 ; i < numKeyParams ; ++i ) {
++row;
- glay->addWidget( new QLabel( keyParams[i], w ), row, 0 );
- glay->addWidget( mLineEdits[i] = new QLineEdit( w ), row, 1 );
+ glay->addWidget( new TQLabel( keyParams[i], w ), row, 0 );
+ glay->addWidget( mLineEdits[i] = new TQLineEdit( w ), row, 1 );
}
++row;
- glay->addMultiCellWidget( new QLabel( "</GnupgKeyParms>", w ),
+ glay->addMultiCellWidget( new TQLabel( "</GnupgKeyParms>", w ),
row, row, 0, 1 );
++row;
glay->setRowStretch( row, 1 );
glay->setColStretch( 1, 1 );
- connect( this, SIGNAL(user1Clicked()), SLOT(slotStartKeyGeneration()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotStartKeyGeneration()) );
}
KeyGenerator::~KeyGenerator() {}
void KeyGenerator::slotStartKeyGeneration() {
- QString params = "<GnupgKeyParms format=\"internal\">\n";
+ TQString params = "<GnupgKeyParms format=\"internal\">\n";
for ( int i = 0 ; i < numKeyParams ; ++i )
if ( mLineEdits[i] && !mLineEdits[i]->text().stripWhiteSpace().isEmpty() )
params += keyParams[i] + ( ": " + mLineEdits[i]->text().stripWhiteSpace() ) + '\n';
@@ -118,8 +118,8 @@ void KeyGenerator::slotStartKeyGeneration() {
Kleo::KeyGenerationJob * job = proto->keyGenerationJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::KeyGenerationResult&,const QByteArray&)),
- SLOT(slotResult(const GpgME::KeyGenerationResult&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyGenerationResult&,const TQByteArray&)),
+ TQT_SLOT(slotResult(const GpgME::KeyGenerationResult&,const TQByteArray&)) );
const GpgME::Error err = job->start( params );
if ( err )
@@ -129,15 +129,15 @@ void KeyGenerator::slotStartKeyGeneration() {
}
void KeyGenerator::showError( const GpgME::Error & err ) {
- KMessageBox::error( this, "Could not start key generation: " + QString::fromLocal8Bit( err.asString() ),
+ KMessageBox::error( this, "Could not start key generation: " + TQString::fromLocal8Bit( err.asString() ),
"Key Generation Error" );
}
-void KeyGenerator::slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData ) {
+void KeyGenerator::slotResult( const GpgME::KeyGenerationResult & res, const TQByteArray & keyData ) {
if ( res.error() )
showError( res.error() );
else
- KMessageBox::information( this, QString("Key generated successfully, %1 bytes long").arg( keyData.size() ),
+ KMessageBox::information( this, TQString("Key generated successfully, %1 bytes long").arg( keyData.size() ),
"Key Generation Finished" );
}
diff --git a/certmanager/lib/tests/test_keygen.h b/certmanager/lib/tests/test_keygen.h
index 0ba713823..80aec1e6f 100644
--- a/certmanager/lib/tests/test_keygen.h
+++ b/certmanager/lib/tests/test_keygen.h
@@ -34,7 +34,7 @@
#include <kdialogbase.h>
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -46,17 +46,17 @@ class QLineEdit;
class KeyGenerator : public KDialogBase {
Q_OBJECT
public:
- KeyGenerator( QWidget * parent=0, const char * name=0, WFlags f=0 );
+ KeyGenerator( TQWidget * parent=0, const char * name=0, WFlags f=0 );
~KeyGenerator();
public slots:
void slotStartKeyGeneration();
- void slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData );
+ void slotResult( const GpgME::KeyGenerationResult & res, const TQByteArray & keyData );
private:
void showError( const GpgME::Error & err );
private:
- QLineEdit * mLineEdits[20];
+ TQLineEdit * mLineEdits[20];
};
#endif // __KLEO_TEST_KEYGEN_H__
diff --git a/certmanager/lib/tests/test_keylister.cpp b/certmanager/lib/tests/test_keylister.cpp
index 9507221e7..1f032bb17 100644
--- a/certmanager/lib/tests/test_keylister.cpp
+++ b/certmanager/lib/tests/test_keylister.cpp
@@ -45,9 +45,9 @@
#include <kcmdlineargs.h>
#include <kdebug.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqmessagebox.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <assert.h>
@@ -55,12 +55,12 @@ namespace {
class TestColumnStrategy : public Kleo::KeyListView::ColumnStrategy {
public:
~TestColumnStrategy() {}
- QString title( int col ) const;
- QString toolTip( const GpgME::Key & key, int col ) const;
- QString text( const GpgME::Key & key, int col ) const;
+ TQString title( int col ) const;
+ TQString toolTip( const GpgME::Key & key, int col ) const;
+ TQString text( const GpgME::Key & key, int col ) const;
};
- QString TestColumnStrategy::title( int col ) const {
+ TQString TestColumnStrategy::title( int col ) const {
switch ( col ) {
case 0: return "Subject";
case 1: return "EMail";
@@ -68,30 +68,30 @@ namespace {
case 3: return "Serial";
case 4: return "Protocol";
case 5: return "Validity";
- default: return QString::null;
+ default: return TQString::null;
}
}
- QString TestColumnStrategy::toolTip( const GpgME::Key & key, int ) const {
- return "Fingerprint: " + QString::fromUtf8( key.primaryFingerprint() );
+ TQString TestColumnStrategy::toolTip( const GpgME::Key & key, int ) const {
+ return "Fingerprint: " + TQString::fromUtf8( key.primaryFingerprint() );
}
- QString TestColumnStrategy::text( const GpgME::Key & key, int col ) const {
+ TQString TestColumnStrategy::text( const GpgME::Key & key, int col ) const {
if ( key.isNull() )
return "<null>";
switch ( col ) {
- case 0: return QString::fromUtf8( key.userID(0).id() );
- case 1: return QString::fromUtf8( key.userID(0).email() );
- case 2: return QString::fromUtf8( key.issuerName() );
+ case 0: return TQString::fromUtf8( key.userID(0).id() );
+ case 1: return TQString::fromUtf8( key.userID(0).email() );
+ case 2: return TQString::fromUtf8( key.issuerName() );
case 3: return key.issuerSerial();
case 4: return key.protocolAsString();
- case 5: return QChar( key.userID(0).validityAsString() );
- default: return QString::null;
+ case 5: return TQChar( key.userID(0).validityAsString() );
+ default: return TQString::null;
}
}
}
-CertListView::CertListView( QWidget * parent, const char * name, WFlags f )
+CertListView::CertListView( TQWidget * parent, const char * name, WFlags f )
: Kleo::KeyListView( new TestColumnStrategy(), 0, parent, name, f )
{
setHierarchical( true );
@@ -101,30 +101,30 @@ CertListView::CertListView( QWidget * parent, const char * name, WFlags f )
void CertListView::slotResult( const GpgME::KeyListResult & result ) {
kdDebug() << "CertListView::slotResult()" << endl;
if ( result.isNull() )
- QMessageBox::information( this, "Key Listing Result", "KeyListResult is null!" );
+ TQMessageBox::information( this, "Key Listing Result", "KeyListResult is null!" );
else if ( result.error() )
- QMessageBox::critical( this, "Key Listing Result",
- QString("KeyListResult Error: %1").arg( result.error().asString() ) );
+ TQMessageBox::critical( this, "Key Listing Result",
+ TQString("KeyListResult Error: %1").arg( result.error().asString() ) );
else if ( result.isTruncated() )
- QMessageBox::information( this, "Key Listing Result", "KeyListResult is truncated!" );
+ TQMessageBox::information( this, "Key Listing Result", "KeyListResult is truncated!" );
else
- QMessageBox::information( this, "Key Listing Result", "Key listing successful" );
+ TQMessageBox::information( this, "Key Listing Result", "Key listing successful" );
}
void CertListView::slotStart() {
kdDebug() << "CertListView::slotStart()" << endl;
Kleo::KeyListJob * job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( false );
assert( job );
- QObject::connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- this, SLOT(slotAddKey(const GpgME::Key&)) );
- QObject::connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- this, SLOT(slotResult(const GpgME::KeyListResult&)) );
+ TQObject::connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ this, TQT_SLOT(slotAddKey(const GpgME::Key&)) );
+ TQObject::connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ this, TQT_SLOT(slotResult(const GpgME::KeyListResult&)) );
#if 0
- QStringList l;
+ TQStringList l;
l << "Marc";
job->start( l, false );
#else
- job->start( QStringList(), false );
+ job->start( TQStringList(), false );
#endif
}
@@ -138,7 +138,7 @@ int main( int argc, char** argv ) {
app.setMainWidget( clv );
clv->show();
- QTimer::singleShot( 5000, clv, SLOT(slotStart()) );
+ TQTimer::singleShot( 5000, clv, TQT_SLOT(slotStart()) );
return app.exec();
}
diff --git a/certmanager/lib/tests/test_keylister.h b/certmanager/lib/tests/test_keylister.h
index 348ec262f..23cd99e3e 100644
--- a/certmanager/lib/tests/test_keylister.h
+++ b/certmanager/lib/tests/test_keylister.h
@@ -42,7 +42,7 @@ namespace GpgME {
class CertListView : public Kleo::KeyListView {
Q_OBJECT
public:
- CertListView( QWidget * parent=0, const char * name=0, WFlags f=0 );
+ CertListView( TQWidget * parent=0, const char * name=0, WFlags f=0 );
public slots:
void slotResult( const GpgME::KeyListResult & result );
diff --git a/certmanager/lib/tests/test_keyselectiondialog.cpp b/certmanager/lib/tests/test_keyselectiondialog.cpp
index e6c85fca0..1e3794bc6 100644
--- a/certmanager/lib/tests/test_keyselectiondialog.cpp
+++ b/certmanager/lib/tests/test_keyselectiondialog.cpp
@@ -55,7 +55,7 @@ int main( int argc, char ** argv ) {
std::vector<GpgME::Key>(),
Kleo::KeySelectionDialog::AllKeys, true, true );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
kdDebug() << "accepted; selected key: " << (dlg.selectedKey().userID(0).id() ? dlg.selectedKey().userID(0).id() : "<null>") << "\nselected _keys_:" << endl;
for ( std::vector<GpgME::Key>::const_iterator it = dlg.selectedKeys().begin() ; it != dlg.selectedKeys().end() ; ++it )
kdDebug() << (it->userID(0).id() ? it->userID(0).id() : "<null>") << endl;
diff --git a/certmanager/lib/tests/test_verify.cpp b/certmanager/lib/tests/test_verify.cpp
index a81e50466..54a88b4c2 100644
--- a/certmanager/lib/tests/test_verify.cpp
+++ b/certmanager/lib/tests/test_verify.cpp
@@ -41,8 +41,8 @@
#include <kapplication.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <assert.h>
@@ -50,18 +50,18 @@ int main( int argc, char **argv )
{
setenv("GNUPGHOME", KDESRCDIR "/gnupg_home", 1 );
setenv("LC_ALL", "C", 1);
- setenv("KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-unit-test" ), 1);
+ setenv("KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-unit-test" ), 1);
KAboutData aboutData( "test_verify", "verify job test", "0.1" );
KCmdLineArgs::init( argc, argv, &aboutData );
KApplication app( false, false );
- const QString sigFileName = KDESRCDIR "/test.data.sig";
- const QString dataFileName = KDESRCDIR "/test.data";
+ const TQString sigFileName = KDESRCDIR "/test.data.sig";
+ const TQString dataFileName = KDESRCDIR "/test.data";
- QFile sigFile( sigFileName );
+ TQFile sigFile( sigFileName );
assert( sigFile.open( IO_ReadOnly ) );
- QFile dataFile( dataFileName );
+ TQFile dataFile( dataFileName );
assert( dataFile.open( IO_ReadOnly ) );
const Kleo::CryptoBackend::Protocol * const backend = Kleo::CryptoBackendFactory::instance()->protocol( "openpgp" );
@@ -76,10 +76,10 @@ int main( int argc, char **argv )
assert( sig.creationTime() == 1189650248L );
assert( sig.validity() == GpgME::Signature::Full );
- const QString opaqueFileName = KDESRCDIR "/test.data.gpg";
- QFile opaqueFile( opaqueFileName );
+ const TQString opaqueFileName = KDESRCDIR "/test.data.gpg";
+ TQFile opaqueFile( opaqueFileName );
assert( opaqueFile.open( IO_ReadOnly ) );
- QByteArray clearText;
+ TQByteArray clearText;
Kleo::VerifyOpaqueJob *job2 = backend->verifyOpaqueJob();
result = job2->exec( opaqueFile.readAll(), clearText );