From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- certmanager/lib/tests/test_keygen.cpp | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'certmanager/lib/tests/test_keygen.cpp') diff --git a/certmanager/lib/tests/test_keygen.cpp b/certmanager/lib/tests/test_keygen.cpp index 9303b331..7a751bc1 100644 --- a/certmanager/lib/tests/test_keygen.cpp +++ b/certmanager/lib/tests/test_keygen.cpp @@ -49,12 +49,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -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( "", w ), + glay->addMultiCellWidget( new TQLabel( "", 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( "", w ), + glay->addMultiCellWidget( new TQLabel( "", 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 = "\n"; + TQString params = "\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" ); } -- cgit v1.2.3