diff options
Diffstat (limited to 'certmanager/lib/tests/test_keylister.cpp')
-rw-r--r-- | certmanager/lib/tests/test_keylister.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/certmanager/lib/tests/test_keylister.cpp b/certmanager/lib/tests/test_keylister.cpp index 9507221e..1f032bb1 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(); } |