diff options
Diffstat (limited to 'certmanager/lib/tests/test_keygen.cpp')
-rw-r--r-- | certmanager/lib/tests/test_keygen.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
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" ); } |