diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /certmanager | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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')
173 files changed, 2685 insertions, 2685 deletions
diff --git a/certmanager/certificateinfowidgetimpl.cpp b/certmanager/certificateinfowidgetimpl.cpp index c6e810109..4367cd667 100644 --- a/certmanager/certificateinfowidgetimpl.cpp +++ b/certmanager/certificateinfowidgetimpl.cpp @@ -55,21 +55,21 @@ #include <kglobalsettings.h> // Qt -#include <qlistview.h> -#include <qtextedit.h> -#include <qheader.h> -#include <qpushbutton.h> -#include <qcursor.h> -#include <qapplication.h> -#include <qdatetime.h> -#include <qstylesheet.h> -#include <qtextcodec.h> +#include <tqlistview.h> +#include <tqtextedit.h> +#include <tqheader.h> +#include <tqpushbutton.h> +#include <tqcursor.h> +#include <tqapplication.h> +#include <tqdatetime.h> +#include <tqstylesheet.h> +#include <tqtextcodec.h> // other #include <assert.h> CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bool external, - QWidget * parent, const char * name ) + TQWidget * parent, const char * name ) : CertificateInfoWidget( parent, name ), mExternal( external ), mFoundIssuer( true ), @@ -77,24 +77,24 @@ CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bo { importButton->setEnabled( false ); - listView->setColumnWidthMode( 1, QListView::Maximum ); - QFontMetrics fm = fontMetrics(); + listView->setColumnWidthMode( 1, TQListView::Maximum ); + TQFontMetrics fm = fontMetrics(); listView->setColumnWidth( 1, fm.width( i18n("Information") ) * 5 ); listView->header()->setClickEnabled( false ); listView->setSorting( -1 ); - connect( listView, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( slotShowInfo( QListViewItem* ) ) ); - pathView->setColumnWidthMode( 0, QListView::Maximum ); + connect( listView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( slotShowInfo( TQListViewItem* ) ) ); + pathView->setColumnWidthMode( 0, TQListView::Maximum ); pathView->header()->hide(); - connect( pathView, SIGNAL( doubleClicked( QListViewItem* ) ), - this, SLOT( slotShowCertPathDetails( QListViewItem* ) ) ); - connect( pathView, SIGNAL( returnPressed( QListViewItem* ) ), - this, SLOT( slotShowCertPathDetails( QListViewItem* ) ) ); - connect( importButton, SIGNAL( clicked() ), - this, SLOT( slotImportCertificate() ) ); + connect( pathView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ), + this, TQT_SLOT( slotShowCertPathDetails( TQListViewItem* ) ) ); + connect( pathView, TQT_SIGNAL( returnPressed( TQListViewItem* ) ), + this, TQT_SLOT( slotShowCertPathDetails( TQListViewItem* ) ) ); + connect( importButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImportCertificate() ) ); dumpView->setFont( KGlobalSettings::fixedFont() ); @@ -102,8 +102,8 @@ CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bo setKey( key ); } -static QString time_t2string( time_t t ) { - QDateTime dt; +static TQString time_t2string( time_t t ) { + TQDateTime dt; dt.setTime_t( t ); return dt.toString(); } @@ -124,26 +124,26 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) { startKeyExistanceCheck(); // starts a local keylisting to enable the // importButton if needed - QListViewItem * item = 0; - item = new QListViewItem( listView, item, i18n("Valid"), QString("From %1 to %2") + TQListViewItem * item = 0; + item = new TQListViewItem( listView, item, i18n("Valid"), TQString("From %1 to %2") .arg( time_t2string( key.subkey(0).creationTime() ), time_t2string( key.subkey(0).expirationTime() ) ) ); - item = new QListViewItem( listView, item, i18n("Can be used for signing"), + item = new TQListViewItem( listView, item, i18n("Can be used for signing"), key.canSign() ? i18n("Yes") : i18n("No") ); - item = new QListViewItem( listView, item, i18n("Can be used for encryption"), + item = new TQListViewItem( listView, item, i18n("Can be used for encryption"), key.canEncrypt() ? i18n("Yes") : i18n("No") ); - item = new QListViewItem( listView, item, i18n("Can be used for certification"), + item = new TQListViewItem( listView, item, i18n("Can be used for certification"), key.canCertify() ? i18n("Yes") : i18n("No") ); - item = new QListViewItem( listView, item, i18n("Can be used for authentication"), + item = new TQListViewItem( listView, item, i18n("Can be used for authentication"), key.canAuthenticate() ? i18n("Yes") : i18n("No" ) ); - item = new QListViewItem( listView, item, i18n("Fingerprint"), key.primaryFingerprint() ); - item = new QListViewItem( listView, item, i18n("Issuer"), Kleo::DN( key.issuerName() ).prettyDN() ); - item = new QListViewItem( listView, item, i18n("Serial Number"), key.issuerSerial() ); + item = new TQListViewItem( listView, item, i18n("Fingerprint"), key.primaryFingerprint() ); + item = new TQListViewItem( listView, item, i18n("Issuer"), Kleo::DN( key.issuerName() ).prettyDN() ); + item = new TQListViewItem( listView, item, i18n("Serial Number"), key.issuerSerial() ); const Kleo::DN dn = key.userID(0).id(); // FIXME: use the attributeLabelMap from certificatewizardimpl.cpp: - static QMap<QString,QString> dnComponentNames; + static TQMap<TQString,TQString> dnComponentNames; if ( dnComponentNames.isEmpty() ) { dnComponentNames["C"] = i18n("Country"); dnComponentNames["OU"] = i18n("Organizational Unit"); @@ -154,26 +154,26 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) { } for ( Kleo::DN::const_iterator dnit = dn.begin() ; dnit != dn.end() ; ++dnit ) { - QString displayName = (*dnit).name(); + TQString displayName = (*dnit).name(); if( dnComponentNames.contains(displayName) ) displayName = dnComponentNames[displayName]; - item = new QListViewItem( listView, item, displayName, (*dnit).value() ); + item = new TQListViewItem( listView, item, displayName, (*dnit).value() ); } const std::vector<GpgME::UserID> uids = key.userIDs(); if ( !uids.empty() ) { - item = new QListViewItem( listView, item, i18n("Subject"), + item = new TQListViewItem( listView, item, i18n("Subject"), Kleo::DN( uids.front().id() ).prettyDN() ); for ( std::vector<GpgME::UserID>::const_iterator it = uids.begin() + 1 ; it != uids.end() ; ++it ) { if ( !(*it).id() ) continue; - const QString email = QString::fromUtf8( (*it).id() ).stripWhiteSpace(); + const TQString email = TQString::fromUtf8( (*it).id() ).stripWhiteSpace(); if ( email.isEmpty() ) continue; if ( email.startsWith( "<" ) ) - item = new QListViewItem( listView, item, i18n("Email"), + item = new TQListViewItem( listView, item, i18n("Email"), email.mid( 1, email.length()-2 ) ); else - item = new QListViewItem( listView, item, i18n("A.k.a."), email ); + item = new TQListViewItem( listView, item, i18n("A.k.a."), email ); } } @@ -182,13 +182,13 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) { startCertificateDump(); } -static void showChainListError( QWidget * parent, const GpgME::Error & err, const char * subject ) { +static void showChainListError( TQWidget * parent, const GpgME::Error & err, const char * subject ) { assert( err ); - const QString msg = i18n("<qt><p>An error occurred while fetching " + const TQString msg = i18n("<qt><p>An error occurred while fetching " "the certificate <b>%1</b> from the backend:</p>" "<p><b>%2</b></p></qt>") - .arg( subject ? QString::fromUtf8( subject ) : QString::null, - QString::fromLocal8Bit( err.asString() ) ); + .arg( subject ? TQString::fromUtf8( subject ) : TQString::null, + TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n("Certificate Listing Failed" ) ); } @@ -232,10 +232,10 @@ void CertificateInfoWidgetImpl::startCertificateChainListing() { Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( false ); assert( job ); - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - SLOT(slotCertificateChainListingResult(const GpgME::KeyListResult&)) ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), - SLOT(slotNextKey(const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + TQT_SLOT(slotCertificateChainListingResult(const GpgME::KeyListResult&)) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), + TQT_SLOT(slotNextKey(const GpgME::Key&)) ); kdDebug() << "Going to fetch" << endl << " issuer : \"" << mChain.front().issuerName() << "\"" << endl @@ -258,46 +258,46 @@ void CertificateInfoWidgetImpl::startCertificateDump() { (*proc) << "--dump-keys"; (*proc) << mChain.front().primaryFingerprint(); - QObject::connect( proc, SIGNAL( receivedStdout(KProcess *, char *, int) ), - this, SLOT( slotCollectStdout(KProcess *, char *, int) ) ); - QObject::connect( proc, SIGNAL( receivedStderr(KProcess *, char *, int) ), - this, SLOT( slotCollectStderr(KProcess *, char *, int) ) ); - QObject::connect( proc, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotDumpProcessExited(KProcess*) ) ); + TQObject::connect( proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int) ), + this, TQT_SLOT( slotCollectStdout(KProcess *, char *, int) ) ); + TQObject::connect( proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int) ), + this, TQT_SLOT( slotCollectStderr(KProcess *, char *, int) ) ); + TQObject::connect( proc, TQT_SIGNAL( processExited(KProcess*) ), + this, TQT_SLOT( slotDumpProcessExited(KProcess*) ) ); if ( !proc->start( KProcess::NotifyOnExit, (KProcess::Communication)(KProcess::Stdout | KProcess::Stderr) ) ) { - QString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) ); - dumpView->setText( QStyleSheet::escape( wmsg ) ); + TQString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) ); + dumpView->setText( TQStyleSheet::escape( wmsg ) ); delete proc; } } void CertificateInfoWidgetImpl::slotCollectStdout(KProcess *, char *buffer, int buflen) { - mDumpOutput += QCString(buffer, buflen+1); // like KProcIO does + mDumpOutput += TQCString(buffer, buflen+1); // like KProcIO does } void CertificateInfoWidgetImpl::slotCollectStderr(KProcess *, char *buffer, int buflen) { - mDumpError += QCString(buffer, buflen+1); // like KProcIO does + mDumpError += TQCString(buffer, buflen+1); // like KProcIO does } void CertificateInfoWidgetImpl::slotDumpProcessExited(KProcess* proc) { int rc = ( proc->normalExit() ) ? proc->exitStatus() : -1 ; if ( rc == 0 ) { - dumpView->setText( QStyleSheet::escape( QString::fromUtf8( mDumpOutput ) ) ); + dumpView->setText( TQStyleSheet::escape( TQString::fromUtf8( mDumpOutput ) ) ); } else { if ( !mDumpError.isEmpty() ) { - dumpView->setText( QStyleSheet::escape( QString::fromUtf8( mDumpError ) ) ); + dumpView->setText( TQStyleSheet::escape( TQString::fromUtf8( mDumpError ) ) ); } else { - QString wmsg = i18n("Failed to execute gpgsm:\n%1"); + TQString wmsg = i18n("Failed to execute gpgsm:\n%1"); if ( rc == -1 ) wmsg = wmsg.arg( i18n( "program cannot be executed" ) ); else wmsg = wmsg.arg( strerror(rc) ); - dumpView->setText( QStyleSheet::escape( wmsg ) ); + dumpView->setText( TQStyleSheet::escape( wmsg ) ); } } @@ -320,14 +320,14 @@ void CertificateInfoWidgetImpl::updateChainView() { pathView->clear(); if ( mChain.empty() ) return; - QListViewItem * item = 0; + TQListViewItem * item = 0; - QValueList<GpgME::Key>::const_iterator it = mChain.begin(); + TQValueList<GpgME::Key>::const_iterator it = mChain.begin(); // root item: if ( (*it).chainID() && qstrcmp( (*it).chainID(), (*it).primaryFingerprint() ) == 0 ) - item = new QListViewItem( pathView, Kleo::DN( (*it++).userID(0).id() ).prettyDN() ); + item = new TQListViewItem( pathView, Kleo::DN( (*it++).userID(0).id() ).prettyDN() ); else { - item = new QListViewItem( pathView, i18n("Issuer certificate not found ( %1)") + item = new TQListViewItem( pathView, i18n("Issuer certificate not found ( %1)") .arg( Kleo::DN( (*it).issuerName() ).prettyDN() ) ); item->setOpen( true ); // Qt bug: doesn't open after setEnabled( false ) :/ item->setEnabled( false ); @@ -336,7 +336,7 @@ void CertificateInfoWidgetImpl::updateChainView() { // subsequent items: while ( it != mChain.end() ) { - item = new QListViewItem( item, Kleo::DN( (*it++).userID(0).id() ).prettyDN() ); + item = new TQListViewItem( item, Kleo::DN( (*it++).userID(0).id() ).prettyDN() ); item->setOpen( true ); } } @@ -348,11 +348,11 @@ void CertificateInfoWidgetImpl::slotCertificateChainListingResult( const GpgME:: startCertificateChainListing(); } -void CertificateInfoWidgetImpl::slotShowInfo( QListViewItem * item ) { +void CertificateInfoWidgetImpl::slotShowInfo( TQListViewItem * item ) { textView->setText( item->text(1) ); } -void CertificateInfoWidgetImpl::slotShowCertPathDetails( QListViewItem * item ) { +void CertificateInfoWidgetImpl::slotShowCertPathDetails( TQListViewItem * item ) { if ( !item ) return; @@ -362,7 +362,7 @@ void CertificateInfoWidgetImpl::slotShowCertPathDetails( QListViewItem * item ) // widget spec for Kleo::KeyListView. unsigned int totalCount = 0; int itemIndex = -1; - for ( const QListViewItem * i = pathView->firstChild() ; i ; i = i->firstChild() ) { + for ( const TQListViewItem * i = pathView->firstChild() ; i ; i = i->firstChild() ) { if ( i == item ) itemIndex = totalCount; ++totalCount; @@ -383,8 +383,8 @@ void CertificateInfoWidgetImpl::slotShowCertPathDetails( QListViewItem * item ) new CertificateInfoWidgetImpl( mChain[itemIndex], mExternal, dialog ); dialog->setMainWidget( top ); // proxy the signal to our receiver: - connect( top, SIGNAL(requestCertificateDownload(const QString&, const QString&)), - SIGNAL(requestCertificateDownload(const QString&, const QString&)) ); + connect( top, TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)), + TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)) ); dialog->show(); } @@ -405,7 +405,7 @@ void CertificateInfoWidgetImpl::startKeyExistanceCheck() { if ( mChain.empty() || mChain.back().isNull() ) // need a key to look for return; - const QString fingerprint = mChain.back().primaryFingerprint(); + const TQString fingerprint = mChain.back().primaryFingerprint(); if ( fingerprint.isEmpty() ) // empty pattern means list all keys. We don't want that return; @@ -415,10 +415,10 @@ void CertificateInfoWidgetImpl::startKeyExistanceCheck() { Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( false ); assert( job ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), - SLOT(slotKeyExistanceCheckNextCandidate(const GpgME::Key&)) ); - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - SLOT(slotKeyExistanceCheckFinished()) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), + TQT_SLOT(slotKeyExistanceCheckNextCandidate(const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + TQT_SLOT(slotKeyExistanceCheckFinished()) ); // nor to check for errors: job->start( fingerprint ); } diff --git a/certmanager/certificateinfowidgetimpl.h b/certmanager/certificateinfowidgetimpl.h index 961d67c39..9123d2c64 100644 --- a/certmanager/certificateinfowidgetimpl.h +++ b/certmanager/certificateinfowidgetimpl.h @@ -37,7 +37,7 @@ #include <gpgmepp/key.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class KProcess; class QListViewItem; @@ -50,16 +50,16 @@ class CertificateInfoWidgetImpl : public CertificateInfoWidget { Q_OBJECT public: CertificateInfoWidgetImpl( const GpgME::Key & key, bool external, - QWidget * parent=0, const char * name=0); + TQWidget * parent=0, const char * name=0); void setKey( const GpgME::Key & key ); signals: - void requestCertificateDownload( const QString & fingerprint, const QString& displayName ); + void requestCertificateDownload( const TQString & fingerprint, const TQString& displayName ); private slots: - void slotShowInfo( QListViewItem* ); - void slotShowCertPathDetails( QListViewItem* ); + void slotShowInfo( TQListViewItem* ); + void slotShowCertPathDetails( TQListViewItem* ); void slotImportCertificate(); void slotCertificateChainListingResult( const GpgME::KeyListResult & res ); void slotNextKey( const GpgME::Key & key ); @@ -76,9 +76,9 @@ private: void updateChainView(); private: - QCString mDumpOutput; - QCString mDumpError; - QValueList<GpgME::Key> mChain; + TQCString mDumpOutput; + TQCString mDumpError; + TQValueList<GpgME::Key> mChain; bool mExternal; bool mFoundIssuer; bool mHaveKeyLocally; diff --git a/certmanager/certificatewizardimpl.cpp b/certmanager/certificatewizardimpl.cpp index a88c54d84..bb31d5c3e 100644 --- a/certmanager/certificatewizardimpl.cpp +++ b/certmanager/certificatewizardimpl.cpp @@ -64,14 +64,14 @@ #include <kio/netaccess.h> // Qt -#include <qlineedit.h> -#include <qtextedit.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <assert.h> #include <dcopref.h> @@ -81,10 +81,10 @@ static const unsigned int keyLengths[] = { }; static const unsigned int numKeyLengths = sizeof keyLengths / sizeof *keyLengths; -static QString attributeLabel( const QString & attr, bool required ) { +static TQString attributeLabel( const TQString & attr, bool required ) { if ( attr.isEmpty() ) - return QString::null; - const QString label = Kleo::DNAttributeMapper::instance()->name2label( attr ); + return TQString::null; + const TQString label = Kleo::DNAttributeMapper::instance()->name2label( attr ); if ( !label.isEmpty() ) if ( required ) return i18n("Format string for the labels in the \"Your Personal Data\" page - required field", @@ -99,11 +99,11 @@ static QString attributeLabel( const QString & attr, bool required ) { return attr + ':'; } -static QString attributeFromKey( QString key ) { +static TQString attributeFromKey( TQString key ) { return key.remove( '!' ); } -static bool availForMod( const QLineEdit * le ) { +static bool availForMod( const TQLineEdit * le ) { return le && le->isEnabled(); } @@ -114,7 +114,7 @@ static bool availForMod( const QLineEdit * le ) { * The wizard will by default be modeless, unless you set 'modal' to * TRUE to construct a modal wizard. */ -CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name, bool modal, WFlags fl ) +CertificateWizardImpl::CertificateWizardImpl( TQWidget* parent, const char* name, bool modal, WFlags fl ) : CertificateWizard( parent, name, modal, fl ) { // don't allow to go to last page until a key has been generated @@ -126,16 +126,16 @@ CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name // Allow to select remote URLs storeUR->setMode( KFile::File ); storeUR->setFilter( "application/pkcs10" ); - connect( storeUR, SIGNAL( urlSelected( const QString& ) ), - this, SLOT( slotURLSelected( const QString& ) ) ); + connect( storeUR, TQT_SIGNAL( urlSelected( const TQString& ) ), + this, TQT_SLOT( slotURLSelected( const TQString& ) ) ); const KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" ); caEmailED->setText( config.readEntry( "CAEmailAddress" ) ); - connect( this, SIGNAL( helpClicked() ), - this, SLOT( slotHelpClicked() ) ); - connect( insertAddressButton, SIGNAL( clicked() ), - this, SLOT( slotSetValuesFromWhoAmI() ) ); + connect( this, TQT_SIGNAL( helpClicked() ), + this, TQT_SLOT( slotHelpClicked() ) ); + connect( insertAddressButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotSetValuesFromWhoAmI() ) ); for ( unsigned int i = 0 ; i < numKeyLengths ; ++i ) keyLengthCB->insertItem( i18n("%n bit", "%n bits", keyLengths[i] ) ); @@ -144,10 +144,10 @@ CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name static bool requirementsAreMet( const CertificateWizardImpl::AttrPairList & list ) { for ( CertificateWizardImpl::AttrPairList::const_iterator it = list.begin() ; it != list.end() ; ++it ) { - const QLineEdit * le = (*it).second; + const TQLineEdit * le = (*it).second; if ( !le ) continue; - const QString key = (*it).first; + const TQString key = (*it).first; #ifndef NDEBUG kdbgstream s = kdDebug(); #else @@ -179,8 +179,8 @@ CertificateWizardImpl::~CertificateWizardImpl() // no need to delete child widgets, Qt does it all for us } -static const char * oidForAttributeName( const QString & attr ) { - QCString attrUtf8 = attr.utf8(); +static const char * oidForAttributeName( const TQString & attr ) { + TQCString attrUtf8 = attr.utf8(); for ( unsigned int i = 0 ; i < numOidMaps ; ++i ) if ( qstricmp( attrUtf8, oidmap[i].name ) == 0 ) return oidmap[i].oid; @@ -193,10 +193,10 @@ static const char * oidForAttributeName( const QString & attr ) { void CertificateWizardImpl::slotGenerateCertificate() { // Ask gpgme to generate a key and return it - QString certParms; + TQString certParms; certParms += "<GnupgKeyParms format=\"internal\">\n"; certParms += "Key-Type: RSA\n"; - certParms += QString( "Key-Length: %1\n" ).arg( keyLengths[keyLengthCB->currentItem()] ); + certParms += TQString( "Key-Length: %1\n" ).arg( keyLengths[keyLengthCB->currentItem()] ); certParms += "Key-Usage: "; if ( signOnlyCB->isChecked() ) certParms += "Sign"; @@ -207,15 +207,15 @@ void CertificateWizardImpl::slotGenerateCertificate() certParms += "\n"; certParms += "name-dn: "; - QString email; - QStringList rdns; + TQString email; + TQStringList rdns; for( AttrPairList::const_iterator it = _attrPairList.begin(); it != _attrPairList.end(); ++it ) { - const QString attr = attributeFromKey( (*it).first.upper() ); - const QLineEdit * le = (*it).second; + const TQString attr = attributeFromKey( (*it).first.upper() ); + const TQLineEdit * le = (*it).second; if ( !le ) continue; - const QString value = le->text().stripWhiteSpace(); + const TQString value = le->text().stripWhiteSpace(); if ( value.isEmpty() ) continue; @@ -230,7 +230,7 @@ void CertificateWizardImpl::slotGenerateCertificate() if ( const char * oid = oidForAttributeName( attr ) ) { // we need to translate the attribute name for the backend: - rdns.push_back( QString::fromUtf8( oid ) + '=' + Kleo::DN::escape( value ) ); + rdns.push_back( TQString::fromUtf8( oid ) + '=' + Kleo::DN::escape( value ) ); } else { rdns.push_back( attr + '=' + Kleo::DN::escape( value ) ); } @@ -246,8 +246,8 @@ void CertificateWizardImpl::slotGenerateCertificate() Kleo::CryptoBackendFactory::instance()->smime()->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&)) ); certificateTE->setText( certParms ); @@ -255,7 +255,7 @@ void CertificateWizardImpl::slotGenerateCertificate() if ( err ) KMessageBox::error( this, i18n( "Could not start certificate generation: %1" ) - .arg( QString::fromLocal8Bit( err.asString() ) ), + .arg( TQString::fromLocal8Bit( err.asString() ) ), i18n( "Certificate Manager Error" ) ); else { generatePB->setEnabled( false ); @@ -266,7 +266,7 @@ void CertificateWizardImpl::slotGenerateCertificate() void CertificateWizardImpl::slotResult( const GpgME::KeyGenerationResult & res, - const QByteArray & keyData ) { + const TQByteArray & keyData ) { //kdDebug() << "keyData.size(): " << keyData.size() << endl; _keyData = keyData; @@ -278,7 +278,7 @@ void CertificateWizardImpl::slotResult( const GpgME::KeyGenerationResult & res, if ( !res.error().isCanceled() ) KMessageBox::error( this, i18n( "Could not generate certificate: %1" ) - .arg( QString::fromLatin1( res.error().asString() ) ), + .arg( TQString::fromLatin1( res.error().asString() ) ), i18n( "Certificate Manager Error" ) ); } else { // next will stay enabled until the user clicks Generate @@ -302,11 +302,11 @@ void CertificateWizardImpl::slotSetValuesFromWhoAmI() for ( AttrPairList::const_iterator it = _attrPairList.begin() ; it != _attrPairList.end() ; ++it ) { - QLineEdit * le = (*it).second; + TQLineEdit * le = (*it).second; if ( !availForMod( le ) ) continue; - const QString attr = attributeFromKey( (*it).first.upper() ); + const TQString attr = attributeFromKey( (*it).first.upper() ); if ( attr == "CN" ) le->setText( a.formattedName() ); else if ( attr == "EMAIL" ) @@ -334,29 +334,29 @@ void CertificateWizardImpl::slotSetValuesFromWhoAmI() void CertificateWizardImpl::createPersonalDataPage() { - QGridLayout* grid = new QGridLayout( edContainer, 2, 1, + TQGridLayout* grid = new TQGridLayout( edContainer, 2, 1, KDialog::marginHint(), KDialog::spacingHint() ); KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" ); - QStringList attrOrder = config.readListEntry( "DNAttributeOrder" ); + TQStringList attrOrder = config.readListEntry( "DNAttributeOrder" ); if ( attrOrder.empty() ) attrOrder << "CN!" << "L" << "OU" << "O!" << "C!" << "EMAIL!"; int row = 0; - for ( QStringList::const_iterator it = attrOrder.begin() ; it != attrOrder.end() ; ++it, ++row ) { - const QString key = (*it).stripWhiteSpace().upper(); - const QString attr = attributeFromKey( key ); + for ( TQStringList::const_iterator it = attrOrder.begin() ; it != attrOrder.end() ; ++it, ++row ) { + const TQString key = (*it).stripWhiteSpace().upper(); + const TQString attr = attributeFromKey( key ); if ( attr.isEmpty() ) { --row; continue; } - const QString preset = config.readEntry( attr ); - const QString label = config.readEntry( attr + "_label", + const TQString preset = config.readEntry( attr ); + const TQString label = config.readEntry( attr + "_label", attributeLabel( attr, key.endsWith("!") ) ); - QLineEdit * le = new QLineEdit( edContainer ); + TQLineEdit * le = new TQLineEdit( edContainer ); grid->addWidget( le, row, 1 ); - grid->addWidget( new QLabel( le, label.isEmpty() ? attr : label, edContainer ), row, 0 ); + grid->addWidget( new TQLabel( le, label.isEmpty() ? attr : label, edContainer ), row, 0 ); le->setText( preset ); if ( config.entryIsImmutable( attr ) ) @@ -364,8 +364,8 @@ void CertificateWizardImpl::createPersonalDataPage() _attrPairList.append(qMakePair(key, le)); - connect( le, SIGNAL(textChanged(const QString&)), - SLOT(slotEnablePersonalDataPageExit()) ); + connect( le, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotEnablePersonalDataPageExit()) ); } // enable button only if administrator wants to allow it @@ -380,17 +380,17 @@ bool CertificateWizardImpl::sendToCA() const { return sendToCARB->isChecked(); } -QString CertificateWizardImpl::caEMailAddress() const { +TQString CertificateWizardImpl::caEMailAddress() const { return caEmailED->text().stripWhiteSpace(); } -void CertificateWizardImpl::slotURLSelected( const QString& _url ) +void CertificateWizardImpl::slotURLSelected( const TQString& _url ) { KURL url = KURL::fromPathOrURL( _url.stripWhiteSpace() ); #if ! KDE_IS_VERSION(3,2,90) // The application/pkcs10 mimetype didn't have a native extension, // so the filedialog didn't have the checkbox for auto-adding it. - QString fileName = url.fileName(); + TQString fileName = url.fileName(); int pos = fileName.findRev( '.' ); if ( pos < 0 ) // no extension url.setFileName( fileName + ".p10" ); @@ -402,7 +402,7 @@ KURL CertificateWizardImpl::saveFileUrl() const { return KURL::fromPathOrURL( storeUR->url().stripWhiteSpace() ); } -void CertificateWizardImpl::showPage( QWidget * page ) +void CertificateWizardImpl::showPage( TQWidget * page ) { CertificateWizard::showPage( page ); if ( page == generatePage ) { @@ -424,13 +424,13 @@ static const char* const dcopObjectId = "KMailIface"; /** Send the new certificate by mail using KMail */ -void CertificateWizardImpl::sendCertificate( const QString& email, const QByteArray& certificateData ) +void CertificateWizardImpl::sendCertificate( const TQString& email, const TQByteArray& certificateData ) { - QString error; - QCString dcopService; + TQString error; + TQCString dcopService; int result = KDCOPServiceStarter::self()-> - findServiceFor( "DCOP/Mailer", QString::null, - QString::null, &error, &dcopService ); + findServiceFor( "DCOP/Mailer", TQString::null, + TQString::null, &error, &dcopService ); if ( result != 0 ) { kdDebug() << "Couldn't connect to KMail\n"; KMessageBox::error( this, @@ -438,25 +438,25 @@ void CertificateWizardImpl::sendCertificate( const QString& email, const QByteAr return; } - QCString dummy; + TQCString dummy; // OK, so kmail (or kontact) is running. Now ensure the object we want is available. // [that's not the case when kontact was already running, but kmail not loaded into it... in theory.] - if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ) { + if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ) { DCOPRef ref( dcopService, dcopService ); // talk to the KUniqueApplication or its kontact wrapper DCOPReply reply = ref.call( "load()" ); if ( reply.isValid() && (bool)reply ) { - Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ); + Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ); } else kdWarning() << "Error loading " << dcopService << endl; } DCOPClient* dcopClient = kapp->dcopClient(); - QByteArray data; - QDataStream arg( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream arg( data, IO_WriteOnly ); arg << email; arg << certificateData; if( !dcopClient->send( dcopService, dcopObjectId, - "sendCertificate(QString,QByteArray)", data ) ) { + "sendCertificate(TQString,TQByteArray)", data ) ) { KMessageBox::error( this, i18n( "DCOP Communication Error, unable to send certificate using KMail." ) ); return; @@ -490,8 +490,8 @@ void CertificateWizardImpl::accept() KIO::Job* uploadJob = KIOext::put( _keyData, url, -1, overwrite, false /*resume*/ ); uploadJob->setWindow( this ); - connect( uploadJob, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotUploadResult( KIO::Job* ) ) ); + connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) ); // Can't press finish again during the upload setFinishEnabled( finishPage, false ); } diff --git a/certmanager/certificatewizardimpl.h b/certmanager/certificatewizardimpl.h index d275cbc72..98327e816 100644 --- a/certmanager/certificatewizardimpl.h +++ b/certmanager/certificatewizardimpl.h @@ -34,9 +34,9 @@ #define CERTIFICATEWIZARDIMPL_H #include "certificatewizard.h" -#include <qcstring.h> -#include <qvaluevector.h> -#include <qlineedit.h> +#include <tqcstring.h> +#include <tqvaluevector.h> +#include <tqlineedit.h> #include <kurl.h> namespace GpgME { @@ -51,26 +51,26 @@ class CertificateWizardImpl : public CertificateWizard Q_OBJECT public: - CertificateWizardImpl( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + CertificateWizardImpl( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~CertificateWizardImpl(); bool sendToCA() const; - QString caEMailAddress() const; + TQString caEMailAddress() const; KURL saveFileUrl() const; - typedef QPair<QString, QLineEdit*> StringLEPair; - typedef QValueVector< StringLEPair > AttrPairList; + typedef QPair<TQString, TQLineEdit*> StringLEPair; + typedef TQValueVector< StringLEPair > AttrPairList; public: - virtual void showPage( QWidget * page ); + virtual void showPage( TQWidget * page ); virtual void accept(); private slots: void slotGenerateCertificate(); - void slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData ); + void slotResult( const GpgME::KeyGenerationResult & res, const TQByteArray & keyData ); void slotSetValuesFromWhoAmI(); void slotEnablePersonalDataPageExit(); - void slotURLSelected( const QString& ); + void slotURLSelected( const TQString& ); void slotHelpClicked(); @@ -78,11 +78,11 @@ private slots: private: void createPersonalDataPage(); - void sendCertificate( const QString& email, const QByteArray& certificateData ); + void sendCertificate( const TQString& email, const TQByteArray& certificateData ); private: AttrPairList _attrPairList; - QByteArray _keyData; + TQByteArray _keyData; }; #endif // CERTIFICATEWIZARDIMPL_H diff --git a/certmanager/certlistview.cpp b/certmanager/certlistview.cpp index acb6e8916..f26ba17f8 100644 --- a/certmanager/certlistview.cpp +++ b/certmanager/certlistview.cpp @@ -5,34 +5,34 @@ CertKeyListView::CertKeyListView( const ColumnStrategy * strategy, const DisplayStrategy * display, - QWidget * parent, const char * name, WFlags f ) + TQWidget * parent, const char * name, WFlags f ) : Kleo::KeyListView( strategy, display, parent, name, f ) { viewport()->setAcceptDrops( true ); } -void CertKeyListView::contentsDragEnterEvent( QDragEnterEvent * event ) +void CertKeyListView::contentsDragEnterEvent( TQDragEnterEvent * event ) { //const char* fmt; //for (int i=0; (fmt = event->format(i)); i++) // kdDebug() << fmt << endl; // We only accept URL drops. We'll check the mimetype later on. - event->accept( QUriDrag::canDecode( event ) ); + event->accept( TQUriDrag::canDecode( event ) ); } -void CertKeyListView::contentsDragMoveEvent( QDragMoveEvent * event ) +void CertKeyListView::contentsDragMoveEvent( TQDragMoveEvent * event ) { - event->accept( QUriDrag::canDecode( event ) ); + event->accept( TQUriDrag::canDecode( event ) ); } -void CertKeyListView::contentsDragLeaveEvent( QDragLeaveEvent * ) +void CertKeyListView::contentsDragLeaveEvent( TQDragLeaveEvent * ) { - // Don't let QListView do its stuff + // Don't let TQListView do its stuff } -void CertKeyListView::contentsDropEvent( QDropEvent * event ) +void CertKeyListView::contentsDropEvent( TQDropEvent * event ) { KURL::List lst; if ( KURLDrag::decode( event, lst ) ) { diff --git a/certmanager/certlistview.h b/certmanager/certlistview.h index 311b42050..d06caf99f 100644 --- a/certmanager/certlistview.h +++ b/certmanager/certlistview.h @@ -11,16 +11,16 @@ class CertKeyListView : public Kleo::KeyListView { public: CertKeyListView( const ColumnStrategy * strategy, const DisplayStrategy * display=0, - QWidget * parent=0, const char * name=0, WFlags f=0 ); + TQWidget * parent=0, const char * name=0, WFlags f=0 ); signals: void dropped( const KURL::List& urls ); protected: - virtual void contentsDragEnterEvent ( QDragEnterEvent * ); - virtual void contentsDragMoveEvent( QDragMoveEvent * ); - virtual void contentsDragLeaveEvent( QDragLeaveEvent * ); - virtual void contentsDropEvent ( QDropEvent * ); + virtual void contentsDragEnterEvent ( TQDragEnterEvent * ); + virtual void contentsDragMoveEvent( TQDragMoveEvent * ); + virtual void contentsDragLeaveEvent( TQDragLeaveEvent * ); + virtual void contentsDropEvent ( TQDropEvent * ); }; diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp index b27f2ad57..f12411bf5 100644 --- a/certmanager/certmanager.cpp +++ b/certmanager/certmanager.cpp @@ -90,8 +90,8 @@ #include <kstdaccel.h> // Qt -#include <qfontmetrics.h> -#include <qpopupmenu.h> +#include <tqfontmetrics.h> +#include <tqpopupmenu.h> // other #include <algorithm> @@ -104,17 +104,17 @@ namespace { public: ~DisplayStrategy() {} - virtual QFont keyFont( const GpgME::Key& key, const QFont& font ) const { + virtual TQFont keyFont( const GpgME::Key& key, const TQFont& font ) const { const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key ); return filter ? filter->font( font ) : font; } - virtual QColor keyForeground( const GpgME::Key& key, const QColor& c ) const { + virtual TQColor keyForeground( const GpgME::Key& key, const TQColor& c ) const { const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key ); if ( filter && filter->fgColor().isValid() ) return filter->fgColor(); return c; } - virtual QColor keyBackground( const GpgME::Key& key, const QColor& c ) const { + virtual TQColor keyBackground( const GpgME::Key& key, const TQColor& c ) const { const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key ); if ( filter && filter->bgColor().isValid() ) return filter->bgColor(); @@ -126,30 +126,30 @@ namespace { public: ~ColumnStrategy() {} - QString title( int col ) const; - QString text( const GpgME::Key & key, int col ) const; - int width( int col, const QFontMetrics & fm ) const; + TQString title( int col ) const; + TQString text( const GpgME::Key & key, int col ) const; + int width( int col, const TQFontMetrics & fm ) const; }; - QString ColumnStrategy::title( int col ) const { + TQString ColumnStrategy::title( int col ) const { switch ( col ) { case 0: return i18n("Subject"); case 1: return i18n("Issuer"); case 2: return i18n("Serial"); - default: return QString::null; + default: return TQString::null; } } - QString ColumnStrategy::text( const GpgME::Key & key, int col ) const { + TQString ColumnStrategy::text( const GpgME::Key & key, int col ) const { switch ( col ) { case 0: return Kleo::DN( key.userID(0).id() ).prettyDN(); case 1: return Kleo::DN( key.issuerName() ).prettyDN(); - case 2: return key.issuerSerial() ? QString::fromUtf8( key.issuerSerial() ) : QString::null ; - default: return QString::null; + case 2: return key.issuerSerial() ? TQString::fromUtf8( key.issuerSerial() ) : TQString::null ; + default: return TQString::null; } } - int ColumnStrategy::width( int col, const QFontMetrics & fm ) const { + int ColumnStrategy::width( int col, const TQFontMetrics & fm ) const { int factor = -1; switch ( col ) { case 0: factor = 6; break; @@ -160,8 +160,8 @@ namespace { } } // anon namespace -CertManager::CertManager( bool remote, const QString& query, const QString & import, - QWidget* parent, const char* name, WFlags f ) +CertManager::CertManager( bool remote, const TQString& query, const TQString & import, + TQWidget* parent, const char* name, WFlags f ) : KMainWindow( parent, name, f|WDestructiveClose ), mCrlView( 0 ), mDirmngrProc( 0 ), @@ -184,20 +184,20 @@ CertManager::CertManager( bool remote, const QString& query, const QString & imp // Main Window -------------------------------------------------- mKeyListView = new CertKeyListView( new ColumnStrategy(), new DisplayStrategy(), this, "mKeyListView" ); - mKeyListView->setSelectionMode( QListView::Extended ); + mKeyListView->setSelectionMode( TQListView::Extended ); setCentralWidget( mKeyListView ); - connect( mKeyListView, SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const QPoint&,int)), - SLOT(slotViewDetails(Kleo::KeyListViewItem*)) ); - connect( mKeyListView, SIGNAL(returnPressed(Kleo::KeyListViewItem*)), - SLOT(slotViewDetails(Kleo::KeyListViewItem*)) ); - connect( mKeyListView, SIGNAL(selectionChanged()), - SLOT(slotSelectionChanged()) ); - connect( mKeyListView, SIGNAL(contextMenu(Kleo::KeyListViewItem*, const QPoint&)), - SLOT(slotContextMenu(Kleo::KeyListViewItem*, const QPoint&)) ); + connect( mKeyListView, TQT_SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const TQPoint&,int)), + TQT_SLOT(slotViewDetails(Kleo::KeyListViewItem*)) ); + connect( mKeyListView, TQT_SIGNAL(returnPressed(Kleo::KeyListViewItem*)), + TQT_SLOT(slotViewDetails(Kleo::KeyListViewItem*)) ); + connect( mKeyListView, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotSelectionChanged()) ); + connect( mKeyListView, TQT_SIGNAL(contextMenu(Kleo::KeyListViewItem*, const TQPoint&)), + TQT_SLOT(slotContextMenu(Kleo::KeyListViewItem*, const TQPoint&)) ); - connect( mKeyListView, SIGNAL(dropped(const KURL::List&) ), - SLOT( slotDropped(const KURL::List&) ) ); + connect( mKeyListView, TQT_SIGNAL(dropped(const KURL::List&) ), + TQT_SLOT( slotDropped(const KURL::List&) ) ); mLineEditAction->setText(query); if ( !mRemote && !mNextFindRemote || !query.isEmpty() ) @@ -237,24 +237,24 @@ void CertManager::createStatusBar() { KStatusBar * bar = statusBar(); mProgressBar = new Kleo::ProgressBar( bar, "mProgressBar" ); mProgressBar->reset(); - mProgressBar->setFixedSize( QSize( 100, mProgressBar->height() * 3 / 5 ) ); + mProgressBar->setFixedSize( TQSize( 100, mProgressBar->height() * 3 / 5 ) ); bar->addWidget( mProgressBar, 0, true ); - mStatusLabel = new QLabel( bar, "mStatusLabel" ); + mStatusLabel = new TQLabel( bar, "mStatusLabel" ); bar->addWidget( mStatusLabel, 1, false ); } -static inline void connectEnableOperationSignal( QObject * s, QObject * d ) { - QObject::connect( s, SIGNAL(enableOperations(bool)), - d, SLOT(setEnabled(bool)) ); +static inline void connectEnableOperationSignal( TQObject * s, TQObject * d ) { + TQObject::connect( s, TQT_SIGNAL(enableOperations(bool)), + d, TQT_SLOT(setEnabled(bool)) ); } void CertManager::createActions() { KAction * action = 0; - (void)KStdAction::quit( this, SLOT(close()), actionCollection() ); + (void)KStdAction::quit( this, TQT_SLOT(close()), actionCollection() ); - action = KStdAction::redisplay( this, SLOT(slotRedisplay()), actionCollection() ); + action = KStdAction::redisplay( this, TQT_SLOT(slotRedisplay()), actionCollection() ); // work around the fact that the stdaction has no shortcut KShortcut reloadShortcut = KStdAccel::shortcut(KStdAccel::Reload); reloadShortcut.append(KKey(CTRL + Key_R)); @@ -263,113 +263,113 @@ void CertManager::createActions() { connectEnableOperationSignal( this, action ); action = new KAction( i18n("Stop Operation"), "stop", Key_Escape, - this, SIGNAL(stopOperations()), + this, TQT_SIGNAL(stopOperations()), actionCollection(), "view_stop_operations" ); action->setEnabled( false ); (void) new KAction( i18n("New Key Pair..."), "filenew", 0, - this, SLOT(newCertificate()), + this, TQT_SLOT(newCertificate()), actionCollection(), "file_new_certificate" ); connect( new KToggleAction( i18n("Hierarchical Key List"), 0, actionCollection(), "view_hierarchical" ), - SIGNAL(toggled(bool)), SLOT(slotToggleHierarchicalView(bool)) ); + TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleHierarchicalView(bool)) ); action = new KAction( i18n("Expand All"), 0, CTRL+Key_Period, - this, SLOT(slotExpandAll()), + this, TQT_SLOT(slotExpandAll()), actionCollection(), "view_expandall" ); action = new KAction( i18n("Collapse All"), 0, CTRL+Key_Comma, - this, SLOT(slotCollapseAll()), + this, TQT_SLOT(slotCollapseAll()), actionCollection(), "view_collapseall" ); (void) new KAction( i18n("Refresh CRLs"), 0, 0, - this, SLOT(slotRefreshKeys()), + this, TQT_SLOT(slotRefreshKeys()), actionCollection(), "certificates_refresh_clr" ); #ifdef NOT_IMPLEMENTED_ANYWAY mRevokeCertificateAction = new KAction( i18n("Revoke"), 0, - this, SLOT(revokeCertificate()), + this, TQT_SLOT(revokeCertificate()), actionCollection(), "edit_revoke_certificate" ); connectEnableOperationSignal( this, mRevokeCertificateAction ); mExtendCertificateAction = new KAction( i18n("Extend"), 0, - this, SLOT(extendCertificate()), + this, TQT_SLOT(extendCertificate()), actionCollection(), "edit_extend_certificate" ); connectEnableOperationSignal( this, mExtendCertificateAction ); #endif mDeleteCertificateAction = new KAction( i18n("Delete"), "editdelete", Key_Delete, - this, SLOT(slotDeleteCertificate()), + this, TQT_SLOT(slotDeleteCertificate()), actionCollection(), "edit_delete_certificate" ); connectEnableOperationSignal( this, mDeleteCertificateAction ); mValidateCertificateAction = new KAction( i18n("Validate"), "reload", SHIFT + Key_F5, - this, SLOT(slotValidate()), + this, TQT_SLOT(slotValidate()), actionCollection(), "certificates_validate" ); connectEnableOperationSignal( this, mValidateCertificateAction ); mImportCertFromFileAction = new KAction( i18n("Import Certificates..."), 0, - this, SLOT(slotImportCertFromFile()), + this, TQT_SLOT(slotImportCertFromFile()), actionCollection(), "file_import_certificates" ); connectEnableOperationSignal( this, mImportCertFromFileAction ); mImportCRLFromFileAction = new KAction( i18n("Import CRLs..."), 0, - this, SLOT(importCRLFromFile()), + this, TQT_SLOT(importCRLFromFile()), actionCollection(), "file_import_crls" ); connectEnableOperationSignal( this, mImportCRLFromFileAction ); mExportCertificateAction = new KAction( i18n("Export Certificates..."), "export", 0, - this, SLOT(slotExportCertificate()), + this, TQT_SLOT(slotExportCertificate()), actionCollection(), "file_export_certificate" ); mExportSecretKeyAction = new KAction( i18n("Export Secret Key..."), "export", 0, - this, SLOT(slotExportSecretKey()), + this, TQT_SLOT(slotExportSecretKey()), actionCollection(), "file_export_secret_keys" ); connectEnableOperationSignal( this, mExportSecretKeyAction ); mViewCertDetailsAction = new KAction( i18n("Certificate Details..."), 0, 0, - this, SLOT(slotViewDetails()), actionCollection(), + this, TQT_SLOT(slotViewDetails()), actionCollection(), "view_certificate_details" ); mDownloadCertificateAction = new KAction( i18n( "Download"), 0, 0, - this, SLOT(slotDownloadCertificate()), actionCollection(), + this, TQT_SLOT(slotDownloadCertificate()), actionCollection(), "download_certificate" ); - const QString dirmngr = KStandardDirs::findExe( "gpgsm" ); + const TQString dirmngr = KStandardDirs::findExe( "gpgsm" ); mDirMngrFound = !dirmngr.isEmpty(); action = new KAction( i18n("Dump CRL Cache..."), 0, - this, SLOT(slotViewCRLs()), + this, TQT_SLOT(slotViewCRLs()), actionCollection(), "crl_dump_crl_cache" ); action->setEnabled( mDirMngrFound ); // we also need dirmngr for this action = new KAction( i18n("Clear CRL Cache..."), 0, - this, SLOT(slotClearCRLs()), + this, TQT_SLOT(slotClearCRLs()), actionCollection(), "crl_clear_crl_cache" ); action->setEnabled( mDirMngrFound ); // we also need dirmngr for this action = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, this, - SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg"); + TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg"); // disable action if no kwatchgnupg binary is around if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) action->setEnabled(false); (void)new LabelAction( i18n("Search:"), actionCollection(), "label_action" ); - mLineEditAction = new LineEditAction( QString::null, actionCollection(), this, - SLOT(slotSearch()), + mLineEditAction = new LineEditAction( TQString::null, actionCollection(), this, + TQT_SLOT(slotSearch()), "query_lineedit_action"); - QStringList lst; + TQStringList lst; lst << i18n("In Local Certificates") << i18n("In External Certificates"); - mComboAction = new ComboAction( lst, actionCollection(), this, SLOT( slotToggleRemote(int) ), + mComboAction = new ComboAction( lst, actionCollection(), this, TQT_SLOT( slotToggleRemote(int) ), "location_combo_action", mNextFindRemote? 1 : 0 ); - mFindAction = new KAction( i18n("Find"), "find", 0, this, SLOT(slotSearch()), + mFindAction = new KAction( i18n("Find"), "find", 0, this, TQT_SLOT(slotSearch()), actionCollection(), "find" ); - KStdAction::keyBindings( this, SLOT(slotEditKeybindings()), actionCollection() ); - KStdAction::preferences( this, SLOT(slotShowConfigurationDialog()), actionCollection() ); + KStdAction::keyBindings( this, TQT_SLOT(slotEditKeybindings()), actionCollection() ); + KStdAction::preferences( this, TQT_SLOT(slotShowConfigurationDialog()), actionCollection() ); - new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, SLOT(slotConfigureGpgME()), + new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, TQT_SLOT(slotConfigureGpgME()), actionCollection(), "configure_gpgme" ); createStandardStatusBarAction(); @@ -387,7 +387,7 @@ void CertManager::slotEditKeybindings() { void CertManager::slotShowConfigurationDialog() { ConfigureDialog dlg( this ); - connect( &dlg, SIGNAL( configCommitted() ), SLOT( slotRepaint() ) ); + connect( &dlg, TQT_SIGNAL( configCommitted() ), TQT_SLOT( slotRepaint() ) ); dlg.exec(); } @@ -402,10 +402,10 @@ void CertManager::slotConfigureGpgME() { // when reopening the configuration dialog. config->clear(); - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { // Tell other apps (e.g. kmail) that the gpgconf data might have changed - kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", QByteArray() ); + kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", TQByteArray() ); } } } @@ -436,25 +436,25 @@ void CertManager::slotToggleHierarchicalView( bool hier ) { } void CertManager::slotExpandAll() { - for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it ) it.current()->setOpen( true ); } void CertManager::slotCollapseAll() { - for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it ) it.current()->setOpen( false ); } -void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const QString & initialText ) { +void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const TQString & initialText ) { assert( mProgressBar ); if ( !job ) return; if ( !initialText.isEmpty() ) statusBar()->message( initialText ); - connect( job, SIGNAL(progress(const QString&,int,int)), - mProgressBar, SLOT(slotProgress(const QString&,int,int)) ); - connect( job, SIGNAL(done()), mProgressBar, SLOT(reset()) ); - connect( this, SIGNAL(stopOperations()), job, SLOT(slotCancel()) ); + connect( job, TQT_SIGNAL(progress(const TQString&,int,int)), + mProgressBar, TQT_SLOT(slotProgress(const TQString&,int,int)) ); + connect( job, TQT_SIGNAL(done()), mProgressBar, TQT_SLOT(reset()) ); + connect( this, TQT_SIGNAL(stopOperations()), job, TQT_SLOT(slotCancel()) ); action("view_stop_operations")->setEnabled( true ); emit enableOperations( false ); @@ -462,7 +462,7 @@ void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const QString void CertManager::disconnectJobFromStatusBarProgress( const GpgME::Error & err ) { updateStatusBarLabels(); - const QString msg = err.isCanceled() ? i18n("Canceled.") + const TQString msg = err.isCanceled() ? i18n("Canceled.") : err ? i18n("Failed.") : i18n("Done.") ; statusBar()->message( msg, 4000 ); @@ -475,7 +475,7 @@ void CertManager::disconnectJobFromStatusBarProgress( const GpgME::Error & err ) void CertManager::updateStatusBarLabels() { mKeyListView->flushKeys(); int total = 0; - for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it ) ++total; mStatusLabel->setText( i18n( "%n Key.","%n Keys.", total ) ); } @@ -487,30 +487,30 @@ void CertManager::updateStatusBarLabels() { // -static std::set<std::string> extractKeyFingerprints( const QPtrList<Kleo::KeyListViewItem> & items ) { +static std::set<std::string> extractKeyFingerprints( const TQPtrList<Kleo::KeyListViewItem> & items ) { std::set<std::string> result; - for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it ) + for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it ) if ( const char * fpr = it.current()->key().primaryFingerprint() ) result.insert( fpr ); return result; } -static QStringList stringlistFromSet( const std::set<std::string> & set ) { - // ARGH. This is madness. Shitty Qt containers don't support QStringList( patterns.begin(), patterns.end() ) :/ - QStringList sl; +static TQStringList stringlistFromSet( const std::set<std::string> & set ) { + // ARGH. This is madness. Shitty Qt containers don't support TQStringList( patterns.begin(), patterns.end() ) :/ + TQStringList sl; for ( std::set<std::string>::const_iterator it = set.begin() ; it != set.end() ; ++it ) - // let's make extra sure, maybe someone tries to make Qt not support std::string->QString conversion - sl.push_back( QString::fromLatin1( it->c_str() ) ); + // let's make extra sure, maybe someone tries to make Qt not support std::string->TQString conversion + sl.push_back( TQString::fromLatin1( it->c_str() ) ); return sl; } void CertManager::slotRefreshKeys() { - const QStringList keys = stringlistFromSet( extractKeyFingerprints( mKeyListView->selectedItems() ) ); + const TQStringList keys = stringlistFromSet( extractKeyFingerprints( mKeyListView->selectedItems() ) ); Kleo::RefreshKeysJob * job = Kleo::CryptoBackendFactory::instance()->smime()->refreshKeysJob(); assert( job ); - connect( job, SIGNAL(result(const GpgME::Error&)), - this, SLOT(slotRefreshKeysResult(const GpgME::Error&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&)), + this, TQT_SLOT(slotRefreshKeysResult(const GpgME::Error&)) ); connectJobToStatusBarProgress( job, i18n("Refreshing keys...") ); if ( const GpgME::Error err = job->start( keys ) ) @@ -523,16 +523,16 @@ void CertManager::slotRefreshKeysResult( const GpgME::Error & err ) { return; if ( err ) KMessageBox::error( this, i18n("An error occurred while trying to refresh " - "keys:\n%1").arg( QString::fromLocal8Bit( err.asString() ) ), + "keys:\n%1").arg( TQString::fromLocal8Bit( err.asString() ) ), i18n("Refreshing Keys Failed") ); } -static void showKeyListError( QWidget * parent, const GpgME::Error & err ) { +static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n( "<qt><p>An error occurred while fetching " + const TQString msg = i18n( "<qt><p>An error occurred while fetching " "the certificates from the backend:</p>" "<p><b>%1</b></p></qt>" ) - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n( "Certificate Listing Failed" ) ); } @@ -557,7 +557,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const std::set startKeyListing( validating, refresh, stringlistFromSet( patterns ) ); } -void CertManager::startKeyListing( bool validating, bool refresh, const QStringList & patterns ) { +void CertManager::startKeyListing( bool validating, bool refresh, const TQStringList & patterns ) { mRemote = mNextFindRemote; mLineEditAction->setEnabled( false ); mComboAction->setEnabled( false ); @@ -571,10 +571,10 @@ void CertManager::startKeyListing( bool validating, bool refresh, const QStringL job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( mRemote, false, validating ); assert( job ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), - mKeyListView, refresh ? SLOT(slotRefreshKey(const GpgME::Key&)) : SLOT(slotAddKey(const GpgME::Key&)) ); - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - this, SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), + mKeyListView, refresh ? TQT_SLOT(slotRefreshKey(const GpgME::Key&)) : TQT_SLOT(slotAddKey(const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + this, TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); connectJobToStatusBarProgress( job, i18n("Fetching keys...") ); @@ -589,7 +589,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const QStringL static void selectKeys( Kleo::KeyListView * lv, const std::set<std::string> & fprs ) { if ( !lv || fprs.empty() ) return; - for ( QListViewItemIterator it( lv ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( lv ) ; it.current() ; ++it ) if ( Kleo::KeyListViewItem * item = Kleo::lvi_cast<Kleo::KeyListViewItem>( it.current() ) ) { const char * fpr = item->key().primaryFingerprint(); item->setSelected( fpr && fprs.find( fpr ) != fprs.end() ); @@ -619,10 +619,10 @@ void CertManager::slotKeyListResult( const GpgME::KeyListResult & res ) { selectKeys( mKeyListView, mPreviouslySelectedFingerprints ); } -void CertManager::slotContextMenu(Kleo::KeyListViewItem* item, const QPoint& point) { +void CertManager::slotContextMenu(Kleo::KeyListViewItem* item, const TQPoint& point) { if ( !item ) return; - if ( QPopupMenu * popup = static_cast<QPopupMenu*>(factory()->container("listview_popup",this)) ) + if ( TQPopupMenu * popup = static_cast<TQPopupMenu*>(factory()->container("listview_popup",this)) ) popup->exec( point ); } @@ -666,9 +666,9 @@ void CertManager::extendCertificate() */ void CertManager::slotImportCertFromFile() { - const QString filter = "application/x-x509-ca-cert application/x-pkcs12 application/pkcs7-mime"; - //const QString filter = QString("*.pem *.der *.p7c *.p12|") + i18n("Certificates (*.pem *.der *.p7c *.p12)"); - slotImportCertFromFile( KFileDialog::getOpenURL( QString::null, filter, this, + const TQString filter = "application/x-x509-ca-cert application/x-pkcs12 application/pkcs7-mime"; + //const TQString filter = TQString("*.pem *.der *.p7c *.p12|") + i18n("Certificates (*.pem *.der *.p7c *.p12)"); + slotImportCertFromFile( KFileDialog::getOpenURL( TQString::null, filter, this, i18n( "Select Certificate File" ) ) ); } @@ -685,7 +685,7 @@ void CertManager::slotImportCertFromFile( const KURL & certURL ) // Download the cert KIOext::StoredTransferJob* importJob = KIOext::storedGet( certURL ); importJob->setWindow( this ); - connect( importJob, SIGNAL(result(KIO::Job*)), SLOT(slotImportResult(KIO::Job*)) ); + connect( importJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotImportResult(KIO::Job*)) ); } void CertManager::slotImportResult( KIO::Job* job ) @@ -700,28 +700,28 @@ void CertManager::slotImportResult( KIO::Job* job ) updateImportActions( true ); } -static void showCertificateDownloadError( QWidget * parent, const GpgME::Error & err, const QString& certDisplayName ) { +static void showCertificateDownloadError( TQWidget * parent, const GpgME::Error & err, const TQString& certDisplayName ) { assert( err ); - const QString msg = i18n( "<qt><p>An error occurred while trying " + const TQString msg = i18n( "<qt><p>An error occurred while trying " "to download the certificate %1:</p>" "<p><b>%2</b></p></qt>" ) .arg( certDisplayName ) - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n( "Certificate Download Failed" ) ); } void CertManager::slotDownloadCertificate() { mPreviouslySelectedFingerprints.clear(); - QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems(); - for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it ) + TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems(); + for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it ) if ( !it.current()->key().isNull() ) if ( const char * fpr = it.current()->key().primaryFingerprint() ) slotStartCertificateDownload( fpr, it.current()->text(0) ); } // Called from slotDownloadCertificate and from the certificate-details widget -void CertManager::slotStartCertificateDownload( const QString& fingerprint, const QString& displayName ) { +void CertManager::slotStartCertificateDownload( const TQString& fingerprint, const TQString& displayName ) { if ( fingerprint.isEmpty() ) return; @@ -729,8 +729,8 @@ void CertManager::slotStartCertificateDownload( const QString& fingerprint, cons Kleo::CryptoBackendFactory::instance()->smime()->downloadJob( false /* no armor */ ); assert( job ); - connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)), - SLOT(slotCertificateDownloadResult(const GpgME::Error&,const QByteArray&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)), + TQT_SLOT(slotCertificateDownloadResult(const GpgME::Error&,const TQByteArray&)) ); connectJobToStatusBarProgress( job, i18n("Fetching certificate from server...") ); @@ -743,10 +743,10 @@ void CertManager::slotStartCertificateDownload( const QString& fingerprint, cons } } -QString CertManager::displayNameForJob( const Kleo::Job *job ) +TQString CertManager::displayNameForJob( const Kleo::Job *job ) { JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.find( job ); - QString displayName; + TQString displayName; if ( it != mJobsDisplayNameMap.end() ) { displayName = *it; mJobsDisplayNameMap.remove( it ); @@ -757,9 +757,9 @@ QString CertManager::displayNameForJob( const Kleo::Job *job ) } // Don't call directly! -void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const QByteArray & keyData ) { +void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const TQByteArray & keyData ) { - QString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) ); + TQString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) ); if ( err ) showCertificateDownloadError( this, err, displayName ); @@ -768,22 +768,22 @@ void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const disconnectJobFromStatusBarProgress( err ); } -static void showCertificateImportError( QWidget * parent, const GpgME::Error & err, const QString& certDisplayName ) { +static void showCertificateImportError( TQWidget * parent, const GpgME::Error & err, const TQString& certDisplayName ) { assert( err ); - const QString msg = i18n( "<qt><p>An error occurred while trying " + const TQString msg = i18n( "<qt><p>An error occurred while trying " "to import the certificate %1:</p>" "<p><b>%2</b></p></qt>" ) .arg( certDisplayName ) - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n( "Certificate Import Failed" ) ); } -void CertManager::startCertificateImport( const QByteArray & keyData, const QString& certDisplayName ) { +void CertManager::startCertificateImport( const TQByteArray & keyData, const TQString& certDisplayName ) { Kleo::ImportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->importJob(); assert( job ); - connect( job, SIGNAL(result(const GpgME::ImportResult&)), - SLOT(slotCertificateImportResult(const GpgME::ImportResult&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::ImportResult&)), + TQT_SLOT(slotCertificateImportResult(const GpgME::ImportResult&)) ); connectJobToStatusBarProgress( job, i18n("Importing certificates...") ); @@ -798,7 +798,7 @@ void CertManager::startCertificateImport( const QByteArray & keyData, const QStr } void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res ) { - QString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) ); + TQString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) ); if ( res.error().isCanceled() ) { // do nothing @@ -806,54 +806,54 @@ void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res ) showCertificateImportError( this, res.error(), displayName ); } else { - const QString normalLine = i18n("<tr><td align=\"right\">%1</td><td>%2</td></tr>"); - const QString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>"); + const TQString normalLine = i18n("<tr><td align=\"right\">%1</td><td>%2</td></tr>"); + const TQString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>"); - QStringList lines; + TQStringList lines; lines.push_back( normalLine.arg( i18n("Total number processed:"), - QString::number( res.numConsidered() ) ) ); + TQString::number( res.numConsidered() ) ) ); lines.push_back( normalLine.arg( i18n("Imported:"), - QString::number( res.numImported() ) ) ); + TQString::number( res.numImported() ) ) ); if ( res.newSignatures() ) lines.push_back( normalLine.arg( i18n("New signatures:"), - QString::number( res.newSignatures() ) ) ); + TQString::number( res.newSignatures() ) ) ); if ( res.newUserIDs() ) lines.push_back( normalLine.arg( i18n("New user IDs:"), - QString::number( res.newUserIDs() ) ) ); + TQString::number( res.newUserIDs() ) ) ); if ( res.numKeysWithoutUserID() ) lines.push_back( normalLine.arg( i18n("Keys without user IDs:"), - QString::number( res.numKeysWithoutUserID() ) ) ); + TQString::number( res.numKeysWithoutUserID() ) ) ); if ( res.newSubkeys() ) lines.push_back( normalLine.arg( i18n("New subkeys:"), - QString::number( res.newSubkeys() ) ) ); + TQString::number( res.newSubkeys() ) ) ); if ( res.newRevocations() ) lines.push_back( boldLine.arg( i18n("Newly revoked:"), - QString::number( res.newRevocations() ) ) ); + TQString::number( res.newRevocations() ) ) ); if ( res.notImported() ) lines.push_back( boldLine.arg( i18n("Not imported:"), - QString::number( res.notImported() ) ) ); + TQString::number( res.notImported() ) ) ); if ( res.numUnchanged() ) lines.push_back( normalLine.arg( i18n("Unchanged:"), - QString::number( res.numUnchanged() ) ) ); + TQString::number( res.numUnchanged() ) ) ); if ( res.numSecretKeysConsidered() ) lines.push_back( normalLine.arg( i18n("Secret keys processed:"), - QString::number( res.numSecretKeysConsidered() ) ) ); + TQString::number( res.numSecretKeysConsidered() ) ) ); if ( res.numSecretKeysImported() ) lines.push_back( normalLine.arg( i18n("Secret keys imported:"), - QString::number( res.numSecretKeysImported() ) ) ); + TQString::number( res.numSecretKeysImported() ) ) ); if ( res.numSecretKeysConsidered() - res.numSecretKeysImported() - res.numSecretKeysUnchanged() > 0 ) lines.push_back( boldLine.arg( i18n("Secret keys <em>not</em> imported:"), - QString::number( res.numSecretKeysConsidered() + TQString::number( res.numSecretKeysConsidered() - res.numSecretKeysImported() - res.numSecretKeysUnchanged() ) ) ); if ( res.numSecretKeysUnchanged() ) lines.push_back( normalLine.arg( i18n("Secret keys unchanged:"), - QString::number( res.numSecretKeysUnchanged() ) ) ); + TQString::number( res.numSecretKeysUnchanged() ) ) ); KMessageBox::information( this, i18n( "<qt><p>Detailed results of importing %1:</p>" "<table>%2</table></qt>" ) - .arg( displayName ).arg( lines.join( QString::null ) ), + .arg( displayName ).arg( lines.join( TQString::null ) ), i18n( "Certificate Import Result" ) ); disconnectJobFromStatusBarProgress( res.error() ); @@ -881,7 +881,7 @@ void CertManager::slotDirmngrExited() { delete mDirmngrProc; mDirmngrProc = 0; if ( !mImportCRLTempFile.isEmpty() ) - QFile::remove( mImportCRLTempFile ); + TQFile::remove( mImportCRLTempFile ); updateImportActions( true ); } @@ -889,8 +889,8 @@ void CertManager::slotDirmngrExited() { This slot will import CRLs from a file. */ void CertManager::importCRLFromFile() { - QString filter = QString("*.crl *.arl *-crl.der *-arl.der|") + i18n("Certificate Revocation List (*.crl *.arl *-crl.der *-arl.der)"); - KURL url = KFileDialog::getOpenURL( QString::null, + TQString filter = TQString("*.crl *.arl *-crl.der *-arl.der|") + i18n("Certificate Revocation List (*.crl *.arl *-crl.der *-arl.der)"); + KURL url = KFileDialog::getOpenURL( TQString::null, filter, this, i18n( "Select CRL File" ) ); @@ -905,8 +905,8 @@ void CertManager::importCRLFromFile() { destURL.setPath( tempFile.name() ); KIO::Job* copyJob = KIO::file_copy( url, destURL, 0600, true, false ); copyJob->setWindow( this ); - connect( copyJob, SIGNAL( result( KIO::Job * ) ), - SLOT( slotImportCRLJobFinished( KIO::Job * ) ) ); + connect( copyJob, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotImportCRLJobFinished( KIO::Job * ) ) ); } } } @@ -914,10 +914,10 @@ void CertManager::importCRLFromFile() { void CertManager::slotImportCRLJobFinished( KIO::Job *job ) { KIO::FileCopyJob* fcjob = static_cast<KIO::FileCopyJob*>( job ); - QString tempFilePath = fcjob->destURL().path(); + TQString tempFilePath = fcjob->destURL().path(); if ( job->error() ) { job->showErrorDialog(); - QFile::remove( tempFilePath ); // unlink tempfile + TQFile::remove( tempFilePath ); // unlink tempfile updateImportActions( true ); return; } @@ -928,10 +928,10 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces assert( slot ); assert( processname ); assert( mDirmngrProc ); - mErrorbuffer = QString::null; - connect( mDirmngrProc, SIGNAL(processExited(KProcess*)), slot ); - connect( mDirmngrProc, SIGNAL(receivedStderr(KProcess*,char*,int) ), - this, SLOT(slotStderr(KProcess*,char*,int)) ); + mErrorbuffer = TQString::null; + connect( mDirmngrProc, TQT_SIGNAL(processExited(KProcess*)), slot ); + connect( mDirmngrProc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int) ), + this, TQT_SLOT(slotStderr(KProcess*,char*,int)) ); if( !mDirmngrProc->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) { delete mDirmngrProc; mDirmngrProc = 0; KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).arg( processname ), i18n( "Certificate Manager Error" ) ); @@ -940,16 +940,16 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces return true; } -void CertManager::startImportCRL( const QString& filename, bool isTempFile ) +void CertManager::startImportCRL( const TQString& filename, bool isTempFile ) { assert( !mDirmngrProc ); - mImportCRLTempFile = isTempFile ? filename : QString::null; + mImportCRLTempFile = isTempFile ? filename : TQString::null; mDirmngrProc = new KProcess(); *mDirmngrProc << "gpgsm" << "--call-dirmngr" << "loadcrl" << filename; - if ( !connectAndStartDirmngr( SLOT(slotDirmngrExited()), "gpgsm" ) ) { + if ( !connectAndStartDirmngr( TQT_SLOT(slotDirmngrExited()), "gpgsm" ) ) { updateImportActions( true ); if ( isTempFile ) - QFile::remove( mImportCRLTempFile ); // unlink tempfile + TQFile::remove( mImportCRLTempFile ); // unlink tempfile } } @@ -958,11 +958,11 @@ void CertManager::startClearCRLs() { mDirmngrProc = new KProcess(); *mDirmngrProc << "dirmngr" << "--flush"; //*mDirmngrProc << "gpgsm" << "--call-dimngr" << "flush"; // use this once it's implemented! - connectAndStartDirmngr( SLOT(slotClearCRLsResult()), "dirmngr" ); + connectAndStartDirmngr( TQT_SLOT(slotClearCRLsResult()), "dirmngr" ); } void CertManager::slotStderr( KProcess*, char* buf, int len ) { - mErrorbuffer += QString::fromLocal8Bit( buf, len ); + mErrorbuffer += TQString::fromLocal8Bit( buf, len ); } /** @@ -997,12 +997,12 @@ void CertManager::slotClearCRLsResult() { delete mDirmngrProc; mDirmngrProc = 0; } -static void showDeleteError( QWidget * parent, const GpgME::Error & err ) { +static void showDeleteError( TQWidget * parent, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n("<qt><p>An error occurred while trying to delete " + const TQString msg = i18n("<qt><p>An error occurred while trying to delete " "the certificates:</p>" "<p><b>%1</b></p></qt>") - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n("Certificate Deletion Failed") ); } @@ -1020,8 +1020,8 @@ void CertManager::slotDeleteCertificate() { return; std::vector<GpgME::Key> keys; keys.reserve( mItemsToDelete.count() ); - QStringList keyDisplayNames; - for ( QPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ) ; it.current() ; ++it ) + TQStringList keyDisplayNames; + for ( TQPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ) ; it.current() ; ++it ) if ( !it.current()->key().isNull() ) { keys.push_back( it.current()->key() ); keyDisplayNames.push_back( it.current()->text( 0 ) ); @@ -1033,12 +1033,12 @@ void CertManager::slotDeleteCertificate() { mHierarchyAnalyser = new HierarchyAnalyser( this, "mHierarchyAnalyser" ); Kleo::KeyListJob * job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob(); assert( job ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), - mHierarchyAnalyser, SLOT(slotNextKey(const GpgME::Key&)) ); - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - this, SLOT(slotDeleteCertificate()) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), + mHierarchyAnalyser, TQT_SLOT(slotNextKey(const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + this, TQT_SLOT(slotDeleteCertificate()) ); connectJobToStatusBarProgress( job, i18n("Checking key dependencies...") ); - if ( const GpgME::Error error = job->start( QStringList() ) ) { + if ( const GpgME::Error error = job->start( TQStringList() ) ) { showKeyListError( this, error ); delete mHierarchyAnalyser; mHierarchyAnalyser = 0; } @@ -1072,7 +1072,7 @@ void CertManager::slotDeleteCertificate() { != KMessageBox::Continue ) return; - const QString msg = keysToDelete.size() > keys.size() + const TQString msg = keysToDelete.size() > keys.size() ? i18n("Do you really want to delete this certificate and the %1 certificates it certified?", "Do you really want to delete these %n certificates and the %1 certificates they certified?", keys.size() ).arg( keysToDelete.size() - keys.size() ) @@ -1089,7 +1089,7 @@ void CertManager::slotDeleteCertificate() { if ( Kleo::DeleteJob * job = Kleo::CryptoBackendFactory::instance()->smime()->deleteJob() ) job->slotCancel(); else { - QString str = keys.size() == 1 + TQString str = keys.size() == 1 ? i18n("<qt><p>An error occurred while trying to delete " "the certificate:</p>" "<p><b>%1</b><p></qt>" ) @@ -1109,8 +1109,8 @@ void CertManager::slotDeleteCertificate() { Kleo::MultiDeleteJob * job = new Kleo::MultiDeleteJob( Kleo::CryptoBackendFactory::instance()->smime() ); assert( job ); - connect( job, SIGNAL(result(const GpgME::Error&,const GpgME::Key&)), - SLOT(slotDeleteResult(const GpgME::Error&,const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const GpgME::Key&)), + TQT_SLOT(slotDeleteResult(const GpgME::Error&,const GpgME::Key&)) ); connectJobToStatusBarProgress( job, i18n("Deleting keys...") ); @@ -1128,7 +1128,7 @@ void CertManager::slotDeleteResult( const GpgME::Error & err, const GpgME::Key & const int infinity = 100; // infinite loop guard... mItemsToDelete.setAutoDelete( true ); for ( int i = 0 ; i < infinity ; ++i ) { - QPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ); + TQPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ); while ( Kleo::KeyListViewItem * cur = it.current() ) { ++it; if ( cur->childCount() == 0 ) { @@ -1155,14 +1155,14 @@ void CertManager::slotViewDetails( Kleo::KeyListViewItem * item ) { CertificateInfoWidgetImpl * top = new CertificateInfoWidgetImpl( item->key(), isRemote(), dialog ); dialog->setMainWidget( top ); // </UGH> - connect( top, SIGNAL(requestCertificateDownload(const QString&, const QString&)), - SLOT(slotStartCertificateDownload(const QString&, const QString&)) ); + connect( top, TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)), + TQT_SLOT(slotStartCertificateDownload(const TQString&, const TQString&)) ); dialog->show(); } void CertManager::slotViewDetails() { - QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems(); + TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems(); if ( items.isEmpty() ) return; @@ -1187,12 +1187,12 @@ void CertManager::slotSelectionChanged() } void CertManager::slotExportCertificate() { - QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems(); + TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems(); if ( items.isEmpty() ) return; - QStringList fingerprints; - for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it ) + TQStringList fingerprints; + for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it ) if ( !it.current()->key().isNull() ) if ( const char * fpr = it.current()->key().primaryFingerprint() ) fingerprints.push_back( fpr ); @@ -1200,16 +1200,16 @@ void CertManager::slotExportCertificate() { startCertificateExport( fingerprints ); } -static void showCertificateExportError( QWidget * parent, const GpgME::Error & err ) { +static void showCertificateExportError( TQWidget * parent, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n("<qt><p>An error occurred while trying to export " + const TQString msg = i18n("<qt><p>An error occurred while trying to export " "the certificate:</p>" "<p><b>%1</b></p></qt>") - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n("Certificate Export Failed") ); } -void CertManager::startCertificateExport( const QStringList & fingerprints ) { +void CertManager::startCertificateExport( const TQStringList & fingerprints ) { if ( fingerprints.empty() ) return; @@ -1218,8 +1218,8 @@ void CertManager::startCertificateExport( const QStringList & fingerprints ) { Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->publicKeyExportJob( true ); assert( job ); - connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)), - SLOT(slotCertificateExportResult(const GpgME::Error&,const QByteArray&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)), + TQT_SLOT(slotCertificateExportResult(const GpgME::Error&,const TQByteArray&)) ); connectJobToStatusBarProgress( job, i18n("Exporting certificate...") ); @@ -1231,7 +1231,7 @@ void CertManager::startCertificateExport( const QStringList & fingerprints ) { } // return true if we should proceed, false if we should abort -static bool checkOverwrite( const KURL& url, bool& overwrite, QWidget* w ) +static bool checkOverwrite( const KURL& url, bool& overwrite, TQWidget* w ) { if ( KIO::NetAccess::exists( url, false /*dest*/, w ) ) { if ( KMessageBox::Cancel == @@ -1247,7 +1247,7 @@ static bool checkOverwrite( const KURL& url, bool& overwrite, QWidget* w ) return true; } -void CertManager::slotCertificateExportResult( const GpgME::Error & err, const QByteArray & data ) { +void CertManager::slotCertificateExportResult( const GpgME::Error & err, const TQByteArray & data ) { disconnectJobFromStatusBarProgress( err ); if ( err ) { showCertificateExportError( this, err ); @@ -1256,8 +1256,8 @@ void CertManager::slotCertificateExportResult( const GpgME::Error & err, const Q kdDebug() << "CertManager::slotCertificateExportResult(): got " << data.size() << " bytes" << endl; - const QString filter = QString("*.pem|") + i18n("ASCII Armored Certificate Bundles (*.pem)"); - const KURL url = KFileDialog::getOpenURL( QString::null, + const TQString filter = TQString("*.pem|") + i18n("ASCII Armored Certificate Bundles (*.pem)"); + const KURL url = KFileDialog::getOpenURL( TQString::null, filter, this, i18n( "Save Certificate" ) ); @@ -1270,8 +1270,8 @@ void CertManager::slotCertificateExportResult( const GpgME::Error & err, const Q KIO::Job* uploadJob = KIOext::put( data, url, -1, overwrite, false /*resume*/ ); uploadJob->setWindow( this ); - connect( uploadJob, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotUploadResult( KIO::Job* ) ) ); + connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) ); } @@ -1287,22 +1287,22 @@ void CertManager::slotExportSecretKey() { this, "secret key export key selection dialog" ); //dlg.setHideInvalidKeys( false ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; startSecretKeyExport( dlg.fingerprint() ); } -static void showSecretKeyExportError( QWidget * parent, const GpgME::Error & err ) { +static void showSecretKeyExportError( TQWidget * parent, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n("<qt><p>An error occurred while trying to export " + const TQString msg = i18n("<qt><p>An error occurred while trying to export " "the secret key:</p>" "<p><b>%1</b></p></qt>") - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n("Secret-Key Export Failed") ); } -void CertManager::startSecretKeyExport( const QString & fingerprint ) { +void CertManager::startSecretKeyExport( const TQString & fingerprint ) { if ( fingerprint.isEmpty() ) return; @@ -1310,7 +1310,7 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) { // Check if gpgsm supports --p12-charset Kleo::CryptoConfig* config = Kleo::CryptoBackendFactory::instance()->config(); - QString charset; + TQString charset; if ( config && config->entry( "gpgsm", "Configuration", "p12-charset" ) ) { // This comes from gnupg's sources, agent/minip12.c // In fact, any charset supported by iconv would work, but we don't link to iconv directly... @@ -1333,9 +1333,9 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) { "big5", NULL }; - QStringList charsetList; + TQStringList charsetList; for ( const char** c = charsets; *c; ++c ) { - charsetList.append( QString::fromLatin1( *c ) ); + charsetList.append( TQString::fromLatin1( *c ) ); } // TODO this selection could be done in a derived KeySelectionDialog which would add a combobox, @@ -1353,8 +1353,8 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) { Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->secretKeyExportJob( false, charset ); assert( job ); - connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)), - SLOT(slotSecretKeyExportResult(const GpgME::Error&,const QByteArray&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)), + TQT_SLOT(slotSecretKeyExportResult(const GpgME::Error&,const TQByteArray&)) ); connectJobToStatusBarProgress( job, i18n("Exporting secret key...") ); @@ -1365,7 +1365,7 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) { mProgressBar->setProgress( 0, 0 ); } -void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QByteArray & data ) { +void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const TQByteArray & data ) { disconnectJobFromStatusBarProgress( err ); if ( err ) { showSecretKeyExportError( this, err ); @@ -1373,8 +1373,8 @@ void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QBy } kdDebug() << "CertManager::slotSecretKeyExportResult(): got " << data.size() << " bytes" << endl; - QString filter = QString("*.p12|") + i18n("PKCS#12 Key Bundle (*.p12)"); - KURL url = KFileDialog::getOpenURL( QString::null, + TQString filter = TQString("*.p12|") + i18n("PKCS#12 Key Bundle (*.p12)"); + KURL url = KFileDialog::getOpenURL( TQString::null, filter, this, i18n( "Save Certificate" ) ); @@ -1387,8 +1387,8 @@ void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QBy KIO::Job* uploadJob = KIOext::put( data, url, -1, overwrite, false /*resume*/ ); uploadJob->setWindow( this ); - connect( uploadJob, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotUploadResult( KIO::Job* ) ) ); + connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) ); } void CertManager::slotUploadResult( KIO::Job* job ) diff --git a/certmanager/certmanager.h b/certmanager/certmanager.h index 915e079eb..4aacaf70d 100644 --- a/certmanager/certmanager.h +++ b/certmanager/certmanager.h @@ -38,8 +38,8 @@ #include <kmainwindow.h> #include <kdepimmacros.h> #include <kurl.h> -#include <qcstring.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqptrlist.h> #include <set> #include <string> @@ -79,9 +79,9 @@ namespace GpgME { class KDE_EXPORT CertManager : public KMainWindow { Q_OBJECT public: - CertManager( bool remote = false, const QString& query = QString::null, - const QString& import=QString::null, - QWidget * parent=0, const char * name=0, WFlags f=0 ); + CertManager( bool remote = false, const TQString& query = TQString::null, + const TQString& import=TQString::null, + TQWidget * parent=0, const char * name=0, WFlags f=0 ); ~CertManager(); bool isRemote() const { return mRemote; } @@ -91,7 +91,7 @@ signals: void enableOperations( bool ); private slots: - void slotStartCertificateDownload( const QString & fingerprint, const QString& displayName ); + void slotStartCertificateDownload( const TQString & fingerprint, const TQString& displayName ); void newCertificate(); void revokeCertificate(); void extendCertificate(); @@ -105,11 +105,11 @@ private slots: void slotImportResult( KIO::Job* ); void slotCertificateImportResult( const GpgME::ImportResult & result ); - void slotCertificateDownloadResult( const GpgME::Error & error, const QByteArray & keyData ); + void slotCertificateDownloadResult( const GpgME::Error & error, const TQByteArray & keyData ); void slotKeyListResult( const GpgME::KeyListResult & result ); void slotDeleteResult( const GpgME::Error & error, const GpgME::Key & ); - void slotSecretKeyExportResult( const GpgME::Error & error, const QByteArray & keyData ); - void slotCertificateExportResult( const GpgME::Error & error, const QByteArray & keyData ); + void slotSecretKeyExportResult( const GpgME::Error & error, const TQByteArray & keyData ); + void slotCertificateExportResult( const GpgME::Error & error, const TQByteArray & keyData ); void slotClearCRLsResult(); void importCRLFromFile(); @@ -134,7 +134,7 @@ private slots: void slotEditKeybindings(); void slotShowConfigurationDialog(); void slotConfigureGpgME(); - void slotContextMenu(Kleo::KeyListViewItem*, const QPoint& point); + void slotContextMenu(Kleo::KeyListViewItem*, const TQPoint& point); void slotDropped(const KURL::List&); /** Schedule a repaint for the listview items. E.g. when the colour config has changed */ @@ -159,19 +159,19 @@ private: void createActions(); void updateStatusBarLabels(); void updateImportActions( bool enable ); - void startKeyListing( bool, bool, const QStringList & ); + void startKeyListing( bool, bool, const TQStringList & ); void startKeyListing( bool, bool, const std::set<std::string> & ); - void startCertificateImport( const QByteArray & keyData, const QString& certDisplayName ); - void startImportCRL( const QString& fileName, bool isTempFile ); + void startCertificateImport( const TQByteArray & keyData, const TQString& certDisplayName ); + void startImportCRL( const TQString& fileName, bool isTempFile ); void startClearCRLs(); - void startSecretKeyExport( const QString & fingerprint ); - void startCertificateExport( const QStringList & fingerprints ); + void startSecretKeyExport( const TQString & fingerprint ); + void startCertificateExport( const TQStringList & fingerprints ); bool connectAndStartDirmngr( const char*, const char* ); - void connectJobToStatusBarProgress( Kleo::Job * job, const QString & initialText ); + void connectJobToStatusBarProgress( Kleo::Job * job, const TQString & initialText ); void disconnectJobFromStatusBarProgress( const GpgME::Error & err ); void importNextURLOrRedisplay(); void startRedisplay( bool validating ); - QString displayNameForJob( const Kleo::Job *job ); + TQString displayNameForJob( const Kleo::Job *job ); void readConfig( bool noQueryGiven ); void writeConfig(); @@ -179,13 +179,13 @@ private: Kleo::KeyListView * mKeyListView; CRLView * mCrlView; Kleo::ProgressBar * mProgressBar; - QLabel * mStatusLabel; + TQLabel * mStatusLabel; KProcess * mDirmngrProc; - QString mErrorbuffer; - QPtrList<Kleo::KeyListViewItem> mItemsToDelete; + TQString mErrorbuffer; + TQPtrList<Kleo::KeyListViewItem> mItemsToDelete; KURL::List mURLsToImport; - typedef QMap<const Kleo::Job *, QString> JobsDisplayNameMap; + typedef TQMap<const Kleo::Job *, TQString> JobsDisplayNameMap; JobsDisplayNameMap mJobsDisplayNameMap; HierarchyAnalyser * mHierarchyAnalyser; @@ -205,8 +205,8 @@ private: KAction * mDownloadCertificateAction; KAction * mValidateCertificateAction; - QString mImportCRLTempFile; - QString mCurrentQuery; + TQString mImportCRLTempFile; + TQString mCurrentQuery; std::set<std::string> mPreviouslySelectedFingerprints; bool mNextFindRemote : 1; // state of the combo, i.e. whether the next find action will be remote bool mRemote : 1; // whether the currently displayed items are from a remote listing diff --git a/certmanager/conf/appearanceconfigpage.cpp b/certmanager/conf/appearanceconfigpage.cpp index 5d2a434cc..e0893233e 100644 --- a/certmanager/conf/appearanceconfigpage.cpp +++ b/certmanager/conf/appearanceconfigpage.cpp @@ -30,7 +30,7 @@ */ #include "appearanceconfigpage.h" -#include <qlayout.h> +#include <tqlayout.h> #include "appearanceconfigwidget.h" #include <kmessagebox.h> #include <klocale.h> @@ -38,13 +38,13 @@ #include <kdepimmacros.h> -AppearanceConfigurationPage::AppearanceConfigurationPage( QWidget * parent, const char * name ) +AppearanceConfigurationPage::AppearanceConfigurationPage( TQWidget * parent, const char * name ) : KCModule( parent, name ) { - QVBoxLayout* lay = new QVBoxLayout( this ); + TQVBoxLayout* lay = new TQVBoxLayout( this ); mWidget = new Kleo::AppearanceConfigWidget( this ); lay->addWidget( mWidget ); - connect( mWidget, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( mWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); #ifndef HAVE_UNBROKEN_KCMULTIDIALOG load(); @@ -70,7 +70,7 @@ void AppearanceConfigurationPage::defaults() extern "C" { - KDE_EXPORT KCModule *create_kleopatra_config_appear( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kleopatra_config_appear( TQWidget *parent, const char * ) { AppearanceConfigurationPage *page = new AppearanceConfigurationPage( parent, "kleopatra_config_appear" ); diff --git a/certmanager/conf/appearanceconfigpage.h b/certmanager/conf/appearanceconfigpage.h index c3acea007..4713e262d 100644 --- a/certmanager/conf/appearanceconfigpage.h +++ b/certmanager/conf/appearanceconfigpage.h @@ -44,7 +44,7 @@ namespace Kleo { class AppearanceConfigurationPage : public KCModule { Q_OBJECT public: - AppearanceConfigurationPage( QWidget * parent=0, const char * name=0 ); + AppearanceConfigurationPage( TQWidget * parent=0, const char * name=0 ); virtual void load(); virtual void save(); diff --git a/certmanager/conf/appearanceconfigwidget.cpp b/certmanager/conf/appearanceconfigwidget.cpp index a3d177c2a..27797dfe7 100644 --- a/certmanager/conf/appearanceconfigwidget.cpp +++ b/certmanager/conf/appearanceconfigwidget.cpp @@ -49,15 +49,15 @@ #include <kfontdialog.h> #include <kcolordialog.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qheader.h> -#include <qcolor.h> -#include <qfont.h> -#include <qstring.h> -#include <qpainter.h> -#include <qregexp.h> -#include <qcheckbox.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqstring.h> +#include <tqpainter.h> +#include <tqregexp.h> +#include <tqcheckbox.h> #include <assert.h> @@ -66,8 +66,8 @@ using namespace Kleo; class CategoryListViewItem : public QListViewItem { public: - CategoryListViewItem( QListView* lv, QListViewItem* prev, const KConfigBase& config ) - : QListViewItem( lv, prev ) { + CategoryListViewItem( TQListView* lv, TQListViewItem* prev, const KConfigBase& config ) + : TQListViewItem( lv, prev ) { setName( config.readEntry( "Name", i18n("<unnamed>") ) ); mForegroundColor = config.readColorEntry( "foreground-color" ); @@ -99,9 +99,9 @@ public: config.writeEntry( "font-strikeout", mStrikeOut ); } - void setForegroundColor( const QColor& foreground ) { mForegroundColor = foreground; mDirty = true; } - void setBackgroundColor( const QColor& background ) { mBackgroundColor = background; mDirty = true; } - void setFont( const QFont& font ) { + void setForegroundColor( const TQColor& foreground ) { mForegroundColor = foreground; mDirty = true; } + void setBackgroundColor( const TQColor& background ) { mBackgroundColor = background; mDirty = true; } + void setFont( const TQFont& font ) { mFont = font; mHasFont = true; mItalic = font.italic(); @@ -109,15 +109,15 @@ public: mDirty = true; } - QColor foregroundColor() const { return mForegroundColor; } - QColor backgroundColor() const { return mBackgroundColor; } - QFont font() const { return mFont; } + TQColor foregroundColor() const { return mForegroundColor; } + TQColor backgroundColor() const { return mBackgroundColor; } + TQFont font() const { return mFont; } void setDefaultAppearance() { - mForegroundColor = mIsExpired ? Qt::red : QColor(); - mBackgroundColor = QColor(); + mForegroundColor = mIsExpired ? Qt::red : TQColor(); + mBackgroundColor = TQColor(); mHasFont = false; - mFont = QFont(); + mFont = TQFont(); mBold = false; mItalic = false; mStrikeOut = false; @@ -135,15 +135,15 @@ public: void toggleStrikeout() { mStrikeOut = !mStrikeOut; mDirty = true; } private: - void setName( const QString& name ) { + void setName( const TQString& name ) { setText( 0, name ); } - void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ); + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ); private: - QColor mForegroundColor, mBackgroundColor; - QFont mFont; + TQColor mForegroundColor, mBackgroundColor; + TQFont mFont; bool mHasFont; bool mIsExpired; // used for default settings bool mItalic; @@ -152,9 +152,9 @@ private: bool mDirty; }; -void CategoryListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) { - QColorGroup _cg = cg; - QFont font = p->font(); +void CategoryListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) { + TQColorGroup _cg = cg; + TQFont font = p->font(); if ( mHasFont ) font = mFont; else { @@ -168,17 +168,17 @@ void CategoryListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int p->setFont( font ); if ( mForegroundColor.isValid() ) - _cg.setColor( QColorGroup::Text, mForegroundColor ); + _cg.setColor( TQColorGroup::Text, mForegroundColor ); if ( mBackgroundColor.isValid() ) - _cg.setColor( QColorGroup::Base, mBackgroundColor ); + _cg.setColor( TQColorGroup::Base, mBackgroundColor ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); } //// Kleo::AppearanceConfigWidget::AppearanceConfigWidget ( - QWidget* parent, const char* name, WFlags fl ) + TQWidget* parent, const char* name, WFlags fl ) : AppearanceConfigWidgetBase( parent, name, fl ) { categoriesLV->setSorting( -1 ); @@ -196,7 +196,7 @@ AppearanceConfigWidget::~AppearanceConfigWidget() } -void AppearanceConfigWidget::slotSelectionChanged( QListViewItem* item ) +void AppearanceConfigWidget::slotSelectionChanged( TQListViewItem* item ) { bool sel = item != 0; foregroundButton->setEnabled( sel ); @@ -238,8 +238,8 @@ void AppearanceConfigWidget::load() KConfig * config = Kleo::CryptoBackendFactory::instance()->configObject(); if ( !config ) return; - QStringList groups = config->groupList().grep( QRegExp( "^Key Filter #\\d+$" ) ); - for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) { + TQStringList groups = config->groupList().grep( TQRegExp( "^Key Filter #\\d+$" ) ); + for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) { KConfigGroup cfg( config, *it ); (void) new CategoryListViewItem( categoriesLV, categoriesLV->lastItem(), cfg ); } @@ -252,16 +252,16 @@ void AppearanceConfigWidget::save() return; // We know (assume) that the groups in the config object haven't changed, // so we just iterate over them and over the listviewitems, and map one-to-one. - QStringList groups = config->groupList().grep( QRegExp( "^Key Filter #\\d+$" ) ); + TQStringList groups = config->groupList().grep( TQRegExp( "^Key Filter #\\d+$" ) ); if ( groups.isEmpty() ) { // If we created the default categories ourselves just now, then we need to make up their list - QListViewItemIterator lvit( categoriesLV ); + TQListViewItemIterator lvit( categoriesLV ); for ( ; lvit.current() ; ++lvit ) groups << lvit.current()->text( 0 ); } - QListViewItemIterator lvit( categoriesLV ); - for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() && lvit.current(); ++it, ++lvit ) { + TQListViewItemIterator lvit( categoriesLV ); + for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() && lvit.current(); ++it, ++lvit ) { CategoryListViewItem* item = static_cast<CategoryListViewItem*>(lvit.current() ); KConfigGroup cfg( config, *it ); item->save( cfg ); @@ -276,7 +276,7 @@ void AppearanceConfigWidget::slotForegroundClicked() { Q_ASSERT( item ); if( !item ) return; - QColor fg = item->foregroundColor(); + TQColor fg = item->foregroundColor(); int result = KColorDialog::getColor( fg ); if ( result == KColorDialog::Accepted ) { item->setForegroundColor( fg ); @@ -290,7 +290,7 @@ void AppearanceConfigWidget::slotBackgroundClicked() { Q_ASSERT( item ); if( !item ) return; - QColor bg = item->backgroundColor(); + TQColor bg = item->backgroundColor(); int result = KColorDialog::getColor( bg ); if ( result == KColorDialog::Accepted ) { item->setBackgroundColor( bg ); @@ -304,7 +304,7 @@ void AppearanceConfigWidget::slotFontClicked() { Q_ASSERT( item ); if( !item ) return; - QFont font = item->font(); + TQFont font = item->font(); int result = KFontDialog::getFont( font ); if ( result == KFontDialog::Accepted ) { item->setFont( font ); @@ -316,7 +316,7 @@ void AppearanceConfigWidget::slotFontClicked() { void AppearanceConfigWidget::defaults() { // This simply means "default look for every category" - QListViewItemIterator lvit( categoriesLV ); + TQListViewItemIterator lvit( categoriesLV ); for ( ; lvit.current() ; ++lvit ) { CategoryListViewItem* item = static_cast<CategoryListViewItem *>( lvit.current() ); item->setDefaultAppearance(); diff --git a/certmanager/conf/appearanceconfigwidget.h b/certmanager/conf/appearanceconfigwidget.h index dc5c79766..5e7c1f8cb 100644 --- a/certmanager/conf/appearanceconfigwidget.h +++ b/certmanager/conf/appearanceconfigwidget.h @@ -35,7 +35,7 @@ #define APPEARANCECONFIGWIDGET_H #include "appearanceconfigwidgetbase.h" -#include <qstringlist.h> +#include <tqstringlist.h> class KConfig; namespace Kleo { @@ -45,7 +45,7 @@ namespace Kleo { public: AppearanceConfigWidget( - QWidget * parent=0, const char * name=0, WFlags f=0 ); + TQWidget * parent=0, const char * name=0, WFlags f=0 ); ~AppearanceConfigWidget(); void load(); @@ -60,7 +60,7 @@ namespace Kleo { protected slots: // reimplemented from the base class virtual void slotDefaultClicked(); - virtual void slotSelectionChanged( QListViewItem * ); + virtual void slotSelectionChanged( TQListViewItem * ); virtual void slotForegroundClicked(); virtual void slotBackgroundClicked(); virtual void slotFontClicked(); diff --git a/certmanager/conf/configuredialog.cpp b/certmanager/conf/configuredialog.cpp index 87976f106..e9f16f109 100644 --- a/certmanager/conf/configuredialog.cpp +++ b/certmanager/conf/configuredialog.cpp @@ -38,7 +38,7 @@ #include <kconfig.h> #include <klocale.h> -ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal ) +ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal ) : KCMultiDialog( KDialogBase::IconList, i18n( "Configure" ), parent, name, modal ) { KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() ); @@ -61,7 +61,7 @@ ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal } -void ConfigureDialog::hideEvent( QHideEvent * ) { +void ConfigureDialog::hideEvent( TQHideEvent * ) { KConfigGroup geometry( KGlobal::config(), "Geometry" ); geometry.writeEntry( "ConfigureDialogWidth", width() ); geometry.writeEntry( "ConfigureDialogHeight",height() ); diff --git a/certmanager/conf/configuredialog.h b/certmanager/conf/configuredialog.h index 40b7e371b..436816dd1 100644 --- a/certmanager/conf/configuredialog.h +++ b/certmanager/conf/configuredialog.h @@ -41,11 +41,11 @@ class ConfigureDialog : public KCMultiDialog Q_OBJECT public: - ConfigureDialog( QWidget *parent=0, const char *name=0, bool modal=true ); + ConfigureDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); ~ConfigureDialog(); protected: - void hideEvent( QHideEvent *i ); + void hideEvent( TQHideEvent *i ); }; diff --git a/certmanager/conf/dirservconfigpage.cpp b/certmanager/conf/dirservconfigpage.cpp index 7711ca2e2..73fad674a 100644 --- a/certmanager/conf/dirservconfigpage.cpp +++ b/certmanager/conf/dirservconfigpage.cpp @@ -41,11 +41,11 @@ #include <knuminput.h> #include <kdialog.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qdatetimeedit.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqdatetimeedit.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <kdepimmacros.h> @@ -65,25 +65,25 @@ public: // stolen from kabc/ldapclient.cpp const uint numHosts = mConfig.readUnsignedNumEntry( "NumSelectedHosts" ); for ( uint j = 0; j < numHosts; j++ ) { - const QString num = QString::number( j ); + const TQString num = TQString::number( j ); KURL url; url.setProtocol( "ldap" ); url.setPath( "/" ); // workaround KURL parsing bug - const QString host = mConfig.readEntry( QString( "SelectedHost" ) + num ).stripWhiteSpace(); + const TQString host = mConfig.readEntry( TQString( "SelectedHost" ) + num ).stripWhiteSpace(); url.setHost( host ); - const int port = mConfig.readUnsignedNumEntry( QString( "SelectedPort" ) + num ); + const int port = mConfig.readUnsignedNumEntry( TQString( "SelectedPort" ) + num ); if ( port != 0 ) url.setPort( port ); - const QString base = mConfig.readEntry( QString( "SelectedBase" ) + num ).stripWhiteSpace(); + const TQString base = mConfig.readEntry( TQString( "SelectedBase" ) + num ).stripWhiteSpace(); url.setQuery( base ); - const QString bindDN = mConfig.readEntry( QString( "SelectedBind" ) + num ).stripWhiteSpace(); + const TQString bindDN = mConfig.readEntry( TQString( "SelectedBind" ) + num ).stripWhiteSpace(); url.setUser( bindDN ); - const QString pwdBindDN = mConfig.readEntry( QString( "SelectedPwdBind" ) + num ).stripWhiteSpace(); + const TQString pwdBindDN = mConfig.readEntry( TQString( "SelectedPwdBind" ) + num ).stripWhiteSpace(); url.setPass( pwdBindDN ); lst.append( url ); } @@ -98,19 +98,19 @@ public: KURL::List::const_iterator end = lst.end(); unsigned j = 0; for( ; it != end; ++it, ++j ) { - const QString num = QString::number( j ); + const TQString num = TQString::number( j ); KURL url = *it; Q_ASSERT( url.protocol() == "ldap" ); - mConfig.writeEntry( QString( "SelectedHost" ) + num, url.host() ); - mConfig.writeEntry( QString( "SelectedPort" ) + num, url.port() ); + mConfig.writeEntry( TQString( "SelectedHost" ) + num, url.host() ); + mConfig.writeEntry( TQString( "SelectedPort" ) + num, url.port() ); // KURL automatically encoded the query (e.g. for spaces inside it), // so decode it before writing it out - const QString base = KURL::decode_string( url.query().mid(1) ); - mConfig.writeEntry( QString( "SelectedBase" ) + num, base ); - mConfig.writeEntry( QString( "SelectedBind" ) + num, url.user() ); - mConfig.writeEntry( QString( "SelectedPwdBind" ) + num, url.pass() ); + const TQString base = KURL::decode_string( url.query().mid(1) ); + mConfig.writeEntry( TQString( "SelectedBase" ) + num, base ); + mConfig.writeEntry( TQString( "SelectedBind" ) + num, url.user() ); + mConfig.writeEntry( TQString( "SelectedPwdBind" ) + num, url.pass() ); } mConfig.sync(); } @@ -137,43 +137,43 @@ static const char s_addnewservers_componentName[] = "dirmngr"; static const char s_addnewservers_groupName[] = "LDAP"; static const char s_addnewservers_entryName[] = "add-servers"; -DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage( QWidget * parent, const char * name ) +DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage( TQWidget * parent, const char * name ) : KCModule( parent, name ) { mConfig = Kleo::CryptoBackendFactory::instance()->config(); - QVBoxLayout* lay = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout* lay = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); Kleo::CryptoConfigEntry* entry = configEntry( s_dirserv_componentName, s_dirserv_groupName, s_dirserv_entryName, Kleo::CryptoConfigEntry::ArgType_LDAPURL, true ); mWidget = new Kleo::DirectoryServicesWidget( entry, this ); lay->addWidget( mWidget ); - connect( mWidget, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( mWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); // LDAP timeout - QHBox* box = new QHBox( this ); + TQHBox* box = new TQHBox( this ); box->setSpacing( KDialog::spacingHint() ); lay->addWidget( box ); - QLabel* label = new QLabel( i18n( "LDAP &timeout (minutes:seconds)" ), box ); + TQLabel* label = new TQLabel( i18n( "LDAP &timeout (minutes:seconds)" ), box ); mTimeout = new QTimeEdit( box ); mTimeout->setDisplay( QTimeEdit::Minutes | QTimeEdit::Seconds ); - connect( mTimeout, SIGNAL( valueChanged( const QTime& ) ), this, SLOT( slotChanged() ) ); + connect( mTimeout, TQT_SIGNAL( valueChanged( const TQTime& ) ), this, TQT_SLOT( slotChanged() ) ); label->setBuddy( mTimeout ); - QWidget* stretch = new QWidget( box ); + TQWidget* stretch = new TQWidget( box ); box->setStretchFactor( stretch, 2 ); // Max number of items returned by queries - box = new QHBox( this ); + box = new TQHBox( this ); box->setSpacing( KDialog::spacingHint() ); lay->addWidget( box ); mMaxItems = new KIntNumInput( box ); mMaxItems->setLabel( i18n( "&Maximum number of items returned by query" ), Qt::AlignLeft | Qt::AlignVCenter ); mMaxItems->setMinValue( 0 ); - connect( mMaxItems, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) ); - stretch = new QWidget( box ); + connect( mMaxItems, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) ); + stretch = new TQWidget( box ); box->setStretchFactor( stretch, 2 ); #ifdef NOT_USEFUL_CURRENTLY - mAddNewServersCB = new QCheckBox( i18n( "Automatically add &new servers discovered in CRL distribution points" ), this ); - connect( mAddNewServersCB, SIGNAL( clicked() ), this, SLOT( slotChanged() ) ); + mAddNewServersCB = new TQCheckBox( i18n( "Automatically add &new servers discovered in CRL distribution points" ), this ); + connect( mAddNewServersCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) ); lay->addWidget( mAddNewServersCB ); #endif @@ -188,7 +188,7 @@ void DirectoryServicesConfigurationPage::load() mTimeoutConfigEntry = configEntry( s_timeout_componentName, s_timeout_groupName, s_timeout_entryName, Kleo::CryptoConfigEntry::ArgType_UInt, false ); if ( mTimeoutConfigEntry ) { - QTime time = QTime().addSecs( mTimeoutConfigEntry->uintValue() ); + TQTime time = TQTime().addSecs( mTimeoutConfigEntry->uintValue() ); //kdDebug() << "timeout:" << mTimeoutConfigEntry->uintValue() << " -> " << time << endl; mTimeout->setTime( time ); } @@ -212,7 +212,7 @@ void DirectoryServicesConfigurationPage::save() { mWidget->save(); - QTime time( mTimeout->time() ); + TQTime time( mTimeout->time() ); unsigned int timeout = time.minute() * 60 + time.second(); if ( mTimeoutConfigEntry && mTimeoutConfigEntry->uintValue() != timeout ) mTimeoutConfigEntry->setUIntValue( timeout ); @@ -259,7 +259,7 @@ void DirectoryServicesConfigurationPage::defaults() extern "C" { - KDE_EXPORT KCModule *create_kleopatra_config_dirserv( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kleopatra_config_dirserv( TQWidget *parent, const char * ) { DirectoryServicesConfigurationPage *page = new DirectoryServicesConfigurationPage( parent, "kleopatra_config_dirserv" ); diff --git a/certmanager/conf/dirservconfigpage.h b/certmanager/conf/dirservconfigpage.h index 8c7c75439..2ec688204 100644 --- a/certmanager/conf/dirservconfigpage.h +++ b/certmanager/conf/dirservconfigpage.h @@ -53,7 +53,7 @@ namespace Kleo { class KDE_EXPORT DirectoryServicesConfigurationPage : public KCModule { Q_OBJECT public: - DirectoryServicesConfigurationPage( QWidget * parent=0, const char * name=0 ); + DirectoryServicesConfigurationPage( TQWidget * parent=0, const char * name=0 ); virtual void load(); virtual void save(); @@ -72,7 +72,7 @@ private: Kleo::DirectoryServicesWidget* mWidget; QTimeEdit* mTimeout; KIntNumInput* mMaxItems; - QCheckBox* mAddNewServersCB; + TQCheckBox* mAddNewServersCB; Kleo::CryptoConfigEntry* mTimeoutConfigEntry; Kleo::CryptoConfigEntry* mMaxItemsConfigEntry; diff --git a/certmanager/conf/dnorderconfigpage.cpp b/certmanager/conf/dnorderconfigpage.cpp index 44b86b5b8..bc358f912 100644 --- a/certmanager/conf/dnorderconfigpage.cpp +++ b/certmanager/conf/dnorderconfigpage.cpp @@ -36,16 +36,16 @@ #include <kdepimmacros.h> -#include <qlayout.h> +#include <tqlayout.h> -DNOrderConfigPage::DNOrderConfigPage( QWidget * parent, const char * name ) +DNOrderConfigPage::DNOrderConfigPage( TQWidget * parent, const char * name ) : KCModule( parent, name ) { - QVBoxLayout * vlay = new QVBoxLayout( this ); + TQVBoxLayout * vlay = new TQVBoxLayout( this ); mWidget = Kleo::DNAttributeMapper::instance()->configWidget( this, "mWidget" ); vlay->addWidget( mWidget ); - connect( mWidget, SIGNAL(changed()), SLOT(slotChanged()) ); + connect( mWidget, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()) ); #ifndef HAVE_UNBROKEN_KCMULTIDIALOG load(); @@ -70,7 +70,7 @@ void DNOrderConfigPage::slotChanged() { emit changed(true); } -extern "C" KDE_EXPORT KCModule * create_kleopatra_config_dnorder( QWidget * parent, const char * ) { +extern "C" KDE_EXPORT KCModule * create_kleopatra_config_dnorder( TQWidget * parent, const char * ) { return new DNOrderConfigPage( parent, "kleopatra_config_dnorder" ); } diff --git a/certmanager/conf/dnorderconfigpage.h b/certmanager/conf/dnorderconfigpage.h index c874c7527..aedc0e829 100644 --- a/certmanager/conf/dnorderconfigpage.h +++ b/certmanager/conf/dnorderconfigpage.h @@ -44,7 +44,7 @@ namespace Kleo { class DNOrderConfigPage : public KCModule { Q_OBJECT public: - DNOrderConfigPage( QWidget * parent=0, const char * name=0 ); + DNOrderConfigPage( TQWidget * parent=0, const char * name=0 ); /*! reimplementation */ void load(); diff --git a/certmanager/crlview.cpp b/certmanager/crlview.cpp index 6cf7ddeaa..49a82f98d 100644 --- a/certmanager/crlview.cpp +++ b/certmanager/crlview.cpp @@ -43,25 +43,25 @@ #include <kstdguiitem.h> #include <kglobalsettings.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtextedit.h> -#include <qfontmetrics.h> -#include <qtimer.h> - -CRLView::CRLView( QWidget* parent, const char* name, bool modal ) - : QDialog( parent, name, modal ), _process(0) +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtextedit.h> +#include <tqfontmetrics.h> +#include <tqtimer.h> + +CRLView::CRLView( TQWidget* parent, const char* name, bool modal ) + : TQDialog( parent, name, modal ), _process(0) { - QVBoxLayout* topLayout = new QVBoxLayout( this, 10, 4 ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this, 10, 4 ); - topLayout->addWidget( new QLabel( i18n("CRL cache dump:"), this ) ); + topLayout->addWidget( new TQLabel( i18n("CRL cache dump:"), this ) ); - _textView = new QTextEdit( this ); + _textView = new TQTextEdit( this ); _textView->setFont( KGlobalSettings::fixedFont() ); - _textView->setTextFormat( QTextEdit::LogText ); + _textView->setTextFormat( TQTextEdit::LogText ); topLayout->addWidget( _textView ); - QHBoxLayout* hbLayout = new QHBoxLayout( topLayout ); + TQHBoxLayout* hbLayout = new TQHBoxLayout( topLayout ); _updateButton = new KPushButton( i18n("&Update"), this ); _closeButton = new KPushButton( KStdGuiItem::close(), this ); @@ -71,16 +71,16 @@ CRLView::CRLView( QWidget* parent, const char* name, bool modal ) hbLayout->addWidget( _closeButton ); // connections: - connect( _updateButton, SIGNAL( clicked() ), - this, SLOT( slotUpdateView() ) ); - connect( _closeButton, SIGNAL( clicked() ), - this, SLOT( close() ) ); + connect( _updateButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotUpdateView() ) ); + connect( _closeButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( close() ) ); resize( _textView->fontMetrics().width( 'M' ) * 80, _textView->fontMetrics().lineSpacing() * 25 ); - _timer = new QTimer( this ); - connect( _timer, SIGNAL(timeout()), SLOT(slotAppendBuffer()) ); + _timer = new TQTimer( this ); + connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAppendBuffer()) ); } CRLView::~CRLView() @@ -88,8 +88,8 @@ CRLView::~CRLView() delete _process; _process = 0; } -void CRLView::closeEvent( QCloseEvent * e ) { - QDialog::closeEvent( e ); +void CRLView::closeEvent( TQCloseEvent * e ) { + TQDialog::closeEvent( e ); delete _process; _process = 0; } @@ -97,14 +97,14 @@ void CRLView::slotUpdateView() { _updateButton->setEnabled( false ); _textView->clear(); - _buffer = QString::null; + _buffer = TQString::null; if( _process == 0 ) { _process = new KProcess(); *_process << "gpgsm" << "--call-dirmngr" << "listcrls"; - connect( _process, SIGNAL( receivedStdout( KProcess*, char*, int) ), - this, SLOT( slotReadStdout( KProcess*, char*, int ) ) ); - connect( _process, SIGNAL( processExited( KProcess* ) ), - this, SLOT( slotProcessExited() ) ); + connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int) ), + this, TQT_SLOT( slotReadStdout( KProcess*, char*, int ) ) ); + connect( _process, TQT_SIGNAL( processExited( KProcess* ) ), + this, TQT_SLOT( slotProcessExited() ) ); } if( _process->isRunning() ) _process->kill(); if( !_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) { @@ -116,12 +116,12 @@ void CRLView::slotUpdateView() void CRLView::slotReadStdout( KProcess*, char* buf, int len) { - _buffer.append( QString::fromUtf8( buf, len ) ); + _buffer.append( TQString::fromUtf8( buf, len ) ); } void CRLView::slotAppendBuffer() { _textView->append( _buffer ); - _buffer = QString::null; + _buffer = TQString::null; } void CRLView::slotProcessExited() diff --git a/certmanager/crlview.h b/certmanager/crlview.h index 55828a90f..05b55ca33 100644 --- a/certmanager/crlview.h +++ b/certmanager/crlview.h @@ -33,18 +33,18 @@ #ifndef CRLVIEW_H #define CRLVIEW_H -#include <qdialog.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqstring.h> class QTextEdit; class QPushButton; class KProcess; class QTimer; -class CRLView : public QDialog { +class CRLView : public TQDialog { Q_OBJECT public: - CRLView( QWidget* parent = 0, const char* name = 0, bool modal = false ); + CRLView( TQWidget* parent = 0, const char* name = 0, bool modal = false ); ~CRLView(); public slots: void slotUpdateView(); @@ -55,15 +55,15 @@ protected slots: void slotAppendBuffer(); protected: - void closeEvent( QCloseEvent * ); + void closeEvent( TQCloseEvent * ); private: - QTextEdit* _textView; - QPushButton* _updateButton; - QPushButton* _closeButton; + TQTextEdit* _textView; + TQPushButton* _updateButton; + TQPushButton* _closeButton; KProcess* _process; - QTimer* _timer; - QString _buffer; + TQTimer* _timer; + TQString _buffer; }; #endif // CRLVIEW_H diff --git a/certmanager/customactions.cpp b/certmanager/customactions.cpp index 53e5dd2d8..27fed1ae4 100644 --- a/certmanager/customactions.cpp +++ b/certmanager/customactions.cpp @@ -35,55 +35,55 @@ #include <ktoolbar.h> #include <kapplication.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <tqlineedit.h> +#include <tqlabel.h> -LabelAction::LabelAction( const QString & text, KActionCollection * parent, +LabelAction::LabelAction( const TQString & text, KActionCollection * parent, const char* name ) - : KAction( text, QIconSet(), KShortcut(), 0, 0, parent, name ) + : KAction( text, TQIconSet(), KShortcut(), 0, 0, parent, name ) { } -int LabelAction::plug( QWidget * widget, int index ) { +int LabelAction::plug( TQWidget * widget, int index ) { if ( kapp && !kapp->authorizeKAction( name() ) ) return -1; if ( widget->inherits( "KToolBar" ) ) { KToolBar * bar = (KToolBar *)widget; int id_ = getToolButtonID(); - QLabel* label = new QLabel( text(), bar, "kde toolbar widget" ); + TQLabel* label = new TQLabel( text(), bar, "kde toolbar widget" ); bar->insertWidget( id_, label->width(), label, index ); addContainer( bar, id_ ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); return containerCount() - 1; } return KAction::plug( widget, index ); } -LineEditAction::LineEditAction( const QString & text, KActionCollection * parent, - QObject * receiver, const char * member, const char * name ) - : KAction( text, QIconSet(), KShortcut(), 0, 0, parent, name ), +LineEditAction::LineEditAction( const TQString & text, KActionCollection * parent, + TQObject * receiver, const char * member, const char * name ) + : KAction( text, TQIconSet(), KShortcut(), 0, 0, parent, name ), _le(0), _receiver(receiver), _member(member) { } -int LineEditAction::plug( QWidget * widget, int index ) { +int LineEditAction::plug( TQWidget * widget, int index ) { if ( kapp && !kapp->authorizeKAction( name() ) ) return -1; if ( widget->inherits( "KToolBar" ) ) { KToolBar *bar = (KToolBar *)widget; int id_ = getToolButtonID(); // The toolbar trick doesn't seem to work for lineedits - //_le = new QLineEdit( bar, "kde toolbar widget" ); - _le = new QLineEdit( bar ); + //_le = new TQLineEdit( bar, "kde toolbar widget" ); + _le = new TQLineEdit( bar ); bar->insertWidget( id_, _le->width(), _le, index ); bar->setStretchableWidget( _le ); addContainer( bar, id_ ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); - connect( _le, SIGNAL( returnPressed() ), _receiver, _member ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( _le, TQT_SIGNAL( returnPressed() ), _receiver, _member ); return containerCount() - 1; } @@ -99,34 +99,34 @@ void LineEditAction::focusAll() { _le->setFocus(); } -QString LineEditAction::text() const { +TQString LineEditAction::text() const { return _le->text(); } -void LineEditAction::setText( const QString & txt ) { +void LineEditAction::setText( const TQString & txt ) { _le->setText(txt); } -ComboAction::ComboAction( const QStringList & lst, KActionCollection * parent, - QObject * receiver, const char * member, const char * name, +ComboAction::ComboAction( const TQStringList & lst, KActionCollection * parent, + TQObject * receiver, const char * member, const char * name, int selectedID ) - : KAction( QString::null, QIconSet(), KShortcut(), 0, 0, parent, name ), + : KAction( TQString::null, TQIconSet(), KShortcut(), 0, 0, parent, name ), _lst(lst), _receiver(receiver), _member(member), _selectedId( selectedID ) { } -int ComboAction::plug( QWidget * widget, int index ) { +int ComboAction::plug( TQWidget * widget, int index ) { if ( kapp && !kapp->authorizeKAction( name() ) ) return -1; if ( widget->inherits( "KToolBar" ) ) { KToolBar *bar = (KToolBar *)widget; int id_ = getToolButtonID(); - bar->insertCombo( _lst, id_, false, SIGNAL( highlighted(int) ), _receiver, _member ); + bar->insertCombo( _lst, id_, false, TQT_SIGNAL( highlighted(int) ), _receiver, _member ); bar->setCurrentComboItem( id_,_selectedId ); addContainer( bar, id_ ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); return containerCount() - 1; } diff --git a/certmanager/customactions.h b/certmanager/customactions.h index 44957487b..ad3505b78 100644 --- a/certmanager/customactions.h +++ b/certmanager/customactions.h @@ -35,48 +35,48 @@ #include <kaction.h> -#include <qstringlist.h> +#include <tqstringlist.h> class QLineEdit; class LabelAction : public KAction { Q_OBJECT public: - LabelAction( const QString & text, KActionCollection * parent, + LabelAction( const TQString & text, KActionCollection * parent, const char* name ); - int plug( QWidget * widget, int index=-1 ); + int plug( TQWidget * widget, int index=-1 ); }; class LineEditAction : public KAction { Q_OBJECT public: - LineEditAction( const QString & text, KActionCollection * parent, - QObject * receiver, const char * member, const char * name ); + LineEditAction( const TQString & text, KActionCollection * parent, + TQObject * receiver, const char * member, const char * name ); - int plug( QWidget * widget, int index=-1 ); + int plug( TQWidget * widget, int index=-1 ); void clear(); void focusAll(); - QString text() const; - void setText( const QString & txt ); + TQString text() const; + void setText( const TQString & txt ); private: - QLineEdit* _le; - QObject * _receiver; + TQLineEdit* _le; + TQObject * _receiver; const char * _member; }; class ComboAction : public KAction { Q_OBJECT public: - ComboAction( const QStringList & lst, KActionCollection * parent, - QObject * receiver, const char * member, const char * name, + ComboAction( const TQStringList & lst, KActionCollection * parent, + TQObject * receiver, const char * member, const char * name, int selectedID ); - int plug( QWidget * widget, int index=-1 ); + int plug( TQWidget * widget, int index=-1 ); private: - QStringList _lst; - QObject * _receiver; + TQStringList _lst; + TQObject * _receiver; const char * _member; int _selectedId; }; diff --git a/certmanager/hierarchyanalyser.cpp b/certmanager/hierarchyanalyser.cpp index 8e8c13803..380c48a58 100644 --- a/certmanager/hierarchyanalyser.cpp +++ b/certmanager/hierarchyanalyser.cpp @@ -39,8 +39,8 @@ #include <algorithm> #include <iterator> -HierarchyAnalyser::HierarchyAnalyser( QObject * parent, const char * name ) - : QObject( parent, name ) +HierarchyAnalyser::HierarchyAnalyser( TQObject * parent, const char * name ) + : TQObject( parent, name ) { } @@ -62,7 +62,7 @@ void HierarchyAnalyser::slotNextKey( const GpgME::Key & key ) { const std::vector<GpgME::Key> & HierarchyAnalyser::subjectsForIssuer( const char * issuer_dn ) const { static const std::vector<GpgME::Key> empty; - std::map< QCString, std::vector<GpgME::Key> >::const_iterator it = + std::map< TQCString, std::vector<GpgME::Key> >::const_iterator it = mSubjectsByIssuer.find( issuer_dn ); return it == mSubjectsByIssuer.end() ? empty : it->second ; } diff --git a/certmanager/hierarchyanalyser.h b/certmanager/hierarchyanalyser.h index ccf07d4f3..9521d84d6 100644 --- a/certmanager/hierarchyanalyser.h +++ b/certmanager/hierarchyanalyser.h @@ -35,16 +35,16 @@ #include <gpgmepp/key.h> -#include <qobject.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqcstring.h> #include <map> #include <vector> -class HierarchyAnalyser : public QObject { +class HierarchyAnalyser : public TQObject { Q_OBJECT public: - HierarchyAnalyser( QObject * parent=0, const char * name=0 ); + HierarchyAnalyser( TQObject * parent=0, const char * name=0 ); ~HierarchyAnalyser(); const std::vector<GpgME::Key> & rootItems() const { @@ -59,7 +59,7 @@ public slots: void slotNextKey( const GpgME::Key & key ); private: - std::map< QCString, std::vector<GpgME::Key> > mSubjectsByIssuer; + std::map< TQCString, std::vector<GpgME::Key> > mSubjectsByIssuer; }; diff --git a/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp b/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp index b621e92b8..aa8e52f72 100644 --- a/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp +++ b/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp @@ -37,18 +37,18 @@ #include <kconfig.h> #include <kapplication.h> -#include <qframe.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdir.h> -#include <qvgroupbox.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqvgroupbox.h> static const char* log_levels[] = { "none", "basic", "advanced", "expert", "guru" }; -static int log_level_to_int( const QString& loglevel ) +static int log_level_to_int( const TQString& loglevel ) { if( loglevel == "none" ) { return 0; @@ -66,89 +66,89 @@ static int log_level_to_int( const QString& loglevel ) } } -KWatchGnuPGConfig::KWatchGnuPGConfig( QWidget* parent, const char* name ) +KWatchGnuPGConfig::KWatchGnuPGConfig( TQWidget* parent, const char* name ) : KDialogBase( Plain, i18n("Configure KWatchGnuPG"), Ok|Cancel, Ok, parent, name ) { // tmp vars: - QWidget * w; - QGridLayout * glay; - QGroupBox * group; + TQWidget * w; + TQGridLayout * glay; + TQGroupBox * group; - QWidget * top = plainPage(); + TQWidget * top = plainPage(); - QVBoxLayout * vlay = new QVBoxLayout( top, 0, spacingHint() ); + TQVBoxLayout * vlay = new TQVBoxLayout( top, 0, spacingHint() ); - group = new QVGroupBox( i18n("WatchGnuPG"), top ); + group = new TQVGroupBox( i18n("WatchGnuPG"), top ); group->layout()->setSpacing( spacingHint() ); - w = new QWidget( group ); + w = new TQWidget( group ); - glay = new QGridLayout( w, 3, 2, 0, spacingHint() ); + glay = new TQGridLayout( w, 3, 2, 0, spacingHint() ); glay->setColStretch( 1, 1 ); int row = -1; ++row; mExeED = new KURLRequester( w ); - glay->addWidget( new QLabel( mExeED, i18n("&Executable:"), w ), row, 0 ); + glay->addWidget( new TQLabel( mExeED, i18n("&Executable:"), w ), row, 0 ); glay->addWidget( mExeED, row, 1 ); - connect( mExeED, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()) ); + connect( mExeED, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()) ); ++row; mSocketED = new KURLRequester( w ); - glay->addWidget( new QLabel( mSocketED, i18n("&Socket:"), w ), row, 0 ); + glay->addWidget( new TQLabel( mSocketED, i18n("&Socket:"), w ), row, 0 ); glay->addWidget( mSocketED, row, 1 ); - connect( mSocketED, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()) ); + connect( mSocketED, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()) ); ++row; - mLogLevelCB = new QComboBox( false, w ); + mLogLevelCB = new TQComboBox( false, w ); mLogLevelCB->insertItem( i18n("None") ); mLogLevelCB->insertItem( i18n("Basic") ); mLogLevelCB->insertItem( i18n("Advanced") ); mLogLevelCB->insertItem( i18n("Expert") ); mLogLevelCB->insertItem( i18n("Guru") ); - glay->addWidget( new QLabel( mLogLevelCB, i18n("Default &log level:"), w ), row, 0 ); + glay->addWidget( new TQLabel( mLogLevelCB, i18n("Default &log level:"), w ), row, 0 ); glay->addWidget( mLogLevelCB, row, 1 ); - connect( mLogLevelCB, SIGNAL(activated(int)), SLOT(slotChanged()) ); + connect( mLogLevelCB, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged()) ); vlay->addWidget( group ); /******************* Log Window group *******************/ - group = new QVGroupBox( i18n("Log Window"), top ); + group = new TQVGroupBox( i18n("Log Window"), top ); group->layout()->setSpacing( spacingHint() ); - w = new QWidget( group ); + w = new TQWidget( group ); - glay = new QGridLayout( w, 2, 3, 0, spacingHint() ); + glay = new TQGridLayout( w, 2, 3, 0, spacingHint() ); glay->setColStretch( 1, 1 ); row = -1; ++row; - mLoglenSB = new QSpinBox( 0, 1000000, 100, w ); + mLoglenSB = new TQSpinBox( 0, 1000000, 100, w ); mLoglenSB->setSuffix( i18n("history size spinbox suffix"," lines") ); mLoglenSB->setSpecialValueText( i18n("unlimited") ); - glay->addWidget( new QLabel( mLoglenSB, i18n("&History size:"), w ), row, 0 ); + glay->addWidget( new TQLabel( mLoglenSB, i18n("&History size:"), w ), row, 0 ); glay->addWidget( mLoglenSB, row, 1 ); - QPushButton * button = new QPushButton( i18n("Set &Unlimited"), w ); + TQPushButton * button = new TQPushButton( i18n("Set &Unlimited"), w ); glay->addWidget( button, row, 2 ); - connect( mLoglenSB, SIGNAL(valueChanged(int)), SLOT(slotChanged()) ); - connect( button, SIGNAL(clicked()), SLOT(slotSetHistorySizeUnlimited()) ); + connect( mLoglenSB, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()) ); + connect( button, TQT_SIGNAL(clicked()), TQT_SLOT(slotSetHistorySizeUnlimited()) ); ++row; - mWordWrapCB = new QCheckBox( i18n("Enable &word wrapping"), w ); - mWordWrapCB->hide(); // QTextEdit doesn't support word wrapping in LogText mode + mWordWrapCB = new TQCheckBox( i18n("Enable &word wrapping"), w ); + mWordWrapCB->hide(); // TQTextEdit doesn't support word wrapping in LogText mode glay->addMultiCellWidget( mWordWrapCB, row, row, 0, 2 ); - connect( mWordWrapCB, SIGNAL(clicked()), SLOT(slotChanged()) ); + connect( mWordWrapCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()) ); vlay->addWidget( group ); vlay->addStretch( 1 ); - connect( this, SIGNAL(applyClicked()), SLOT(slotSave()) ); - connect( this, SIGNAL(okClicked()), SLOT(slotSave()) ); + connect( this, TQT_SIGNAL(applyClicked()), TQT_SLOT(slotSave()) ); + connect( this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotSave()) ); } void KWatchGnuPGConfig::slotSetHistorySizeUnlimited() { @@ -160,7 +160,7 @@ void KWatchGnuPGConfig::loadConfig() KConfig* config = kapp->config(); config->setGroup("WatchGnuPG"); mExeED->setURL( config->readEntry( "Executable", "watchgnupg" ) ); - mSocketED->setURL( config->readEntry( "Socket", QDir::home().canonicalPath() + mSocketED->setURL( config->readEntry( "Socket", TQDir::home().canonicalPath() + "/.gnupg/log-socket") ); mLogLevelCB->setCurrentItem( log_level_to_int( config->readEntry( "LogLevel", "basic" ) ) ); @@ -168,7 +168,7 @@ void KWatchGnuPGConfig::loadConfig() mLoglenSB->setValue( config->readNumEntry( "MaxLogLen", 10000 ) ); mWordWrapCB->setChecked( config->readBoolEntry("WordWrap", false ) ); - config->setGroup( QString::null ); + config->setGroup( TQString::null ); enableButtonOK( false ); enableButtonApply( false ); } @@ -185,7 +185,7 @@ void KWatchGnuPGConfig::saveConfig() config->writeEntry( "MaxLogLen", mLoglenSB->value() ); config->writeEntry( "WordWrap", mWordWrapCB->isChecked() ); - config->setGroup( QString::null ); + config->setGroup( TQString::null ); config->sync(); enableButtonOK( false ); enableButtonApply( false ); diff --git a/certmanager/kwatchgnupg/kwatchgnupgconfig.h b/certmanager/kwatchgnupg/kwatchgnupgconfig.h index 4a93b463b..e95959e50 100644 --- a/certmanager/kwatchgnupg/kwatchgnupgconfig.h +++ b/certmanager/kwatchgnupg/kwatchgnupgconfig.h @@ -43,7 +43,7 @@ class KURLRequester; class KWatchGnuPGConfig : public KDialogBase { Q_OBJECT public: - KWatchGnuPGConfig( QWidget* parent, const char* name = 0 ); + KWatchGnuPGConfig( TQWidget* parent, const char* name = 0 ); void loadConfig(); void saveConfig(); @@ -59,9 +59,9 @@ private slots: private: KURLRequester* mExeED; KURLRequester* mSocketED; - QComboBox* mLogLevelCB; - QSpinBox* mLoglenSB; - QCheckBox* mWordWrapCB; + TQComboBox* mLogLevelCB; + TQSpinBox* mLoglenSB; + TQCheckBox* mWordWrapCB; }; #endif /* KWATCHGNUPGCONFIG_H */ diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp index 19bda278b..234973b6e 100644 --- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp +++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp @@ -49,36 +49,36 @@ #include <kedittoolbar.h> #include <kkeydialog.h> -#include <qtextedit.h> -#include <qdir.h> -#include <qeventloop.h> -#include <qtimer.h> -#include <qtextcodec.h> +#include <tqtextedit.h> +#include <tqdir.h> +#include <tqeventloop.h> +#include <tqtimer.h> +#include <tqtextcodec.h> #define WATCHGNUPGBINARY "watchgnupg" -#define WATCHGNUPGSOCKET ( QDir::home().canonicalPath() + "/.gnupg/log-socket") +#define WATCHGNUPGSOCKET ( TQDir::home().canonicalPath() + "/.gnupg/log-socket") -KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( QWidget* parent, const char* name ) +KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( TQWidget* parent, const char* name ) : KMainWindow( parent, name, WType_TopLevel ), mConfig(0) { createActions(); createGUI(); - mCentralWidget = new QTextEdit( this, "central log view" ); - mCentralWidget->setTextFormat( QTextEdit::LogText ); + mCentralWidget = new TQTextEdit( this, "central log view" ); + mCentralWidget->setTextFormat( TQTextEdit::LogText ); setCentralWidget( mCentralWidget ); - mWatcher = new KProcIO( QTextCodec::codecForMib( 106 /*utf-8*/ ) ); - connect( mWatcher, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotWatcherExited() ) ); - connect( mWatcher, SIGNAL( readReady(KProcIO*) ), - this, SLOT( slotReadStdout() ) ); + mWatcher = new KProcIO( TQTextCodec::codecForMib( 106 /*utf-8*/ ) ); + connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + this, TQT_SLOT( slotWatcherExited() ) ); + connect( mWatcher, TQT_SIGNAL( readReady(KProcIO*) ), + this, TQT_SLOT( slotReadStdout() ) ); slotReadConfig(); mSysTray = new KWatchGnuPGTray( this ); mSysTray->show(); - connect( mSysTray, SIGNAL( quitSelected() ), - this, SLOT( slotQuit() ) ); + connect( mSysTray, TQT_SIGNAL( quitSelected() ), + this, TQT_SLOT( slotQuit() ) ); setAutoSaveSettings(); } @@ -90,24 +90,24 @@ KWatchGnuPGMainWindow::~KWatchGnuPGMainWindow() void KWatchGnuPGMainWindow::slotClear() { mCentralWidget->clear(); - mCentralWidget->append( tr("[%1] Log cleared").arg( QDateTime::currentDateTime().toString(Qt::ISODate) ) ); + mCentralWidget->append( tr("[%1] Log cleared").arg( TQDateTime::currentDateTime().toString(Qt::ISODate) ) ); } void KWatchGnuPGMainWindow::createActions() { (void)new KAction( i18n("C&lear History"), "history_clear", CTRL+Key_L, - this, SLOT( slotClear() ), + this, TQT_SLOT( slotClear() ), actionCollection(), "clear_log" ); - (void)KStdAction::saveAs( this, SLOT(slotSaveAs()), actionCollection() ); - (void)KStdAction::close( this, SLOT(close()), actionCollection() ); - (void)KStdAction::quit( this, SLOT(slotQuit()), actionCollection() ); - (void)KStdAction::preferences( this, SLOT(slotConfigure()), actionCollection() ); - ( void )KStdAction::keyBindings(this, SLOT(configureShortcuts()), actionCollection()); - ( void )KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), actionCollection()); + (void)KStdAction::saveAs( this, TQT_SLOT(slotSaveAs()), actionCollection() ); + (void)KStdAction::close( this, TQT_SLOT(close()), actionCollection() ); + (void)KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection() ); + (void)KStdAction::preferences( this, TQT_SLOT(slotConfigure()), actionCollection() ); + ( void )KStdAction::keyBindings(this, TQT_SLOT(configureShortcuts()), actionCollection()); + ( void )KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection()); #if 0 - (void)new KAction( i18n("Configure KWatchGnuPG..."), QString::fromLatin1("configure"), - 0, this, SLOT( slotConfigure() ), + (void)new KAction( i18n("Configure KWatchGnuPG..."), TQString::fromLatin1("configure"), + 0, this, TQT_SLOT( slotConfigure() ), actionCollection(), "configure" ); #endif @@ -127,15 +127,15 @@ void KWatchGnuPGMainWindow::slotConfigureToolbars() void KWatchGnuPGMainWindow::startWatcher() { - disconnect( mWatcher, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotWatcherExited() ) ); + disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + this, TQT_SLOT( slotWatcherExited() ) ); if( mWatcher->isRunning() ) { mWatcher->kill(); while( mWatcher->isRunning() ) { - kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); } mCentralWidget->append(tr("[%1] Log stopped") - .arg( QDateTime::currentDateTime().toString(Qt::ISODate))); + .arg( TQDateTime::currentDateTime().toString(Qt::ISODate))); } mWatcher->clearArguments(); KConfig* config = kapp->config(); @@ -143,20 +143,20 @@ void KWatchGnuPGMainWindow::startWatcher() *mWatcher << config->readEntry("Executable", WATCHGNUPGBINARY); *mWatcher << "--force"; *mWatcher << config->readEntry("Socket", WATCHGNUPGSOCKET); - config->setGroup(QString::null); + config->setGroup(TQString::null); if( !mWatcher->start() ) { KMessageBox::sorry( this, i18n("The watchgnupg logging process could not be started.\nPlease install watchgnupg somewhere in your $PATH.\nThis log window is now completely useless." ) ); } else { mCentralWidget->append( tr("[%1] Log started") - .arg( QDateTime::currentDateTime().toString(Qt::ISODate) ) ); + .arg( TQDateTime::currentDateTime().toString(Qt::ISODate) ) ); } - connect( mWatcher, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotWatcherExited() ) ); + connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + this, TQT_SLOT( slotWatcherExited() ) ); } void KWatchGnuPGMainWindow::setGnuPGConfig() { - QStringList logclients; + TQStringList logclients; // Get config object Kleo::CryptoConfig* cconfig = Kleo::CryptoBackendFactory::instance()->config(); if ( !cconfig ) @@ -164,8 +164,8 @@ void KWatchGnuPGMainWindow::setGnuPGConfig() //Q_ASSERT( cconfig ); KConfig* config = kapp->config(); config->setGroup("WatchGnuPG"); - QStringList comps = cconfig->componentList(); - for( QStringList::const_iterator it = comps.begin(); it != comps.end(); ++it ) { + TQStringList comps = cconfig->componentList(); + for( TQStringList::const_iterator it = comps.begin(); it != comps.end(); ++it ) { Kleo::CryptoConfigComponent* comp = cconfig->component( *it ); Q_ASSERT(comp); // Look for log-file entry in Debug group @@ -173,10 +173,10 @@ void KWatchGnuPGMainWindow::setGnuPGConfig() if( group ) { Kleo::CryptoConfigEntry* entry = group->entry("log-file"); if( entry ) { - entry->setStringValue( QString("socket://")+ + entry->setStringValue( TQString("socket://")+ config->readEntry("Socket", WATCHGNUPGSOCKET )); - logclients << QString("%1 (%2)").arg(*it).arg(comp->description()); + logclients << TQString("%1 (%2)").arg(*it).arg(comp->description()); } entry = group->entry("debug-level"); if( entry ) { @@ -192,7 +192,7 @@ void KWatchGnuPGMainWindow::setGnuPGConfig() void KWatchGnuPGMainWindow::slotWatcherExited() { - if( KMessageBox::questionYesNo( this, i18n("The watchgnupg logging process died.\nDo you want to try to restart it?"), QString::null, i18n("Try Restart"), i18n("Do Not Try") ) == KMessageBox::Yes ) { + if( KMessageBox::questionYesNo( this, i18n("The watchgnupg logging process died.\nDo you want to try to restart it?"), TQString::null, i18n("Try Restart"), i18n("Do Not Try") ) == KMessageBox::Yes ) { mCentralWidget->append( i18n("====== Restarting logging process =====") ); startWatcher(); } else { @@ -204,7 +204,7 @@ void KWatchGnuPGMainWindow::slotReadStdout() { if ( !mWatcher ) return; - QString str; + TQString str; while( mWatcher->readln(str,false) > 0 ) { mCentralWidget->append( str ); if( !isVisible() ) { @@ -213,7 +213,7 @@ void KWatchGnuPGMainWindow::slotReadStdout() mSysTray->setAttention(true); } } - QTimer::singleShot( 0, this, SLOT(slotAckRead()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotAckRead()) ); } void KWatchGnuPGMainWindow::slotAckRead() { @@ -229,10 +229,10 @@ void KWatchGnuPGMainWindow::show() void KWatchGnuPGMainWindow::slotSaveAs() { - QString filename = KFileDialog::getSaveFileName( QString::null, QString::null, + TQString filename = KFileDialog::getSaveFileName( TQString::null, TQString::null, this, i18n("Save Log to File") ); if( filename.isEmpty() ) return; - QFile file(filename); + TQFile file(filename); if( file.exists() ) { if( KMessageBox::Yes != KMessageBox::warningYesNo( this, i18n("The file named \"%1\" already " @@ -243,7 +243,7 @@ void KWatchGnuPGMainWindow::slotSaveAs() } } if( file.open( IO_WriteOnly ) ) { - QTextStream st(&file); + TQTextStream st(&file); st << mCentralWidget->text(); file.close(); } @@ -251,8 +251,8 @@ void KWatchGnuPGMainWindow::slotSaveAs() void KWatchGnuPGMainWindow::slotQuit() { - disconnect( mWatcher, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotWatcherExited() ) ); + disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + this, TQT_SLOT( slotWatcherExited() ) ); mWatcher->kill(); kapp->quit(); } @@ -261,8 +261,8 @@ void KWatchGnuPGMainWindow::slotConfigure() { if( !mConfig ) { mConfig = new KWatchGnuPGConfig( this, "config dialog" ); - connect( mConfig, SIGNAL( reconfigure() ), - this, SLOT( slotReadConfig() ) ); + connect( mConfig, TQT_SIGNAL( reconfigure() ), + this, TQT_SLOT( slotReadConfig() ) ); } mConfig->loadConfig(); mConfig->exec(); @@ -273,8 +273,8 @@ void KWatchGnuPGMainWindow::slotReadConfig() KConfig* config = kapp->config(); config->setGroup("LogWindow"); mCentralWidget->setWordWrap( config->readBoolEntry("WordWrap", false) - ?QTextEdit::WidgetWidth - :QTextEdit::NoWrap ); + ?TQTextEdit::WidgetWidth + :TQTextEdit::NoWrap ); mCentralWidget->setMaxLogLines( config->readNumEntry( "MaxLogLen", 10000 ) ); setGnuPGConfig(); startWatcher(); diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.h b/certmanager/kwatchgnupg/kwatchgnupgmainwin.h index 2021a6579..64d0bbe54 100644 --- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.h +++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.h @@ -43,7 +43,7 @@ class QTextEdit; class KWatchGnuPGMainWindow : public KMainWindow { Q_OBJECT public: - KWatchGnuPGMainWindow( QWidget* parent = 0, const char* name = 0 ); + KWatchGnuPGMainWindow( TQWidget* parent = 0, const char* name = 0 ); virtual ~KWatchGnuPGMainWindow(); public slots: void slotWatcherExited(); @@ -69,7 +69,7 @@ private: KProcIO* mWatcher; - QTextEdit* mCentralWidget; + TQTextEdit* mCentralWidget; KWatchGnuPGTray* mSysTray; KWatchGnuPGConfig* mConfig; }; diff --git a/certmanager/kwatchgnupg/tray.cpp b/certmanager/kwatchgnupg/tray.cpp index 62024b14a..c58f1b123 100644 --- a/certmanager/kwatchgnupg/tray.cpp +++ b/certmanager/kwatchgnupg/tray.cpp @@ -37,7 +37,7 @@ #include <klocale.h> #include <kglobal.h> #include <kiconloader.h> -#include <qtooltip.h> +#include <tqtooltip.h> KWatchGnuPGTray::KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin ) : KSystemTray( mainwin, "KWatchGnuPG Tray Window" ) @@ -50,7 +50,7 @@ KWatchGnuPGTray::KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin ) mAttentionPix = loadIcon("kwatchgnupg2"); setPixmap( mNormalPix ); - QToolTip::add( this, i18n("KWatchGnuPG Log Viewer") ); + TQToolTip::add( this, i18n("KWatchGnuPG Log Viewer") ); } KWatchGnuPGTray::~KWatchGnuPGTray() diff --git a/certmanager/kwatchgnupg/tray.h b/certmanager/kwatchgnupg/tray.h index 7f220ecad..85695f8f5 100644 --- a/certmanager/kwatchgnupg/tray.h +++ b/certmanager/kwatchgnupg/tray.h @@ -34,7 +34,7 @@ #define TRAY_H #include <ksystemtray.h> -#include <qpixmap.h> +#include <tqpixmap.h> class KWatchGnuPGMainWindow; @@ -47,8 +47,8 @@ public: public slots: void setAttention( bool att ); private: - QPixmap mNormalPix; - QPixmap mAttentionPix; + TQPixmap mNormalPix; + TQPixmap mAttentionPix; }; #endif /* TRAY_H */ diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp index 15a63de53..aad0701ae 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp @@ -47,9 +47,9 @@ #include <kshell.h> #include <kdebug.h> -#include <qstringlist.h> -#include <qvariant.h> -#include <qfileinfo.h> +#include <tqstringlist.h> +#include <tqvariant.h> +#include <tqfileinfo.h> #include <map> #include <memory> @@ -59,12 +59,12 @@ namespace { // - // The usual QVariant template helpers: + // The usual TQVariant template helpers: // // to<> is a demarshaller. It's a class b/c you can't partially // specialise function templates yet. However, to<> can be used as if - // it was a function: QString s = to<QString>( myVariant ); + // it was a function: TQString s = to<TQString>( myVariant ); template <typename T> class to {}; #define MAKE_TO( type, func ) \ @@ -72,7 +72,7 @@ namespace { class to< type > { \ type m; \ public: \ - to( const QVariant & v ) : m( v.func() ) {} \ + to( const TQVariant & v ) : m( v.func() ) {} \ operator type() const { return m; } \ } @@ -83,31 +83,31 @@ namespace { class to<KURL> { KURL m; public: - to( const QVariant & v ) { + to( const TQVariant & v ) { m.setPath( v.toString() ); } operator KURL() const { return m; } }; template <typename T> - class to< QValueList<T> > { - QValueList<T> m; + class to< TQValueList<T> > { + TQValueList<T> m; public: - to( const QVariant & v ) { - const QValueList<QVariant> vl = v.toList(); - for ( QValueList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it ) + to( const TQVariant & v ) { + const TQValueList<TQVariant> vl = v.toList(); + for ( TQValueList<TQVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it ) m.push_back( to<T>( *it ) ); } - operator QValueList<T> () const { return m; } + operator TQValueList<T> () const { return m; } }; template <> class to<KURL::List> { KURL::List m; public: - to( const QVariant & v ) { + to( const TQVariant & v ) { // wow, KURL::List is broken... it lacks conversion from and to QVL<KURL>... - m += to< QValueList<KURL> >( v ); + m += to< TQValueList<KURL> >( v ); } operator KURL::List() const { return m; } }; @@ -116,37 +116,37 @@ namespace { // from<> is the demarshaller. See to<> for why this is a class... template <typename T> - struct from_helper : public QVariant { - from_helper( const T & t ) : QVariant( t ) {} + struct from_helper : public TQVariant { + from_helper( const T & t ) : TQVariant( t ) {} }; template <typename T> - QVariant from( const T & t ) { + TQVariant from( const T & t ) { return from_helper<T>( t ); } // some special types: - template <> struct from_helper<bool> : public QVariant { - from_helper( bool b ) : QVariant( b, int() ) {} + template <> struct from_helper<bool> : public TQVariant { + from_helper( bool b ) : TQVariant( b, int() ) {} }; - template <> struct from_helper<KURL> : public QVariant { - from_helper( const KURL & url ) : QVariant( url.path() ) {} + template <> struct from_helper<KURL> : public TQVariant { + from_helper( const KURL & url ) : TQVariant( url.path() ) {} }; - template <typename T> struct from_helper< QValueList<T> > : public QVariant { - from_helper( const QValueList<T> & l ) { - QValueList<QVariant> result; - for ( typename QValueList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it ) + template <typename T> struct from_helper< TQValueList<T> > : public TQVariant { + from_helper( const TQValueList<T> & l ) { + TQValueList<TQVariant> result; + for ( typename TQValueList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it ) result.push_back( from( *it ) ); - QVariant::operator=( result ); + TQVariant::operator=( result ); } }; - template <> struct from_helper<KURL::List> : public from_helper< QValueList<KURL> > { - from_helper( const KURL::List & l ) : from_helper< QValueList<KURL> >( l ) {} + template <> struct from_helper<KURL::List> : public from_helper< TQValueList<KURL> > { + from_helper( const KURL::List & l ) : from_helper< TQValueList<KURL> >( l ) {} }; class ChiasmusConfigEntry : public Kleo::CryptoConfigEntry { unsigned int mIdx; - QVariant mValue; + TQVariant mValue; bool mDirty; public: ChiasmusConfigEntry( unsigned int i ) @@ -155,8 +155,8 @@ namespace { { assert( i < kleo_chiasmus_config_entries_dim ); } - QString name() const { return kleo_chiasmus_config_entries[mIdx].name; } - QString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); } + TQString name() const { return kleo_chiasmus_config_entries[mIdx].name; } + TQString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); } bool isOptional() const { return kleo_chiasmus_config_entries[mIdx].is_optional; } bool isReadOnly() const { return false; } bool isList() const { return kleo_chiasmus_config_entries[mIdx].is_list; } @@ -165,7 +165,7 @@ namespace { ArgType argType() const { return static_cast<ArgType>( kleo_chiasmus_config_entries[mIdx].type ); } bool isSet() const { return mValue != defaultValue(); } bool boolValue() const { return mValue.toBool(); } - QString stringValue() const { return mValue.toString(); } + TQString stringValue() const { return mValue.toString(); } int intValue() const { return mValue.toInt(); } unsigned int uintValue() const { return mValue.toUInt(); } KURL urlValue() const { @@ -173,15 +173,15 @@ namespace { KURL u; u.setPath( mValue.toString() ); return u; } unsigned int numberOfTimesSet() const { return 0; } - QStringList stringValueList() const { return mValue.toStringList(); } - QValueList<int> intValueList() const { return to< QValueList<int> >( mValue ); } - QValueList<unsigned int> uintValueList() const { return to< QValueList<unsigned int> >( mValue ); } + TQStringList stringValueList() const { return mValue.toStringList(); } + TQValueList<int> intValueList() const { return to< TQValueList<int> >( mValue ); } + TQValueList<unsigned int> uintValueList() const { return to< TQValueList<unsigned int> >( mValue ); } KURL::List urlValueList() const { if ( argType() != ArgType_Path && argType()!= ArgType_DirPath ) return mValue.toStringList(); else return to<KURL::List>( mValue ); } void resetToDefault() { mValue = defaultValue(); mDirty = false; } - void setBoolValue( bool value ) { setValue( QVariant( value, int() ) ); } - void setStringValue( const QString & value ) { setValue( value ); } + void setBoolValue( bool value ) { setValue( TQVariant( value, int() ) ); } + void setStringValue( const TQString & value ) { setValue( value ); } void setIntValue( int value ) { setValue( value ); } void setUIntValue( unsigned int value ) { setValue( value ); } void setURLValue( const KURL & value ) { @@ -189,13 +189,13 @@ namespace { else setValue( value.path() ); } void setNumberOfTimesSet( unsigned int ) {} - void setStringValueList( const QStringList & value ) { setValue( value ); } - void setIntValueList( const QValueList<int> & l ) { setValue( from( l ) ); } - void setUIntValueList( const QValueList<unsigned int> & l ) { setValue( from( l ) ); } + void setStringValueList( const TQStringList & value ) { setValue( value ); } + void setIntValueList( const TQValueList<int> & l ) { setValue( from( l ) ); } + void setUIntValueList( const TQValueList<unsigned int> & l ) { setValue( from( l ) ); } void setURLValueList( const KURL::List & l ) { setValue( from( l ) ); } bool isDirty() const { return mDirty; } - QVariant value() const { return mValue; } + TQVariant value() const { return mValue; } void sync( KConfigBase * config ) { if ( !mDirty ) @@ -208,67 +208,67 @@ namespace { mValue = config->readPropertyEntry( kleo_chiasmus_config_entries[mIdx].name, defaultValue() ); } private: - QVariant defaultValue() const; - void setValue( const QVariant & value ) { mValue = value; mDirty = true; } + TQVariant defaultValue() const; + void setValue( const TQVariant & value ) { mValue = value; mDirty = true; } }; - QVariant ChiasmusConfigEntry::defaultValue() const { + TQVariant ChiasmusConfigEntry::defaultValue() const { const kleo_chiasmus_config_data & data = kleo_chiasmus_config_entries[mIdx]; switch ( data.type ) { default: - return QVariant(); + return TQVariant(); case ArgType_None: if ( isList() ) - return QValueList<QVariant>() << QVariant( data.defaults.boolean.value, int() ); + return TQValueList<TQVariant>() << TQVariant( data.defaults.boolean.value, int() ); else - return QVariant( data.defaults.boolean.value, int() ); + return TQVariant( data.defaults.boolean.value, int() ); case ArgType_String: if ( isList() ) - return QStringList( QString::fromLatin1( data.defaults.string ) ); + return TQStringList( TQString::fromLatin1( data.defaults.string ) ); else - return QString::fromLatin1( data.defaults.string ); + return TQString::fromLatin1( data.defaults.string ); case ArgType_Int: if ( isList() ) - return QValueList<QVariant>() << data.defaults.integer; + return TQValueList<TQVariant>() << data.defaults.integer; else return data.defaults.integer; case ArgType_UInt: if ( isList() ) - return QValueList<QVariant>() << data.defaults.unsigned_integer; + return TQValueList<TQVariant>() << data.defaults.unsigned_integer; else return data.defaults.unsigned_integer; case ArgType_Path: case ArgType_DirPath: if ( isList() ) - return QValueList<QVariant>() << QString::fromLatin1( data.defaults.path ); + return TQValueList<TQVariant>() << TQString::fromLatin1( data.defaults.path ); else - return QString::fromLatin1( data.defaults.path ); + return TQString::fromLatin1( data.defaults.path ); case ArgType_URL: case ArgType_LDAPURL: if ( isList() ) - return QValueList<QVariant>() << QString::fromLatin1( data.defaults.url ); + return TQValueList<TQVariant>() << TQString::fromLatin1( data.defaults.url ); else - return QString::fromLatin1( data.defaults.url ); + return TQString::fromLatin1( data.defaults.url ); } } class ChiasmusGeneralGroup : public Kleo::CryptoConfigGroup { - mutable std::map<QString,ChiasmusConfigEntry*> mCache; + mutable std::map<TQString,ChiasmusConfigEntry*> mCache; mutable KConfig * mConfigObject; public: ChiasmusGeneralGroup() : Kleo::CryptoConfigGroup(), mConfigObject( 0 ) {} ~ChiasmusGeneralGroup() { clear(); delete mConfigObject; } - QString name() const { return "General"; } - QString iconName() const { return "chiasmus_chi"; } - QString description() const { return i18n( "General" ); } + TQString name() const { return "General"; } + TQString iconName() const { return "chiasmus_chi"; } + TQString description() const { return i18n( "General" ); } Kleo::CryptoConfigEntry::Level level() const { return Kleo::CryptoConfigEntry::Level_Basic; } - QStringList entryList() const { - QStringList result; + TQStringList entryList() const { + TQStringList result; for ( unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i ) result.push_back( kleo_chiasmus_config_entries[i].name ); return result; } - Kleo::CryptoConfigEntry * entry( const QString & name ) const { + Kleo::CryptoConfigEntry * entry( const TQString & name ) const { if ( ChiasmusConfigEntry * entry = mCache[name] ) return entry; const KConfigGroup group( configObject(), "Chiasmus" ); @@ -283,7 +283,7 @@ namespace { void sync() { KConfigGroup group( configObject(), "Chiasmus" ); - for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) + for ( std::map<TQString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) it->second->sync( &group ); group.sync(); clear(); @@ -296,7 +296,7 @@ namespace { return mConfigObject; } void clear() { - for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) + for ( std::map<TQString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) delete it->second; mCache.clear(); } @@ -313,11 +313,11 @@ namespace { mGeneralGroup->sync(); } - QString name() const { return "Chiasmus"; } - QString iconName() const { return "chiasmus_chi"; } - QString description() const { return i18n( "Chiasmus" ); } - QStringList groupList() const { return QStringList() << "General"; } - Kleo::CryptoConfigGroup * group( const QString & name ) const { + TQString name() const { return "Chiasmus"; } + TQString iconName() const { return "chiasmus_chi"; } + TQString description() const { return i18n( "Chiasmus" ); } + TQStringList groupList() const { return TQStringList() << "General"; } + Kleo::CryptoConfigGroup * group( const TQString & name ) const { if ( name != "General" ) return 0; if ( !mGeneralGroup ) @@ -334,8 +334,8 @@ public: CryptoConfig() : Kleo::CryptoConfig(), mComponent( 0 ) {} ~CryptoConfig() { delete mComponent; } - QStringList componentList() const { return QStringList() << "Chiasmus" ; } - ChiasmusComponent * component( const QString & name ) const { + TQStringList componentList() const { return TQStringList() << "Chiasmus" ; } + ChiasmusComponent * component( const TQString & name ) const { if ( name != "Chiasmus" ) return 0; if ( !mComponent ) @@ -359,8 +359,8 @@ public: } ~Protocol() {} - QString name() const { return "Chiasmus"; } - QString displayName() const { return i18n( "Chiasmus command line tool" ); } + TQString name() const { return "Chiasmus"; } + TQString displayName() const { return i18n( "Chiasmus command line tool" ); } KeyListJob * keyListJob( bool, bool, bool ) const { return 0; } EncryptJob * encryptJob( bool, bool ) const { return 0; } DecryptJob * decryptJob() const { return 0; } @@ -370,14 +370,14 @@ public: KeyGenerationJob * keyGenerationJob() const { return 0; } ImportJob * importJob() const { return 0; } ExportJob * publicKeyExportJob( bool ) const { return 0; } - ExportJob * secretKeyExportJob( bool, const QString& ) const { return 0; } + ExportJob * secretKeyExportJob( bool, const TQString& ) const { return 0; } DownloadJob * downloadJob( bool ) const { return 0; } DeleteJob * deleteJob() const { return 0; } SignEncryptJob * signEncryptJob( bool, bool ) const { return 0; } DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; } RefreshKeysJob * refreshKeysJob() const { return 0; } - SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const { + SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const { if ( qstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 ) return new ObtainKeysJob(); if ( qstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 ) @@ -407,11 +407,11 @@ Kleo::ChiasmusBackend::~ChiasmusBackend() { delete mProtocol; } -QString Kleo::ChiasmusBackend::name() const { +TQString Kleo::ChiasmusBackend::name() const { return "Chiasmus"; } -QString Kleo::ChiasmusBackend::displayName() const { +TQString Kleo::ChiasmusBackend::displayName() const { return i18n( "Chiasmus" ); } @@ -430,19 +430,19 @@ Kleo::CryptoBackend::Protocol * Kleo::ChiasmusBackend::protocol( const char * na return mProtocol; } -bool Kleo::ChiasmusBackend::checkForOpenPGP( QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForOpenPGP( TQString * reason ) const { if ( reason ) *reason = i18n( "Unsupported protocol \"%1\"" ).arg( "OpenPGP" ); return false; } -bool Kleo::ChiasmusBackend::checkForSMIME( QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForSMIME( TQString * reason ) const { if ( reason ) *reason = i18n( "Unsupported protocol \"%1\"" ).arg( "SMIME" ); return false; } -bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForChiasmus( TQString * reason ) const { // kills the protocol instance when we return false: std::auto_ptr<Protocol> tmp( mProtocol ); @@ -450,8 +450,8 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const { const CryptoConfigEntry * path = config()->entry( "Chiasmus", "General", "path" ); assert( path ); assert( path->argType() == CryptoConfigEntry::ArgType_Path ); - const QString chiasmus = path->urlValue().path(); - const QFileInfo fi( KShell::tildeExpand( chiasmus ) ); + const TQString chiasmus = path->urlValue().path(); + const TQFileInfo fi( KShell::tildeExpand( chiasmus ) ); if ( !fi.isExecutable() ) { if ( reason ) *reason = i18n( "File \"%1\" does not exist or is not executable." ).arg( chiasmus ); @@ -463,7 +463,7 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const { return true; } -bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, TQString * reason ) const { if ( qstricmp( name, "Chiasmus" ) == 0 ) return checkForChiasmus( reason ); if ( reason ) diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.h b/certmanager/lib/backends/chiasmus/chiasmusbackend.h index 6d51cad77..9b97723d4 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusbackend.h +++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.h @@ -52,8 +52,8 @@ namespace Kleo { static const ChiasmusBackend * instance() { return self; } - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; Kleo::CryptoConfig * config() const; @@ -61,10 +61,10 @@ namespace Kleo { Kleo::CryptoBackend::Protocol * smime() const { return 0; } Kleo::CryptoBackend::Protocol * protocol( const char * name ) const; - bool checkForOpenPGP( QString * reason=0 ) const; - bool checkForSMIME( QString * reason=0 ) const; - bool checkForChiasmus( QString * reason=0 ) const; - bool checkForProtocol( const char * name, QString * reason=0 ) const; + bool checkForOpenPGP( TQString * reason=0 ) const; + bool checkForSMIME( TQString * reason=0 ) const; + bool checkForChiasmus( TQString * reason=0 ) const; + bool checkForProtocol( const char * name, TQString * reason=0 ) const; bool supportsOpenPGP() const { return false; } bool supportsSMIME() const { return false; } diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp index 3ac7513df..99fdda015 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp @@ -48,9 +48,9 @@ #include <kdebug.h> #include <kmessagebox.h> -#include <qtimer.h> -#include <qfileinfo.h> -#include <qvariant.h> +#include <tqtimer.h> +#include <tqfileinfo.h> +#include <tqvariant.h> #include <memory> @@ -89,15 +89,15 @@ GpgME::Error Kleo::ChiasmusJob::setup() { ? SymCryptRunProcessBase::Encrypt : SymCryptRunProcessBase::Decrypt, this, "symcryptrun" ); - QTimer::singleShot( timeoutEntry->uintValue() * 1000, this, - SLOT( slotTimeout() ) ); + TQTimer::singleShot( timeoutEntry->uintValue() * 1000, this, + TQT_SLOT( slotTimeout() ) ); return 0; } namespace { struct LaterDeleter { - QObject * _this; - LaterDeleter( QObject * o ) : _this( o ) {} + TQObject * _this; + LaterDeleter( TQObject * o ) : _this( o ) {} ~LaterDeleter() { if ( _this ) _this->deleteLater(); } void disable() { _this = 0; } }; @@ -110,8 +110,8 @@ GpgME::Error Kleo::ChiasmusJob::start() { if ( const GpgME::Error err = setup() ) return mError = err; - connect( mSymCryptRun, SIGNAL(processExited(KProcess*)), - this, SLOT(slotProcessExited(KProcess*)) ); + connect( mSymCryptRun, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotProcessExited(KProcess*)) ); if ( !mSymCryptRun->launch( mInput ) ) return mError = gpg_error( GPG_ERR_ENOENT ); // what else? @@ -155,7 +155,7 @@ GpgME::Error Kleo::ChiasmusJob::slotProcessExited( KProcess * proc ) { } emit done(); - emit SpecialJob::result( mError, QVariant( mOutput ) ); + emit SpecialJob::result( mError, TQVariant( mOutput ) ); return mError; } @@ -200,17 +200,17 @@ void Kleo::ChiasmusJob::slotTimeout() { } -void Kleo::ChiasmusJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::ChiasmusJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( !mError ) return; if ( mError.isCanceled() ) return; - const QString msg = ( mMode == Encrypt + const TQString msg = ( mMode == Encrypt ? i18n( "Encryption failed: %1" ) : i18n( "Decryption failed: %1" ) ) - .arg( QString::fromLocal8Bit( mError.asString() ) ); + .arg( TQString::fromLocal8Bit( mError.asString() ) ); if ( !mStderr.isEmpty() ) { - const QString details = i18n( "The following was received on stderr:\n%1" ).arg( mStderr ); + const TQString details = i18n( "The following was received on stderr:\n%1" ).arg( mStderr ); KMessageBox::detailedError( parent, msg, details, caption ); } else { KMessageBox::error( parent, msg, caption ); diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.h b/certmanager/lib/backends/chiasmus/chiasmusjob.h index 6393a0905..54b3763c2 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusjob.h +++ b/certmanager/lib/backends/chiasmus/chiasmusjob.h @@ -36,7 +36,7 @@ #include "kleo/specialjob.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpgmepp/context.h> @@ -53,10 +53,10 @@ namespace Kleo { Q_OBJECT Q_ENUMS( Mode ) Q_PROPERTY( Mode mode READ mode ) - Q_PROPERTY( QString key READ key WRITE setKey ) - Q_PROPERTY( QString options READ options WRITE setOptions ) - Q_PROPERTY( QByteArray input READ input WRITE setInput ) - Q_PROPERTY( QByteArray result READ result ) + Q_PROPERTY( TQString key READ key WRITE setKey ) + Q_PROPERTY( TQString options READ options WRITE setOptions ) + Q_PROPERTY( TQByteArray input READ input WRITE setInput ) + Q_PROPERTY( TQByteArray result READ result ) public: enum Mode { Encrypt, Decrypt @@ -70,21 +70,21 @@ namespace Kleo { GpgME::Error exec(); /*!\reimp Kleo::Job */ - void showErrorDialog( QWidget *, const QString & ) const; + void showErrorDialog( TQWidget *, const TQString & ) const; Mode mode() const { return mMode; } - QString key() const { return mKey; } - void setKey( const QString & key ) { mKey = key; } + TQString key() const { return mKey; } + void setKey( const TQString & key ) { mKey = key; } - QString options() const { return mOptions; } - void setOptions( const QString & options ) { mOptions = options; } + TQString options() const { return mOptions; } + void setOptions( const TQString & options ) { mOptions = options; } - QByteArray input() const { return mInput; } - void setInput( const QByteArray & input ) { mInput = input; } + TQByteArray input() const { return mInput; } + void setInput( const TQByteArray & input ) { mInput = input; } //using SpecialJob::result; - QByteArray result() const { return mOutput; } + TQByteArray result() const { return mOutput; } public slots: void slotCancel(); @@ -100,11 +100,11 @@ namespace Kleo { private: SymCryptRunProcessBase * mSymCryptRun; - QString mKey; - QString mOptions; - QByteArray mInput, mOutput; + TQString mKey; + TQString mOptions; + TQByteArray mInput, mOutput; GpgME::Error mError; - QString mStderr; + TQString mStderr; bool mCanceled; bool mTimeout; const Mode mMode; diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp index 2e3225492..de1a01e10 100644 --- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp @@ -41,7 +41,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qfile.h> +#include <tqfile.h> #include <vector> #include <algorithm> @@ -60,14 +60,14 @@ Kleo::ChiasmusLibrary::~ChiasmusLibrary() { //delete mXiaLibrary; // hmm, how to get rid of it, then? } -Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( QString * reason ) const { +Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( TQString * reason ) const { assert( ChiasmusBackend::instance() ); assert( ChiasmusBackend::instance()->config() ); const CryptoConfigEntry * lib = ChiasmusBackend::instance()->config()->entry( "Chiasmus", "General", "lib" ); assert( lib ); - const QString libfile = lib->urlValue().path(); + const TQString libfile = lib->urlValue().path(); if ( !mXiaLibrary ) - mXiaLibrary = KLibLoader::self()->library( QFile::encodeName( libfile ) ); + mXiaLibrary = KLibLoader::self()->library( TQFile::encodeName( libfile ) ); if ( !mXiaLibrary ) { if ( reason ) *reason = i18n( "Failed to load %1: %2" ) @@ -94,7 +94,7 @@ namespace { char ** mArgv; int mArgc; public: - ArgvProvider( const QValueVector<QCString> & args ) { + ArgvProvider( const TQValueVector<TQCString> & args ) { mArgv = new char * [args.size()]; for ( unsigned int i = 0 ; i < args.size() ; ++i ) mArgv[i] = strdup( args[i].data() ); @@ -107,7 +107,7 @@ namespace { }; } -int Kleo::ChiasmusLibrary::perform( const QValueVector<QCString> & args ) const { +int Kleo::ChiasmusLibrary::perform( const TQValueVector<TQCString> & args ) const { if ( main_func func = chiasmus() ) return func( args.size(), ArgvProvider( args ).argv() ); else diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h index b04e162b4..1b15e86e1 100644 --- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h +++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h @@ -34,8 +34,8 @@ #ifndef __KLEO_CHIASMUSLIBRARY_H__ #define __KLEO_CHIASMUSLIBRARY_H__ -#include <qvaluevector.h> -#include <qcstring.h> +#include <tqvaluevector.h> +#include <tqcstring.h> class KLibrary; @@ -52,10 +52,10 @@ namespace Kleo { static const ChiasmusLibrary * instance(); static void deleteInstance(); - int perform( const QValueVector<QCString> & args ) const; + int perform( const TQValueVector<TQCString> & args ) const; private: typedef int ( *main_func )( int, char** ); - main_func chiasmus( QString * reason=0 ) const; + main_func chiasmus( TQString * reason=0 ) const; private: static ChiasmusLibrary * self; diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp index a9de8d658..4a79a1956 100644 --- a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp +++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp @@ -44,11 +44,11 @@ #include <kmessagebox.h> #include <kshell.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qvariant.h> -#include <qtimer.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqvariant.h> +#include <tqtimer.h> +#include <tqfileinfo.h> #include <gpg-error.h> @@ -64,13 +64,13 @@ Kleo::ObtainKeysJob::ObtainKeysJob() const CryptoConfigEntry * keypaths = ChiasmusBackend::instance()->config()->entry( "Chiasmus", "General", "keydir" ); assert( keypaths ); - mKeyPaths = QStringList( keypaths->urlValue().path() ); + mKeyPaths = TQStringList( keypaths->urlValue().path() ); } Kleo::ObtainKeysJob::~ObtainKeysJob() {} GpgME::Error Kleo::ObtainKeysJob::start() { - QTimer::singleShot( 0, this, SLOT(slotPerform()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotPerform()) ); return mError = 0; } @@ -92,16 +92,16 @@ void Kleo::ObtainKeysJob::slotPerform( bool async ) { mError = gpg_error( GPG_ERR_CANCELED ); if ( mIndex >= mKeyPaths.size() || mError ) { emit done(); - emit SpecialJob::result( mError, QVariant( mResult ) ); + emit SpecialJob::result( mError, TQVariant( mResult ) ); return; } emit progress( i18n( "Scanning directory %1..." ).arg( mKeyPaths[mIndex] ), mIndex, mKeyPaths.size() ); - const QDir dir( KShell::tildeExpand( mKeyPaths[mIndex] ) ); + const TQDir dir( KShell::tildeExpand( mKeyPaths[mIndex] ) ); - if ( const QFileInfoList * xisFiles = dir.entryInfoList( "*.xis;*.XIS", QDir::Files ) ) + if ( const QFileInfoList * xisFiles = dir.entryInfoList( "*.xis;*.XIS", TQDir::Files ) ) for ( QFileInfoList::const_iterator it = xisFiles->begin(), end = xisFiles->end() ; it != end ; ++it ) if ( (*it)->isReadable() ) mResult.push_back( (*it)->absFilePath() ); @@ -109,17 +109,17 @@ void Kleo::ObtainKeysJob::slotPerform( bool async ) { ++mIndex; if ( async ) - QTimer::singleShot( 0, this, SLOT(slotPerform()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotPerform()) ); else slotPerform( false ); } -void Kleo::ObtainKeysJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::ObtainKeysJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( !mError ) return; if ( mError.isCanceled() ) return; - const QString msg = QString::fromUtf8( mError.asString() ); + const TQString msg = TQString::fromUtf8( mError.asString() ); KMessageBox::error( parent, msg, caption ); } diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.h b/certmanager/lib/backends/chiasmus/obtainkeysjob.h index 4b8392d46..4e3f8f7e2 100644 --- a/certmanager/lib/backends/chiasmus/obtainkeysjob.h +++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.h @@ -36,7 +36,7 @@ #include "kleo/specialjob.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpgmepp/context.h> @@ -56,15 +56,15 @@ namespace Kleo { To use, create an ObtainKeysJob instance like this: <code> Kleo::SpecialJob * job = - protocol->specialJob("x-obtain-keys", QMap<QString,QVariant>()); + protocol->specialJob("x-obtain-keys", TQMap<TQString,TQVariant>()); </code> - The resulting QVariant will contain a QStringList containing the + The resulting TQVariant will contain a TQStringList containing the absolute filenames of the keys found in the configured key files. */ class ObtainKeysJob : public Kleo::SpecialJob { Q_OBJECT - Q_PROPERTY( QStringList result READ result ) + Q_PROPERTY( TQStringList result READ result ) public: ObtainKeysJob(); ~ObtainKeysJob(); @@ -75,10 +75,10 @@ namespace Kleo { GpgME::Error exec(); /*!\reimp Kleo::Job */ - void showErrorDialog( QWidget *, const QString & ) const; + void showErrorDialog( TQWidget *, const TQString & ) const; //using SpecialJob::result; - QStringList result() const { return mResult; } + TQStringList result() const { return mResult; } public slots: void slotCancel(); @@ -89,9 +89,9 @@ namespace Kleo { private: GpgME::Error mError; - QStringList mKeyPaths; + TQStringList mKeyPaths; unsigned int mIndex; - QStringList mResult; + TQStringList mResult; bool mCanceled; }; diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp index 1b8627252..3dc3b9370 100644 --- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp +++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp @@ -36,15 +36,15 @@ #include <kdebug.h> #include <kshell.h> -#include <qtimer.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqfile.h> #include <cstring> -Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const QString & class_, const QString & program, - const QString & keyFile, const QString & options, +Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, const TQString & program, + const TQString & keyFile, const TQString & options, Operation mode, - QObject * parent, const char * name ) + TQObject * parent, const char * name ) : KProcess( parent, name ), mOperation( mode ), mOptions( options ) { @@ -57,15 +57,15 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const QString & class_, co Kleo::SymCryptRunProcessBase::~SymCryptRunProcessBase() {} -bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm ) { - connect( this, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(slotReceivedStdout(KProcess*,char*,int)) ); - connect( this, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(slotReceivedStderr(KProcess*,char*,int)) ); +bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm ) { + connect( this, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)) ); + connect( this, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)) ); if ( rm == Block ) { KTempFile tempfile; tempfile.setAutoDelete( true ); - if ( QFile * file = tempfile.file() ) + if ( TQFile * file = tempfile.file() ) file->writeBlock( input ); else return false; @@ -80,7 +80,7 @@ bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm return ok; mInput = input.copy(); writeStdin( mInput.begin(), mInput.size() ); - connect( this, SIGNAL(wroteStdin(KProcess*)), this, SLOT(closeStdin()) ); + connect( this, TQT_SIGNAL(wroteStdin(KProcess*)), this, TQT_SLOT(closeStdin()) ); return true; } } @@ -88,7 +88,7 @@ bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm void Kleo::SymCryptRunProcessBase::addOptions() { if ( !mOptions.isEmpty() ) { - const QStringList args = KShell::splitArgs( mOptions ); + const TQStringList args = KShell::splitArgs( mOptions ); *this << "--" << args; } } @@ -103,7 +103,7 @@ void Kleo::SymCryptRunProcessBase::slotReceivedStdout( KProcess * proc, char * b void Kleo::SymCryptRunProcessBase::slotReceivedStderr( KProcess * proc, char * buf, int len ) { Q_ASSERT( proc == this ); if ( len > 0 ) - mStderr += QString::fromLocal8Bit( buf, len ); + mStderr += TQString::fromLocal8Bit( buf, len ); } #include "symcryptrunprocessbase.moc" diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h index d74db60cc..e28cf90fd 100644 --- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h +++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h @@ -35,7 +35,7 @@ #include <kprocess.h> -#include <qcstring.h> +#include <tqcstring.h> class QString; @@ -47,16 +47,16 @@ public: enum Operation { Encrypt, Decrypt }; - SymCryptRunProcessBase( const QString & class_, const QString & program, - const QString & keyFile, const QString& options, + SymCryptRunProcessBase( const TQString & class_, const TQString & program, + const TQString & keyFile, const TQString& options, Operation op, - QObject * parent=0, const char * name=0 ); + TQObject * parent=0, const char * name=0 ); ~SymCryptRunProcessBase(); - bool launch( const QByteArray & input, RunMode rm=NotifyOnExit ); + bool launch( const TQByteArray & input, RunMode rm=NotifyOnExit ); - const QByteArray & output() const { return mOutput; } - const QString & stdErr() const { return mStderr; } + const TQByteArray & output() const { return mOutput; } + const TQString & stdErr() const { return mStderr; } public slots: /*! upgraded to slot */ @@ -69,11 +69,11 @@ private slots: private: void addOptions(); - QByteArray mInput; - QByteArray mOutput; - QString mStderr; + TQByteArray mInput; + TQByteArray mOutput; + TQString mStderr; const Operation mOperation; - QString mOptions; + TQString mOptions; }; } diff --git a/certmanager/lib/backends/kpgp/gpg1backend.h b/certmanager/lib/backends/kpgp/gpg1backend.h index f9413accf..c95df1a51 100644 --- a/certmanager/lib/backends/kpgp/gpg1backend.h +++ b/certmanager/lib/backends/kpgp/gpg1backend.h @@ -42,8 +42,8 @@ namespace Kleo { class GPG1Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp index 2d4d17ab2..2dbc3868f 100644 --- a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp +++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp @@ -43,7 +43,7 @@ #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include "kpgpwrapper.h" @@ -58,47 +58,47 @@ Kleo::KpgpBackendBase::~KpgpBackendBase() delete mOpenPGPProtocol; mOpenPGPProtocol = 0; } -QString Kleo::GPG1Backend::name() const { +TQString Kleo::GPG1Backend::name() const { return GPG1_BACKEND_NAME; } -QString Kleo::GPG1Backend::displayName() const { +TQString Kleo::GPG1Backend::displayName() const { return i18n("Kpgp/gpg"); } -QString Kleo::PGP2Backend::name() const { +TQString Kleo::PGP2Backend::name() const { return PGP2_BACKEND_NAME; } -QString Kleo::PGP2Backend::displayName() const { +TQString Kleo::PGP2Backend::displayName() const { return i18n("Kpgp/pgp v2"); } -QString Kleo::PGP5Backend::name() const { +TQString Kleo::PGP5Backend::name() const { return PGP5_BACKEND_NAME; } -QString Kleo::PGP5Backend::displayName() const { +TQString Kleo::PGP5Backend::displayName() const { return i18n("Kpgp/pgp v5"); } -QString Kleo::PGP6Backend::name() const { +TQString Kleo::PGP6Backend::name() const { return PGP6_BACKEND_NAME; } -QString Kleo::PGP6Backend::displayName() const { +TQString Kleo::PGP6Backend::displayName() const { return i18n("Kpgp/pgp v6"); } -static const QString notSupported() { +static const TQString notSupported() { return i18n("This backend does not support S/MIME"); } -bool Kleo::KpgpBackendBase::checkForOpenPGP( QString * /*reason*/ ) const { +bool Kleo::KpgpBackendBase::checkForOpenPGP( TQString * /*reason*/ ) const { return true; } -bool Kleo::KpgpBackendBase::checkForSMIME( QString * reason ) const { +bool Kleo::KpgpBackendBase::checkForSMIME( TQString * reason ) const { if ( reason ) *reason = notSupported(); return false; } diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.h b/certmanager/lib/backends/kpgp/kpgpbackendbase.h index 854e800c3..9c21c12bd 100644 --- a/certmanager/lib/backends/kpgp/kpgpbackendbase.h +++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.h @@ -61,8 +61,8 @@ namespace Kleo { bool supportsOpenPGP() const { return true; } bool supportsSMIME() const { return false; } - bool checkForOpenPGP( QString * reason=0 ) const; - bool checkForSMIME( QString * reason=0 ) const; + bool checkForOpenPGP( TQString * reason=0 ) const; + bool checkForSMIME( TQString * reason=0 ) const; private: mutable KpgpWrapper * mOpenPGPProtocol; }; diff --git a/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp b/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp index 4c328adee..2e69f9392 100644 --- a/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp +++ b/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp @@ -44,7 +44,7 @@ #include <gpgme.h> -#include <qtimer.h> +#include <tqtimer.h> #include <stdlib.h> #include <string.h> @@ -169,7 +169,7 @@ gpgme_user_id_t KpgpUserID2GPGMEUserID( const Kpgp::UserID * kUserId ) { // inspired by _gpgme_key_append_name - const QCString text = kUserId->text().utf8(); + const TQCString text = kUserId->text().utf8(); const int src_len = text.length(); gpgme_user_id_t uid; @@ -196,9 +196,9 @@ gpgme_subkey_t KpgpSubkey2GPGMESubKey( const Kpgp::Subkey * kSubkey ) { gpgme_subkey_t subkey; - const QCString fpr = kSubkey->fingerprint(); + const TQCString fpr = kSubkey->fingerprint(); const unsigned int fpr_len = fpr.length(); - const QCString keyId = kSubkey->longKeyID(); + const TQCString keyId = kSubkey->longKeyID(); subkey = (gpgme_subkey_t) calloc( 1, sizeof( *subkey ) + fpr_len + 1 ); subkey->revoked = kSubkey->revoked(); @@ -260,11 +260,11 @@ gpgme_key_t KpgpKey2gpgme_key( const Kpgp::Key * kKey ) return key; } -GpgME::Error Kleo::KpgpKeyListJob::start( const QStringList & patterns, +GpgME::Error Kleo::KpgpKeyListJob::start( const TQStringList & patterns, bool secretOnly ) { mPatterns = patterns; mSecretOnly = secretOnly; - QTimer::singleShot( 0, this, SLOT( slotDoIt() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoIt() ) ); return GpgME::Error( 0 ); } @@ -279,7 +279,7 @@ void Kleo::KpgpKeyListJob::slotDoIt() { deleteLater(); } -GpgME::KeyListResult Kleo::KpgpKeyListJob::exec( const QStringList & patterns, +GpgME::KeyListResult Kleo::KpgpKeyListJob::exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ) { Kpgp::KeyList kKeys; diff --git a/certmanager/lib/backends/kpgp/kpgpkeylistjob.h b/certmanager/lib/backends/kpgp/kpgpkeylistjob.h index 779680c2d..4cfb3d047 100644 --- a/certmanager/lib/backends/kpgp/kpgpkeylistjob.h +++ b/certmanager/lib/backends/kpgp/kpgpkeylistjob.h @@ -35,7 +35,7 @@ #include <kleo/keylistjob.h> -#include <qstringlist.h> +#include <tqstringlist.h> namespace GpgME { class Error; @@ -56,10 +56,10 @@ namespace Kleo { ~KpgpKeyListJob(); /*! \reimp from KeyListJob */ - GpgME::Error start( const QStringList & patterns, bool secretOnly ); + GpgME::Error start( const TQStringList & patterns, bool secretOnly ); /*! \reimp from KeyListJob */ - GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, + GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); /*! \reimp from Job */ @@ -70,7 +70,7 @@ namespace Kleo { private: Kpgp::Base * mPgpBase; - QStringList mPatterns; + TQStringList mPatterns; bool mSecretOnly; }; diff --git a/certmanager/lib/backends/kpgp/kpgpwrapper.cpp b/certmanager/lib/backends/kpgp/kpgpwrapper.cpp index 20d885dd5..a2ff064f1 100644 --- a/certmanager/lib/backends/kpgp/kpgpwrapper.cpp +++ b/certmanager/lib/backends/kpgp/kpgpwrapper.cpp @@ -56,7 +56,7 @@ //#include <backends/kpgp/kpgpdecryptverifyjob.h> //#include <backends/kpgp/kpgpcryptoconfig.h> -KpgpWrapper::KpgpWrapper( const QString & name ) +KpgpWrapper::KpgpWrapper( const TQString & name ) : mName( name ), mPgpBase( 0 ) { @@ -68,12 +68,12 @@ KpgpWrapper::~KpgpWrapper() } -QString KpgpWrapper::name() const +TQString KpgpWrapper::name() const { return mName; } -QString KpgpWrapper::displayName() const +TQString KpgpWrapper::displayName() const { return mName; } diff --git a/certmanager/lib/backends/kpgp/kpgpwrapper.h b/certmanager/lib/backends/kpgp/kpgpwrapper.h index 182661ec4..40c6e9250 100644 --- a/certmanager/lib/backends/kpgp/kpgpwrapper.h +++ b/certmanager/lib/backends/kpgp/kpgpwrapper.h @@ -35,7 +35,7 @@ #include <kleo/cryptobackend.h> -#include <qstring.h> +#include <tqstring.h> namespace Kleo { class KeyListJob; @@ -61,12 +61,12 @@ namespace Kpgp { class KpgpWrapper : public Kleo::CryptoBackend::Protocol { public: - KpgpWrapper( const QString & name ); + KpgpWrapper( const TQString & name ); ~KpgpWrapper(); - QString name() const; + TQString name() const; - QString displayName() const; + TQString displayName() const; Kleo::KeyListJob * keyListJob( bool remote=false, bool includeSigs=false, bool validate=false ) const; @@ -90,7 +90,7 @@ private: Kpgp::Base * pgpBase() const; private: - QString mName; + TQString mName; mutable Kpgp::Base * mPgpBase; }; diff --git a/certmanager/lib/backends/kpgp/pgp2backend.h b/certmanager/lib/backends/kpgp/pgp2backend.h index fc053a20c..afb8a87c2 100644 --- a/certmanager/lib/backends/kpgp/pgp2backend.h +++ b/certmanager/lib/backends/kpgp/pgp2backend.h @@ -42,8 +42,8 @@ namespace Kleo { class PGP2Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/kpgp/pgp5backend.h b/certmanager/lib/backends/kpgp/pgp5backend.h index bf323b6fb..2cf995741 100644 --- a/certmanager/lib/backends/kpgp/pgp5backend.h +++ b/certmanager/lib/backends/kpgp/pgp5backend.h @@ -42,8 +42,8 @@ namespace Kleo { class PGP5Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/kpgp/pgp6backend.h b/certmanager/lib/backends/kpgp/pgp6backend.h index 827cf239b..d0babccd1 100644 --- a/certmanager/lib/backends/kpgp/pgp6backend.h +++ b/certmanager/lib/backends/kpgp/pgp6backend.h @@ -42,8 +42,8 @@ namespace Kleo { class PGP6Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index 2d3ca7409..9e7461791 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -35,9 +35,9 @@ #include <kdebug.h> #include <kurl.h> -#include <qsocketnotifier.h> -#include <qtextcodec.h> -#include <qstringlist.h> +#include <tqsocketnotifier.h> +#include <tqtextcodec.h> +#include <tqstringlist.h> #include <unistd.h> #include <fcntl.h> @@ -51,12 +51,12 @@ struct Kleo::GnuPGProcessBase::Private { bool useStatusFD; int statusFD[2]; - QSocketNotifier * statnot; - QCString statusBuffer; + TQSocketNotifier * statnot; + TQCString statusBuffer; }; -Kleo::GnuPGProcessBase::GnuPGProcessBase( QObject * parent, const char * name ) +Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name ) : KProcess( parent, name ) { d = new Private(); @@ -84,7 +84,7 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) { ::fcntl( d->statusFD[0], F_SETFD, FD_CLOEXEC ); ::fcntl( d->statusFD[1], F_SETFD, FD_CLOEXEC ); if ( !arguments.empty() ) { - QValueList<QCString>::iterator it = arguments.begin(); + TQValueList<TQCString>::iterator it = arguments.begin(); ++it; arguments.insert( it, "--status-fd" ); char buf[25]; @@ -112,8 +112,8 @@ int Kleo::GnuPGProcessBase::setupCommunication( Communication comm ) { int Kleo::GnuPGProcessBase::commSetupDoneP() { if ( d->useStatusFD ) { ::close( d->statusFD[1] ); // close the input end of the pipe, we're the reader - d->statnot = new QSocketNotifier( d->statusFD[0], QSocketNotifier::Read, this ); - connect( d->statnot, SIGNAL(activated(int)), SLOT(slotChildStatus(int)) ); + d->statnot = new TQSocketNotifier( d->statusFD[0], TQSocketNotifier::Read, this ); + connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildStatus(int)) ); } return KProcess::commSetupDoneP(); } @@ -149,7 +149,7 @@ int Kleo::GnuPGProcessBase::childStatus( int fd ) { return len; } -static QString fromHexEscapedUtf8( const QCString & str ) { +static TQString fromHexEscapedUtf8( const TQCString & str ) { return KURL::decode_string( str.data(), 106 /* utf-8 */ ); } @@ -160,7 +160,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { int lineStart = 0; for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) { // get next line: - const QCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); + const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); if ( line.isEmpty() ) continue; // check status token @@ -170,17 +170,17 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { continue; } // remove status token: - const QCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' '; + const TQCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' '; if ( command == " " ) { kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childStatus: status-fd protocol error: line without content." << endl; continue; } // split into base and args - QString cmd; - QStringList args; + TQString cmd; + TQStringList args; int tagStart = 0; for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) { - const QCString tag = command.mid( tagStart, tagEnd - tagStart ); + const TQCString tag = command.mid( tagStart, tagEnd - tagStart ); if ( cmd.isNull() ) cmd = fromHexEscapedUtf8( tag ); else diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h index 73e31e295..9abe5b88d 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h @@ -48,7 +48,7 @@ namespace Kleo { class GnuPGProcessBase : public KProcess { Q_OBJECT public: - GnuPGProcessBase( QObject * parent=0, const char * name=0 ); + GnuPGProcessBase( TQObject * parent=0, const char * name=0 ); ~GnuPGProcessBase(); void setUseStatusFD( bool use ); @@ -59,7 +59,7 @@ namespace Kleo { bool closeStatus(); signals: - void status( Kleo::GnuPGProcessBase * proc, const QString & type, const QStringList & args ); + void status( Kleo::GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ); protected: /*! reimplementation */ diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp index 8256522ae..5905bc5ee 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp @@ -45,8 +45,8 @@ #include <klocale.h> #include <kstandarddirs.h> -#include <qfile.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> Kleo::QGpgMEBackend::QGpgMEBackend() : Kleo::CryptoBackend(), @@ -63,11 +63,11 @@ Kleo::QGpgMEBackend::~QGpgMEBackend() { delete mSMIMEProtocol; mSMIMEProtocol = 0; } -QString Kleo::QGpgMEBackend::name() const { +TQString Kleo::QGpgMEBackend::name() const { return "gpgme"; } -QString Kleo::QGpgMEBackend::displayName() const { +TQString Kleo::QGpgMEBackend::displayName() const { return i18n( "GpgME" ); } @@ -80,7 +80,7 @@ Kleo::CryptoConfig * Kleo::QGpgMEBackend::config() const { return mCryptoConfig; } -static bool check( GpgME::Context::Protocol proto, QString * reason ) { +static bool check( GpgME::Context::Protocol proto, TQString * reason ) { if ( !GpgME::checkEngine( proto ) ) return true; if ( !reason ) @@ -90,25 +90,25 @@ static bool check( GpgME::Context::Protocol proto, QString * reason ) { if ( ei.isNull() ) *reason = i18n("GPGME was compiled without support for %1.").arg( proto == GpgME::Context::CMS ? "S/MIME" : "OpenPGP" ); else if ( ei.fileName() && !ei.version() ) - *reason = i18n("Engine %1 is not installed properly.").arg( QFile::decodeName( ei.fileName() ) ); + *reason = i18n("Engine %1 is not installed properly.").arg( TQFile::decodeName( ei.fileName() ) ); else if ( ei.fileName() && ei.version() && ei.requiredVersion() ) *reason = i18n("Engine %1 version %2 installed, " "but at least version %3 is required.") - .arg( QFile::decodeName( ei.fileName() ), ei.version(), ei.requiredVersion() ); + .arg( TQFile::decodeName( ei.fileName() ), ei.version(), ei.requiredVersion() ); else *reason = i18n("Unknown problem with engine for protocol %1.").arg( proto == GpgME::Context::CMS ? "S/MIME" : "OpenPGP" ); return false; } -bool Kleo::QGpgMEBackend::checkForOpenPGP( QString * reason ) const { +bool Kleo::QGpgMEBackend::checkForOpenPGP( TQString * reason ) const { return check( GpgME::Context::OpenPGP, reason ); } -bool Kleo::QGpgMEBackend::checkForSMIME( QString * reason ) const { +bool Kleo::QGpgMEBackend::checkForSMIME( TQString * reason ) const { return check( GpgME::Context::CMS, reason ); } -bool Kleo::QGpgMEBackend::checkForProtocol( const char * name, QString * reason ) const { +bool Kleo::QGpgMEBackend::checkForProtocol( const char * name, TQString * reason ) const { if ( qstricmp( name, OpenPGP ) == 0 ) return check( GpgME::Context::OpenPGP, reason ); if ( qstricmp( name, SMIME ) == 0 ) diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.h b/certmanager/lib/backends/qgpgme/qgpgmebackend.h index fae2dd68e..d5309032f 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmebackend.h +++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.h @@ -51,8 +51,8 @@ namespace Kleo { QGpgMEBackend(); ~QGpgMEBackend(); - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; CryptoConfig * config() const; @@ -60,9 +60,9 @@ namespace Kleo { Protocol * smime() const; Protocol * protocol( const char * name ) const; - bool checkForOpenPGP( QString * reason=0 ) const; - bool checkForSMIME( QString * reason=0 ) const; - bool checkForProtocol( const char * name, QString * reason ) const; + bool checkForOpenPGP( TQString * reason=0 ) const; + bool checkForSMIME( TQString * reason=0 ) const; + bool checkForProtocol( const char * name, TQString * reason ) const; bool supportsOpenPGP() const { return true; } bool supportsSMIME() const { return true; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp index 86eab99b4..c67800502 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp @@ -39,9 +39,9 @@ #include <assert.h> #include <ktempfile.h> -#include <qfile.h> +#include <tqfile.h> #include <stdlib.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> // Just for the Q_ASSERT in the dtor. Not thread-safe, but who would // have 2 threads talking to gpgconf anyway? :) @@ -71,12 +71,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) { // Run gpgconf --list-components to make the list of components - KProcIO proc( QTextCodec::codecForName( "utf8" ) ); + KProcIO proc( TQTextCodec::codecForName( "utf8" ) ); proc << "gpgconf"; // must be in the PATH proc << "--list-components"; - QObject::connect( &proc, SIGNAL( readReady(KProcIO*) ), - this, SLOT( slotCollectStdOut(KProcIO*) ) ); + TQObject::connect( &proc, TQT_SIGNAL( readReady(KProcIO*) ), + this, TQT_SLOT( slotCollectStdOut(KProcIO*) ) ); // run the process: int rc = 0; @@ -87,7 +87,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) // handle errors, if any (and if requested) if ( showErrors && rc != 0 ) { - QString wmsg = i18n("<qt>Failed to execute gpgconf:<br>%1</qt>"); + TQString wmsg = i18n("<qt>Failed to execute gpgconf:<br>%1</qt>"); if ( rc == -1 ) wmsg = wmsg.arg( i18n( "program not found" ) ); else if ( rc == -2 ) @@ -102,12 +102,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc ) { - QString line; + TQString line; int result; while( ( result = proc->readln(line) ) != -1 ) { //kdDebug(5150) << "GOT LINE:" << line << endl; // Format: NAME:DESCRIPTION - QStringList lst = QStringList::split( ':', line, true ); + TQStringList lst = TQStringList::split( ':', line, true ); if ( lst.count() >= 2 ) { mComponents.insert( lst[0], new QGpgMECryptoConfigComponent( this, lst[0], lst[1] ) ); } else { @@ -116,18 +116,18 @@ void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc ) } } -QStringList QGpgMECryptoConfig::componentList() const +TQStringList QGpgMECryptoConfig::componentList() const { if ( !mParsed ) const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( true ); - QDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); - QStringList names; + TQDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); + TQStringList names; for( ; it.current(); ++it ) names.push_back( it.currentKey() ); return names; } -Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const QString& name ) const +Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const TQString& name ) const { if ( !mParsed ) const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( false ); @@ -136,7 +136,7 @@ Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const QString& name void QGpgMECryptoConfig::sync( bool runtime ) { - QDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); + TQDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); for( ; it.current(); ++it ) it.current()->sync( runtime ); } @@ -151,7 +151,7 @@ void QGpgMECryptoConfig::clear() //// -QGpgMECryptoConfigComponent::QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const QString& name, const QString& description ) +QGpgMECryptoConfigComponent::QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const TQString& name, const TQString& description ) : mGroups( 7 ), mName( name ), mDescription( description ) { mGroups.setAutoDelete( true ); @@ -166,15 +166,15 @@ void QGpgMECryptoConfigComponent::runGpgConf() { // Run gpgconf --list-options <component>, and create all groups and entries for that component - KProcIO proc( QTextCodec::codecForName( "utf8" ) ); + KProcIO proc( TQTextCodec::codecForName( "utf8" ) ); proc << "gpgconf"; // must be in the PATH proc << "--list-options"; proc << mName; //kdDebug(5150) << "Running gpgconf --list-options " << mName << endl; - QObject::connect( &proc, SIGNAL( readReady(KProcIO*) ), - this, SLOT( slotCollectStdOut(KProcIO*) ) ); + TQObject::connect( &proc, TQT_SIGNAL( readReady(KProcIO*) ), + this, TQT_SLOT( slotCollectStdOut(KProcIO*) ) ); mCurrentGroup = 0; // run the process: @@ -194,12 +194,12 @@ void QGpgMECryptoConfigComponent::runGpgConf() void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc ) { - QString line; + TQString line; int result; while( ( result = proc->readln(line) ) != -1 ) { //kdDebug(5150) << "GOT LINE:" << line << endl; // Format: NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE - const QStringList lst = QStringList::split( ':', line, true ); + const TQStringList lst = TQStringList::split( ':', line, true ); if ( lst.count() >= 10 ) { const int flags = lst[1].toInt(); const int level = lst[2].toInt(); @@ -215,7 +215,7 @@ void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc ) } else { // normal entry if ( !mCurrentGroup ) { // first toplevel entry -> create toplevel group - mCurrentGroup = new QGpgMECryptoConfigGroup( "<nogroup>", QString::null, 0 ); + mCurrentGroup = new QGpgMECryptoConfigGroup( "<nogroup>", TQString::null, 0 ); mCurrentGroupName = "<nogroup>"; } mCurrentGroup->mEntries.insert( lst[0], new QGpgMECryptoConfigEntry( lst ) ); @@ -229,16 +229,16 @@ void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc ) } } -QStringList QGpgMECryptoConfigComponent::groupList() const +TQStringList QGpgMECryptoConfigComponent::groupList() const { - QDictIterator<QGpgMECryptoConfigGroup> it( mGroups ); - QStringList names; + TQDictIterator<QGpgMECryptoConfigGroup> it( mGroups ); + TQStringList names; for( ; it.current(); ++it ) names.push_back( it.currentKey() ); return names; } -Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const QString& name ) const +Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const TQString& name ) const { return mGroups.find( name ); } @@ -248,16 +248,16 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) KTempFile tmpFile; tmpFile.setAutoDelete( true ); - QValueList<QGpgMECryptoConfigEntry *> dirtyEntries; + TQValueList<QGpgMECryptoConfigEntry *> dirtyEntries; // Collect all dirty entries - QDictIterator<QGpgMECryptoConfigGroup> groupit( mGroups ); + TQDictIterator<QGpgMECryptoConfigGroup> groupit( mGroups ); for( ; groupit.current(); ++groupit ) { - QDictIterator<QGpgMECryptoConfigEntry> it( groupit.current()->mEntries ); + TQDictIterator<QGpgMECryptoConfigEntry> it( groupit.current()->mEntries ); for( ; it.current(); ++it ) { if ( it.current()->isDirty() ) { // OK, we can set it.currentKey() to it.current()->outputString() - QString line = it.currentKey(); + TQString line = it.currentKey(); if ( it.current()->isSet() ) { // set option line += ":0:"; line += it.current()->outputString(); @@ -265,7 +265,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) line += ":16:"; } line += '\n'; - QCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading. + TQCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading. tmpFile.file()->writeBlock( line8bit.data(), line8bit.size()-1 /*no 0*/ ); dirtyEntries.append( it.current() ); } @@ -276,7 +276,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) return; // Call gpgconf --change-options <component> - QString commandLine = "gpgconf"; + TQString commandLine = "gpgconf"; if ( runtime ) commandLine += " --runtime"; commandLine += " --change-options "; @@ -285,7 +285,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) commandLine += KProcess::quote( tmpFile.name() ); //kdDebug(5150) << commandLine << endl; - //system( QCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG + //system( TQCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG KProcess proc; proc.setUseShell( true ); @@ -300,19 +300,19 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) if ( rc == -1 ) { - QString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" ); + TQString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" ); kdWarning(5150) << wmsg << endl; KMessageBox::error(0, wmsg); } else if( rc != 0 ) // Happens due to bugs in gpgconf (e.g. issues 104/115) { - QString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( QString::fromLocal8Bit( strerror( rc ) ) ); + TQString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( TQString::fromLocal8Bit( strerror( rc ) ) ); kdWarning(5150) << k_funcinfo << ":" << strerror( rc ) << endl; KMessageBox::error(0, wmsg); } else { - QValueList<QGpgMECryptoConfigEntry *>::Iterator it = dirtyEntries.begin(); + TQValueList<QGpgMECryptoConfigEntry *>::Iterator it = dirtyEntries.begin(); for( ; it != dirtyEntries.end(); ++it ) { (*it)->setDirty( false ); } @@ -321,7 +321,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) //// -QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const QString & name, const QString& description, int level ) +QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const TQString & name, const TQString& description, int level ) : mEntries( 29 ), mName( name ), mDescription( description ), @@ -330,47 +330,47 @@ QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const QString & name, const QS mEntries.setAutoDelete( true ); } -QStringList QGpgMECryptoConfigGroup::entryList() const +TQStringList QGpgMECryptoConfigGroup::entryList() const { - QDictIterator<QGpgMECryptoConfigEntry> it( mEntries ); - QStringList names; + TQDictIterator<QGpgMECryptoConfigEntry> it( mEntries ); + TQStringList names; for( ; it.current(); ++it ) names.push_back( it.currentKey() ); return names; } -Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const QString& name ) const +Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const TQString& name ) const { return mEntries.find( name ); } //// -static QString gpgconf_unescape( const QString& str ) +static TQString gpgconf_unescape( const TQString& str ) { // Looks like it's the same rules as KURL. return KURL::decode_string( str, 106 ); } -static QString gpgconf_escape( const QString& str ) +static TQString gpgconf_escape( const TQString& str ) { // Escape special chars (including ':' and '%') - QString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char) + TQString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char) // Also encode commas, for lists. enc.replace( ',', "%2c" ); return enc; } -static QString urlpart_encode( const QString& str ) +static TQString urlpart_encode( const TQString& str ) { - QString enc( str ); + TQString enc( str ); enc.replace( '%', "%25" ); // first! enc.replace( ':', "%3a" ); //kdDebug() << " urlpart_encode: " << str << " -> " << enc << endl; return enc; } -static QString urlpart_decode( const QString& str ) +static TQString urlpart_decode( const TQString& str ) { return KURL::decode_string( str ); } @@ -397,11 +397,11 @@ static Kleo::CryptoConfigEntry::ArgType knownArgType( int argType, bool& ok ) { } } -QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine ) +QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const TQStringList& parsedLine ) { // Format: NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE assert( parsedLine.count() >= 10 ); // called checked for it already - QStringList::const_iterator it = parsedLine.begin(); + TQStringList::const_iterator it = parsedLine.begin(); mName = *it++; mFlags = (*it++).toInt(); mLevel = (*it++).toInt(); @@ -421,7 +421,7 @@ QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine ++it; // skip argname (not useful in GUIs) mSet = false; - QString value; + TQString value; if ( mFlags & GPGCONF_FLAG_DEFAULT ) { value = *it; // get default value mDefaultValue = stringToValue( value, true ); @@ -442,18 +442,18 @@ QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine mDirty = false; } -QVariant QGpgMECryptoConfigEntry::stringToValue( const QString& str, bool unescape ) const +TQVariant QGpgMECryptoConfigEntry::stringToValue( const TQString& str, bool unescape ) const { bool isString = isStringType(); if ( isList() ) { - QValueList<QVariant> lst; - QStringList items = QStringList::split( ',', str ); - for( QStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) { - QString val = *valit; + TQValueList<TQVariant> lst; + TQStringList items = TQStringList::split( ',', str ); + for( TQStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) { + TQString val = *valit; if ( isString ) { if ( val.isEmpty() ) { - lst << QString::null; + lst << TQString::null; continue; } else if ( unescape ) { @@ -462,20 +462,20 @@ QVariant QGpgMECryptoConfigEntry::stringToValue( const QString& str, bool unesca val = val.mid( 1 ); } } - lst << QVariant( unescape ? gpgconf_unescape( val ) : val ); + lst << TQVariant( unescape ? gpgconf_unescape( val ) : val ); } return lst; } else { // not a list - QString val( str ); + TQString val( str ); if ( isString ) { if ( val.isEmpty() ) - return QVariant( QString::null ); // not set [ok with lists too?] + return TQVariant( TQString::null ); // not set [ok with lists too?] else if ( unescape ) { Q_ASSERT( val[0] == '"' ); // see README.gpgconf val = val.mid( 1 ); } } - return QVariant( unescape ? gpgconf_unescape( val ) : val ); + return TQVariant( unescape ? gpgconf_unescape( val ) : val ); } } @@ -520,7 +520,7 @@ bool QGpgMECryptoConfigEntry::boolValue() const return mValue.toBool(); } -QString QGpgMECryptoConfigEntry::stringValue() const +TQString QGpgMECryptoConfigEntry::stringValue() const { return toString( false ); } @@ -539,13 +539,13 @@ unsigned int QGpgMECryptoConfigEntry::uintValue() const return mValue.toUInt(); } -static KURL parseURL( int mRealArgType, const QString& str ) +static KURL parseURL( int mRealArgType, const TQString& str ) { if ( mRealArgType == 33 ) { // LDAP server // The format is HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN - QStringList items = QStringList::split( ':', str, true ); + TQStringList items = TQStringList::split( ':', str, true ); if ( items.count() == 5 ) { - QStringList::const_iterator it = items.begin(); + TQStringList::const_iterator it = items.begin(); KURL url; url.setProtocol( "ldap" ); url.setHost( urlpart_decode( *it++ ) ); @@ -563,13 +563,13 @@ static KURL parseURL( int mRealArgType, const QString& str ) } // The opposite of parseURL -static QString splitURL( int mRealArgType, const KURL& url ) +static TQString splitURL( int mRealArgType, const KURL& url ) { if ( mRealArgType == 33 ) { // LDAP server // The format is HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN Q_ASSERT( url.protocol() == "ldap" ); return urlpart_encode( url.host() ) + ":" + - QString::number( url.port() ) + ":" + + TQString::number( url.port() ) + ":" + urlpart_encode( url.user() ) + ":" + urlpart_encode( url.pass() ) + ":" + // KURL automatically encoded the query (e.g. for spaces inside it), @@ -583,7 +583,7 @@ KURL QGpgMECryptoConfigEntry::urlValue() const { Q_ASSERT( mArgType == ArgType_Path || mArgType == ArgType_URL || mArgType == ArgType_LDAPURL ); Q_ASSERT( !isList() ); - QString str = mValue.toString(); + TQString str = mValue.toString(); if ( mArgType == ArgType_Path ) { KURL url; @@ -600,32 +600,32 @@ unsigned int QGpgMECryptoConfigEntry::numberOfTimesSet() const return mValue.toUInt(); } -QStringList QGpgMECryptoConfigEntry::stringValueList() const +TQStringList QGpgMECryptoConfigEntry::stringValueList() const { Q_ASSERT( isStringType() ); Q_ASSERT( isList() ); return mValue.toStringList(); } -QValueList<int> QGpgMECryptoConfigEntry::intValueList() const +TQValueList<int> QGpgMECryptoConfigEntry::intValueList() const { Q_ASSERT( mArgType == ArgType_Int ); Q_ASSERT( isList() ); - QValueList<int> ret; - QValueList<QVariant> lst = mValue.toList(); - for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + TQValueList<int> ret; + TQValueList<TQVariant> lst = mValue.toList(); + for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { ret.append( (*it).toInt() ); } return ret; } -QValueList<unsigned int> QGpgMECryptoConfigEntry::uintValueList() const +TQValueList<unsigned int> QGpgMECryptoConfigEntry::uintValueList() const { Q_ASSERT( mArgType == ArgType_UInt ); Q_ASSERT( isList() ); - QValueList<unsigned int> ret; - QValueList<QVariant> lst = mValue.toList(); - for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + TQValueList<unsigned int> ret; + TQValueList<TQVariant> lst = mValue.toList(); + for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { ret.append( (*it).toUInt() ); } return ret; @@ -635,10 +635,10 @@ KURL::List QGpgMECryptoConfigEntry::urlValueList() const { Q_ASSERT( mArgType == ArgType_Path || mArgType == ArgType_URL || mArgType == ArgType_LDAPURL ); Q_ASSERT( isList() ); - QStringList lst = mValue.toStringList(); + TQStringList lst = mValue.toStringList(); KURL::List ret; - for( QStringList::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + for( TQStringList::const_iterator it = lst.begin(); it != lst.end(); ++it ) { if ( mArgType == ArgType_Path ) { KURL url; url.setPath( *it ); @@ -671,7 +671,7 @@ void QGpgMECryptoConfigEntry::setBoolValue( bool b ) mDirty = true; } -void QGpgMECryptoConfigEntry::setStringValue( const QString& str ) +void QGpgMECryptoConfigEntry::setStringValue( const TQString& str ) { mValue = stringToValue( str, false ); // When setting a string to empty (and there's no default), we need to act like resetToDefault @@ -702,7 +702,7 @@ void QGpgMECryptoConfigEntry::setUIntValue( unsigned int i ) void QGpgMECryptoConfigEntry::setURLValue( const KURL& url ) { - QString str = splitURL( mRealArgType, url ); + TQString str = splitURL( mRealArgType, url ); if ( str.isEmpty() && !isOptional() ) mSet = false; else @@ -718,7 +718,7 @@ void QGpgMECryptoConfigEntry::setNumberOfTimesSet( unsigned int i ) setUIntValue( i ); } -void QGpgMECryptoConfigEntry::setStringValueList( const QStringList& lst ) +void QGpgMECryptoConfigEntry::setStringValueList( const TQStringList& lst ) { mValue = lst; if ( lst.isEmpty() && !isOptional() ) @@ -728,11 +728,11 @@ void QGpgMECryptoConfigEntry::setStringValueList( const QStringList& lst ) mDirty = true; } -void QGpgMECryptoConfigEntry::setIntValueList( const QValueList<int>& lst ) +void QGpgMECryptoConfigEntry::setIntValueList( const TQValueList<int>& lst ) { - QValueList<QVariant> ret; - for( QValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { - ret << QVariant( *it ); + TQValueList<TQVariant> ret; + for( TQValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + ret << TQVariant( *it ); } mValue = ret; if ( ret.isEmpty() && !isOptional() ) @@ -742,11 +742,11 @@ void QGpgMECryptoConfigEntry::setIntValueList( const QValueList<int>& lst ) mDirty = true; } -void QGpgMECryptoConfigEntry::setUIntValueList( const QValueList<unsigned int>& lst ) +void QGpgMECryptoConfigEntry::setUIntValueList( const TQValueList<unsigned int>& lst ) { - QValueList<QVariant> ret; - for( QValueList<unsigned int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { - ret << QVariant( *it ); + TQValueList<TQVariant> ret; + for( TQValueList<unsigned int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + ret << TQVariant( *it ); } if ( ret.isEmpty() && !isOptional() ) mSet = false; @@ -758,7 +758,7 @@ void QGpgMECryptoConfigEntry::setUIntValueList( const QValueList<unsigned int>& void QGpgMECryptoConfigEntry::setURLValueList( const KURL::List& urls ) { - QStringList lst; + TQStringList lst; for( KURL::List::const_iterator it = urls.begin(); it != urls.end(); ++it ) { lst << splitURL( mRealArgType, *it ); } @@ -770,25 +770,25 @@ void QGpgMECryptoConfigEntry::setURLValueList( const KURL::List& urls ) mDirty = true; } -QString QGpgMECryptoConfigEntry::toString( bool escape ) const +TQString QGpgMECryptoConfigEntry::toString( bool escape ) const { // Basically the opposite of stringToValue if ( isStringType() ) { if ( mValue.isNull() ) - return QString::null; + return TQString::null; else if ( isList() ) { // string list - QStringList lst = mValue.toStringList(); + TQStringList lst = mValue.toStringList(); if ( escape ) { - for( QStringList::iterator it = lst.begin(); it != lst.end(); ++it ) { + for( TQStringList::iterator it = lst.begin(); it != lst.end(); ++it ) { if ( !(*it).isNull() ) *it = gpgconf_escape( *it ).prepend( "\"" ); } } - QString res = lst.join( "," ); + TQString res = lst.join( "," ); kdDebug(5150) << "toString: " << res << endl; return res; } else { // normal string - QString res = mValue.toString(); + TQString res = mValue.toString(); if ( escape ) res = gpgconf_escape( res ).prepend( "\"" ); return res; @@ -797,7 +797,7 @@ QString QGpgMECryptoConfigEntry::toString( bool escape ) const if ( !isList() ) // non-list non-string { if ( mArgType == ArgType_None ) { - return mValue.toBool() ? QString::fromLatin1( "1" ) : QString::null; + return mValue.toBool() ? TQString::fromLatin1( "1" ) : TQString::null; } else { // some int Q_ASSERT( mArgType == ArgType_Int || mArgType == ArgType_UInt ); return mValue.toString(); // int to string conversion @@ -806,16 +806,16 @@ QString QGpgMECryptoConfigEntry::toString( bool escape ) const // Lists (of other types than strings) if ( mArgType == ArgType_None ) - return QString::number( numberOfTimesSet() ); - QStringList ret; - QValueList<QVariant> lst = mValue.toList(); - for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { - ret << (*it).toString(); // QVariant does the conversion + return TQString::number( numberOfTimesSet() ); + TQStringList ret; + TQValueList<TQVariant> lst = mValue.toList(); + for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + ret << (*it).toString(); // TQVariant does the conversion } return ret.join( "," ); } -QString QGpgMECryptoConfigEntry::outputString() const +TQString QGpgMECryptoConfigEntry::outputString() const { Q_ASSERT( mSet ); return toString( true ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h index bfcb8e5ca..20a01d315 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h @@ -34,10 +34,10 @@ #define KLEO_QGPGMECRYPTOCONFIG_H #include <kleo/cryptoconfig.h> -#include <qdict.h> -#include <qstringlist.h> -#include <qobject.h> -#include <qvariant.h> +#include <tqdict.h> +#include <tqstringlist.h> +#include <tqobject.h> +#include <tqvariant.h> class KProcIO; class QGpgMECryptoConfigComponent; @@ -46,7 +46,7 @@ class QGpgMECryptoConfigEntry; * CryptoConfig implementation around the gpgconf command-line tool * For method docu, see kleo/cryptoconfig.h */ -class QGpgMECryptoConfig : public QObject, public Kleo::CryptoConfig { +class QGpgMECryptoConfig : public TQObject, public Kleo::CryptoConfig { Q_OBJECT public: @@ -56,9 +56,9 @@ public: QGpgMECryptoConfig(); virtual ~QGpgMECryptoConfig(); - virtual QStringList componentList() const; + virtual TQStringList componentList() const; - virtual Kleo::CryptoConfigComponent* component( const QString& name ) const; + virtual Kleo::CryptoConfigComponent* component( const TQString& name ) const; virtual void clear(); virtual void sync( bool runtime ); @@ -70,25 +70,25 @@ private: void runGpgConf( bool showErrors ); private: - QDict<QGpgMECryptoConfigComponent> mComponents; + TQDict<QGpgMECryptoConfigComponent> mComponents; bool mParsed; }; class QGpgMECryptoConfigGroup; /// For docu, see kleo/cryptoconfig.h -class QGpgMECryptoConfigComponent : public QObject, public Kleo::CryptoConfigComponent { +class QGpgMECryptoConfigComponent : public TQObject, public Kleo::CryptoConfigComponent { Q_OBJECT public: - QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const QString& name, const QString& description ); + QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const TQString& name, const TQString& description ); ~QGpgMECryptoConfigComponent(); - QString name() const { return mName; } - QString iconName() const { return mName; } - QString description() const { return mDescription; } - QStringList groupList() const; - Kleo::CryptoConfigGroup* group( const QString& name ) const; + TQString name() const { return mName; } + TQString iconName() const { return mName; } + TQString description() const { return mDescription; } + TQStringList groupList() const; + Kleo::CryptoConfigGroup* group( const TQString& name ) const; void sync( bool runtime ); @@ -98,41 +98,41 @@ private: void runGpgConf(); private: - QDict<QGpgMECryptoConfigGroup> mGroups; - QString mName; - QString mDescription; + TQDict<QGpgMECryptoConfigGroup> mGroups; + TQString mName; + TQString mDescription; QGpgMECryptoConfigGroup* mCurrentGroup; // during parsing - QString mCurrentGroupName; // during parsing + TQString mCurrentGroupName; // during parsing }; class QGpgMECryptoConfigGroup : public Kleo::CryptoConfigGroup { public: - QGpgMECryptoConfigGroup( const QString & name, const QString& description, int level ); + QGpgMECryptoConfigGroup( const TQString & name, const TQString& description, int level ); ~QGpgMECryptoConfigGroup() {} - QString name() const { return mName; } - QString iconName() const { return QString::null; } - QString description() const { return mDescription; } + TQString name() const { return mName; } + TQString iconName() const { return TQString::null; } + TQString description() const { return mDescription; } Kleo::CryptoConfigEntry::Level level() const { return mLevel; } - QStringList entryList() const; - Kleo::CryptoConfigEntry* entry( const QString& name ) const; + TQStringList entryList() const; + Kleo::CryptoConfigEntry* entry( const TQString& name ) const; private: friend class QGpgMECryptoConfigComponent; // it adds the entries - QDict<QGpgMECryptoConfigEntry> mEntries; - QString mName; - QString mDescription; + TQDict<QGpgMECryptoConfigEntry> mEntries; + TQString mName; + TQString mDescription; Kleo::CryptoConfigEntry::Level mLevel; }; class QGpgMECryptoConfigEntry : public Kleo::CryptoConfigEntry { public: - QGpgMECryptoConfigEntry( const QStringList& parsedLine ); + QGpgMECryptoConfigEntry( const TQStringList& parsedLine ); ~QGpgMECryptoConfigEntry(); - QString name() const { return mName; } - QString description() const { return mDescription; } + TQString name() const { return mName; } + TQString description() const { return mDescription; } bool isOptional() const; bool isReadOnly() const; bool isList() const; @@ -141,40 +141,40 @@ public: ArgType argType() const { return static_cast<ArgType>( mArgType ); } bool isSet() const; bool boolValue() const; - QString stringValue() const; + TQString stringValue() const; int intValue() const; unsigned int uintValue() const; KURL urlValue() const; unsigned int numberOfTimesSet() const; - QStringList stringValueList() const; - QValueList<int> intValueList() const; - QValueList<unsigned int> uintValueList() const; + TQStringList stringValueList() const; + TQValueList<int> intValueList() const; + TQValueList<unsigned int> uintValueList() const; KURL::List urlValueList() const; void resetToDefault(); void setBoolValue( bool ); - void setStringValue( const QString& ); + void setStringValue( const TQString& ); void setIntValue( int ); void setUIntValue( unsigned int ); void setURLValue( const KURL& ); void setNumberOfTimesSet( unsigned int ); - void setStringValueList( const QStringList& ); - void setIntValueList( const QValueList<int>& ); - void setUIntValueList( const QValueList<unsigned int>& ); + void setStringValueList( const TQStringList& ); + void setIntValueList( const TQValueList<int>& ); + void setUIntValueList( const TQValueList<unsigned int>& ); void setURLValueList( const KURL::List& ); bool isDirty() const { return mDirty; } void setDirty( bool b ); - QString outputString() const; + TQString outputString() const; protected: bool isStringType() const; - QVariant stringToValue( const QString& value, bool unescape ) const; - QString toString( bool escape ) const; + TQVariant stringToValue( const TQString& value, bool unescape ) const; + TQString toString( bool escape ) const; private: - QString mName; - QString mDescription; - QVariant mDefaultValue; - QVariant mValue; + TQString mName; + TQString mDescription; + TQVariant mDefaultValue; + TQVariant mValue; uint mFlags : 8; // bitfield with 8 bits uint mLevel : 3; // max is 4 (2, in fact) -> 3 bits uint mRealArgType : 6; // max is 33 -> 6 bits diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp index 17905555e..692efa322 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp @@ -55,7 +55,7 @@ Kleo::QGpgMEDecryptJob::QGpgMEDecryptJob( GpgME::Context * context ) Kleo::QGpgMEDecryptJob::~QGpgMEDecryptJob() { } -void Kleo::QGpgMEDecryptJob::setup( const QByteArray & cipherText ) { +void Kleo::QGpgMEDecryptJob::setup( const TQByteArray & cipherText ) { assert( !mInData ); assert( !mOutData ); @@ -63,7 +63,7 @@ void Kleo::QGpgMEDecryptJob::setup( const QByteArray & cipherText ) { createOutData(); } -GpgME::Error Kleo::QGpgMEDecryptJob::start( const QByteArray & cipherText ) { +GpgME::Error Kleo::QGpgMEDecryptJob::start( const TQByteArray & cipherText ) { setup( cipherText ); hookupContextToEventLoopInteractor(); @@ -75,8 +75,8 @@ GpgME::Error Kleo::QGpgMEDecryptJob::start( const QByteArray & cipherText ) { return err; } -GpgME::DecryptionResult Kleo::QGpgMEDecryptJob::exec( const QByteArray & cipherText, - QByteArray & plainText ) { +GpgME::DecryptionResult Kleo::QGpgMEDecryptJob::exec( const TQByteArray & cipherText, + TQByteArray & plainText ) { setup( cipherText ); const GpgME::DecryptionResult result = mCtx->decrypt( *mInData, *mOutData ); plainText = mOutDataDataProvider->data(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h index 7fc89dff2..133806694 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,11 +53,11 @@ namespace Kleo { ~QGpgMEDecryptJob(); /*! \reimp from DecryptJob */ - GpgME::Error start( const QByteArray & cipherText ); + GpgME::Error start( const TQByteArray & cipherText ); /*! \reimp from DecryptJob */ - GpgME::DecryptionResult exec( const QByteArray & cipherText, - QByteArray & plainText ); + GpgME::DecryptionResult exec( const TQByteArray & cipherText, + TQByteArray & plainText ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -66,7 +66,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & cipherText ); + void setup( const TQByteArray & cipherText ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp index 02cf1ef28..68f67d0fd 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp @@ -56,7 +56,7 @@ Kleo::QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob( GpgME::Context * context ) Kleo::QGpgMEDecryptVerifyJob::~QGpgMEDecryptVerifyJob() { } -void Kleo::QGpgMEDecryptVerifyJob::setup( const QByteArray & cipherText ) { +void Kleo::QGpgMEDecryptVerifyJob::setup( const TQByteArray & cipherText ) { assert( !mInData ); assert( !mOutData ); @@ -64,7 +64,7 @@ void Kleo::QGpgMEDecryptVerifyJob::setup( const QByteArray & cipherText ) { createOutData(); } -GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const QByteArray & cipherText ) { +GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const TQByteArray & cipherText ) { setup( cipherText ); hookupContextToEventLoopInteractor(); @@ -77,7 +77,7 @@ GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const QByteArray & cipherText } std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> -Kleo::QGpgMEDecryptVerifyJob::exec( const QByteArray & cipherText, QByteArray & plainText ) { +Kleo::QGpgMEDecryptVerifyJob::exec( const TQByteArray & cipherText, TQByteArray & plainText ) { setup( cipherText ); const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> result = mCtx->decryptAndVerify( *mInData, *mOutData ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h index a39188746..58da84d07 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> #include <kdepimmacros.h> namespace GpgME { @@ -54,11 +54,11 @@ namespace Kleo { ~QGpgMEDecryptVerifyJob(); /*! \reimp from DecryptVerifyJob */ - GpgME::Error start( const QByteArray & cipherText ); + GpgME::Error start( const TQByteArray & cipherText ); /*! \reimp from DecryptVerifyJob */ std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> - exec( const QByteArray & cipherText, QByteArray & plainText ); + exec( const TQByteArray & cipherText, TQByteArray & plainText ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -67,7 +67,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp index 6ee771a04..364e8f9f7 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp @@ -42,7 +42,7 @@ #include <gpgmepp/context.h> #include <gpgmepp/data.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <assert.h> @@ -56,7 +56,7 @@ Kleo::QGpgMEDownloadJob::QGpgMEDownloadJob( GpgME::Context * context ) Kleo::QGpgMEDownloadJob::~QGpgMEDownloadJob() { } -GpgME::Error Kleo::QGpgMEDownloadJob::start( const QStringList & pats ) { +GpgME::Error Kleo::QGpgMEDownloadJob::start( const TQStringList & pats ) { assert( !patterns() ); assert( !mOutData ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h index 1402b127c..6dc7b209e 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h @@ -51,7 +51,7 @@ namespace Kleo { ~QGpgMEDownloadJob(); /*! \reimp from DownloadJob */ - GpgME::Error start( const QStringList & fingerprints ); + GpgME::Error start( const TQStringList & fingerprints ); private: void doOperationDoneEvent( const GpgME::Error & e ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp index 3f223fc56..ddd51717f 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp @@ -59,7 +59,7 @@ Kleo::QGpgMEEncryptJob::QGpgMEEncryptJob( GpgME::Context * context ) Kleo::QGpgMEEncryptJob::~QGpgMEEncryptJob() { } -void Kleo::QGpgMEEncryptJob::setup( const QByteArray & plainText ) { +void Kleo::QGpgMEEncryptJob::setup( const TQByteArray & plainText ) { assert( !mInData ); assert( !mOutData ); @@ -68,7 +68,7 @@ void Kleo::QGpgMEEncryptJob::setup( const QByteArray & plainText ) { } GpgME::Error Kleo::QGpgMEEncryptJob::start( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ) { + const TQByteArray & plainText, bool alwaysTrust ) { setup( plainText ); hookupContextToEventLoopInteractor(); @@ -84,9 +84,9 @@ GpgME::Error Kleo::QGpgMEEncryptJob::start( const std::vector<GpgME::Key> & reci } GpgME::EncryptionResult Kleo::QGpgMEEncryptJob::exec( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, + const TQByteArray & plainText, bool alwaysTrust, - QByteArray & ciphertext ) { + TQByteArray & ciphertext ) { setup( plainText ); const GpgME::Context::EncryptionFlags flags = alwaysTrust ? GpgME::Context::AlwaysTrust : GpgME::Context::None; @@ -100,7 +100,7 @@ void Kleo::QGpgMEEncryptJob::doOperationDoneEvent( const GpgME::Error & ) { emit result( mResult = mCtx->encryptionResult(), mOutDataDataProvider->data() ); } -void Kleo::QGpgMEEncryptJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMEEncryptJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( mResult.error() && !mResult.error().isCanceled() ) Kleo::MessageBox::error( parent, mResult, this, caption ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h index 362fb4e06..ecc7afd87 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h @@ -39,7 +39,7 @@ #include <gpgmepp/encryptionresult.h> -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -57,15 +57,15 @@ namespace Kleo { /*! \reimp from EncryptJob */ GpgME::Error start( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ); + const TQByteArray & plainText, bool alwaysTrust ); /*! \reimp from EncryptJob */ GpgME::EncryptionResult exec( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust, - QByteArray & cipherText ); + const TQByteArray & plainText, bool alwaysTrust, + TQByteArray & cipherText ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -75,7 +75,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); private: GpgME::EncryptionResult mResult; diff --git a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp index c9274f3b7..c31074aff 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp @@ -42,7 +42,7 @@ #include <gpgmepp/context.h> #include <gpgmepp/data.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <assert.h> @@ -56,7 +56,7 @@ Kleo::QGpgMEExportJob::QGpgMEExportJob( GpgME::Context * context ) Kleo::QGpgMEExportJob::~QGpgMEExportJob() { } -GpgME::Error Kleo::QGpgMEExportJob::start( const QStringList & pats ) { +GpgME::Error Kleo::QGpgMEExportJob::start( const TQStringList & pats ) { assert( !patterns() ); assert( !mOutData ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h index 8b799b583..2c13f4090 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,7 +53,7 @@ namespace Kleo { ~QGpgMEExportJob(); /*! \reimp from ExportJob */ - GpgME::Error start( const QStringList & patterns ); + GpgME::Error start( const TQStringList & patterns ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp index fd1251b65..7c698e7e7 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp @@ -55,13 +55,13 @@ Kleo::QGpgMEImportJob::QGpgMEImportJob( GpgME::Context * context ) Kleo::QGpgMEImportJob::~QGpgMEImportJob() { } -void Kleo::QGpgMEImportJob::setup( const QByteArray & keyData ) { +void Kleo::QGpgMEImportJob::setup( const TQByteArray & keyData ) { assert( !mInData ); createInData( keyData ); } -GpgME::Error Kleo::QGpgMEImportJob::start( const QByteArray & keyData ) { +GpgME::Error Kleo::QGpgMEImportJob::start( const TQByteArray & keyData ) { setup( keyData ); hookupContextToEventLoopInteractor(); @@ -73,7 +73,7 @@ GpgME::Error Kleo::QGpgMEImportJob::start( const QByteArray & keyData ) { return err; } -GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const QByteArray & keyData ) { +GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const TQByteArray & keyData ) { setup( keyData ); return mCtx->importKeys( *mInData ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h index 8c2ee1ad4..f9b208398 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,10 +53,10 @@ namespace Kleo { ~QGpgMEImportJob(); /*! \reimp from ImportJob */ - GpgME::Error start( const QByteArray & keyData ); + GpgME::Error start( const TQByteArray & keyData ); /*! \reimp from ImportJob */ - GpgME::ImportResult exec( const QByteArray & keyData ); + GpgME::ImportResult exec( const TQByteArray & keyData ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -65,7 +65,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp index 897e5ff7c..72f9f77ff 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp @@ -49,8 +49,8 @@ #include <klocale.h> #include <kstandarddirs.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <algorithm> @@ -95,8 +95,8 @@ Kleo::QGpgMEJob::QGpgMEJob( Kleo::Job * _this, GpgME::Context * context ) { InvarianceChecker check( this ); assert( context ); - QObject::connect( QGpgME::EventLoopInteractor::instance(), SIGNAL(aboutToDestroy()), - _this, SLOT(slotCancel()) ); + TQObject::connect( QGpgME::EventLoopInteractor::instance(), TQT_SIGNAL(aboutToDestroy()), + _this, TQT_SLOT(slotCancel()) ); context->setProgressProvider( this ); // (mmutz) work around a gpgme bug in versions at least <= 0.9.0. // These versions will return GPG_ERR_NOT_IMPLEMENTED from @@ -151,19 +151,19 @@ void Kleo::QGpgMEJob::deleteAllPatterns() { void Kleo::QGpgMEJob::hookupContextToEventLoopInteractor() { mCtx->setManagedByEventLoopInteractor( true ); - QObject::connect( QGpgME::EventLoopInteractor::instance(), - SIGNAL(operationDoneEventSignal(GpgME::Context*,const GpgME::Error&)), - mThis, SLOT(slotOperationDoneEvent(GpgME::Context*,const GpgME::Error&)) ); + TQObject::connect( QGpgME::EventLoopInteractor::instance(), + TQT_SIGNAL(operationDoneEventSignal(GpgME::Context*,const GpgME::Error&)), + mThis, TQT_SLOT(slotOperationDoneEvent(GpgME::Context*,const GpgME::Error&)) ); } -void Kleo::QGpgMEJob::setPatterns( const QStringList & sl, bool allowEmpty ) { +void Kleo::QGpgMEJob::setPatterns( const TQStringList & sl, bool allowEmpty ) { InvarianceChecker check( this ); deleteAllPatterns(); // create a new null-terminated C array of char* from patterns: mPatterns = new const char*[ sl.size() + 1 ]; const char* * pat_it = mPatterns; mNumPatterns = 0; - for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) { + for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) { if ( (*it).isNull() ) continue; if ( (*it).isEmpty() && !allowEmpty ) @@ -222,7 +222,7 @@ GpgME::Error Kleo::QGpgMEJob::setSigningKeys( const std::vector<GpgME::Key> & si return 0; } -void Kleo::QGpgMEJob::createInData( const QByteArray & in ) { +void Kleo::QGpgMEJob::createInData( const TQByteArray & in ) { mInDataDataProvider = new QGpgME::QByteArrayDataProvider( in ); mInData = new GpgME::Data( mInDataDataProvider ); assert( !mInData->isNull() ); @@ -236,16 +236,16 @@ void Kleo::QGpgMEJob::createOutData() { static const unsigned int GetAuditLogFlags = GpgME::Context::AuditLogWithHelp|GpgME::Context::HtmlAuditLog; -static QString audit_log_as_html( GpgME::Context * ctx ) { +static TQString audit_log_as_html( GpgME::Context * ctx ) { if ( !ctx ) - return QString(); + return TQString(); QGpgME::QByteArrayDataProvider dp; GpgME::Data data( &dp ); assert( !data.isNull() ); if ( const GpgME::Error err = ctx->getAuditLog( data, GetAuditLogFlags ) ) - return QString(); + return TQString(); else - return QString::fromUtf8( dp.data().data() ); + return TQString::fromUtf8( dp.data().data() ); } void Kleo::QGpgMEJob::doSlotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -272,14 +272,14 @@ void Kleo::QGpgMEJob::showProgress( const char * what, int type, int current, in char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*description*/, bool previousWasBad, bool & canceled ) { // DF: here, description is the key fingerprint, twice, then "17 0". Not really descriptive. - // So I'm ignoring QString::fromLocal8Bit( description ) ) - QString msg = previousWasBad ? + // So I'm ignoring TQString::fromLocal8Bit( description ) ) + TQString msg = previousWasBad ? i18n( "You need a passphrase to unlock the secret key for user:<br/> %1 (retry)" ) : i18n( "You need a passphrase to unlock the secret key for user:<br/> %1" ); - msg = msg.arg( QString::fromUtf8( useridHint ) ) + "<br/><br/>"; + msg = msg.arg( TQString::fromUtf8( useridHint ) ) + "<br/><br/>"; msg.prepend( "<qt>" ); msg += i18n( "This dialog will reappear every time the passphrase is needed. For a more secure solution that also allows caching the passphrase, use gpg-agent." ) + "<br/>"; - const QString gpgAgent = KStandardDirs::findExe( "gpg-agent" ); + const TQString gpgAgent = KStandardDirs::findExe( "gpg-agent" ); if ( !gpgAgent.isEmpty() ) { msg += i18n( "gpg-agent was found in %1, but does not appear to be running." ) .arg( gpgAgent ); @@ -294,7 +294,7 @@ char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*d msg += "<br/><br/>"; msg += i18n( "Enter passphrase:" ); Kleo::PassphraseDialog dlg( msg, i18n("Passphrase Dialog") ); - if ( dlg.exec() != QDialog::Accepted ) { + if ( dlg.exec() != TQDialog::Accepted ) { canceled = true; return 0; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.h b/certmanager/lib/backends/qgpgme/qgpgmejob.h index da7acf1c9..d35080a72 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmejob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmejob.h @@ -38,8 +38,8 @@ #include <gpgmepp/key.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> #include <vector> #include <kdepimmacros.h> @@ -88,7 +88,7 @@ namespace Kleo { /*! Hooks up mCtx to be managed by the event loop interactor */ void hookupContextToEventLoopInteractor(); /*! Fills mPatterns from the stringlist, resets chunking to the full list */ - void setPatterns( const QStringList & sl, bool allowEmpty=false ); + void setPatterns( const TQStringList & sl, bool allowEmpty=false ); /*! Returnes the number of patterns set */ unsigned int numPatterns() const { return mNumPatterns; } /*! Skips to the next chunk of patterns. @return patterns() */ @@ -103,7 +103,7 @@ namespace Kleo { void createOutData(); /*! Creates a GpgME::Data/QGpgME::QByteArrayDataProvider pair, filled with the contents of \a in */ - void createInData( const QByteArray & in ); + void createInData( const TQByteArray & in ); /*! Sets the list of signing keys */ GpgME::Error setSigningKeys( const std::vector<GpgME::Key> & signers ); /*! Call this to implement a slotOperationDoneEvent() */ @@ -116,10 +116,10 @@ namespace Kleo { // protected: - virtual void doEmitProgressSignal( const QString & what, int current, int total ) = 0; + virtual void doEmitProgressSignal( const TQString & what, int current, int total ) = 0; virtual void doEmitDoneSignal() = 0; void doSlotCancel(); - QString auditLogAsHtml() const { return mAuditLogAsHtml; } + TQString auditLogAsHtml() const { return mAuditLogAsHtml; } private: /*! \reimp from GpgME::ProgressProvider */ @@ -146,15 +146,15 @@ namespace Kleo { unsigned int mNumPatterns; unsigned int mChunkSize; unsigned int mPatternStartIndex, mPatternEndIndex; - QString mAuditLogAsHtml; + TQString mAuditLogAsHtml; }; } #define make_slot_cancel private: void slotCancel() { QGpgMEJob::doSlotCancel(); } -#define make_progress_emitter private: void doEmitProgressSignal( const QString & what, int cur, int tot ) { emit progress( what, cur, tot ); } +#define make_progress_emitter private: void doEmitProgressSignal( const TQString & what, int cur, int tot ) { emit progress( what, cur, tot ); } #define make_done_emitter private: void doEmitDoneSignal() { emit done(); } -#define make_auditLogAsHtml private: QString auditLogAsHtml() const { return QGpgMEJob::auditLogAsHtml(); } +#define make_auditLogAsHtml private: TQString auditLogAsHtml() const { return QGpgMEJob::auditLogAsHtml(); } #define QGPGME_JOB make_slot_cancel make_progress_emitter make_done_emitter make_auditLogAsHtml #endif // __KLEO_QGPGMEJOB_H__ diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp index a0ab78f23..b226d6498 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp @@ -59,7 +59,7 @@ Kleo::QGpgMEKeyGenerationJob::~QGpgMEKeyGenerationJob() { delete mPubKeyDataProvider; mPubKeyDataProvider = 0; } -GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const QString & parameters ) { +GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const TQString & parameters ) { assert( !mPubKey ); // set up empty data object for the public key data @@ -80,7 +80,7 @@ GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const QString & parameters ) { } void Kleo::QGpgMEKeyGenerationJob::doOperationDoneEvent( const GpgME::Error & ) { - emit result( mCtx->keyGenerationResult(), mPubKeyDataProvider ? mPubKeyDataProvider->data() : QByteArray() ); + emit result( mCtx->keyGenerationResult(), mPubKeyDataProvider ? mPubKeyDataProvider->data() : TQByteArray() ); } #include "qgpgmekeygenerationjob.moc" diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h index 973aeb12d..bf99007fc 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h @@ -58,7 +58,7 @@ namespace Kleo { ~QGpgMEKeyGenerationJob(); /*! \reimp from KeygenerationJob */ - GpgME::Error start( const QString & parameters ); + GpgME::Error start( const TQString & parameters ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & error ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp index 9c87e3ef6..9e663e92d 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp @@ -47,7 +47,7 @@ #include <klocale.h> #include <kdebug.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <algorithm> @@ -66,20 +66,20 @@ Kleo::QGpgMEKeyListJob::QGpgMEKeyListJob( GpgME::Context * context ) Kleo::QGpgMEKeyListJob::~QGpgMEKeyListJob() { } -void Kleo::QGpgMEKeyListJob::setup( const QStringList & pats, bool secretOnly ) { +void Kleo::QGpgMEKeyListJob::setup( const TQStringList & pats, bool secretOnly ) { assert( !patterns() ); mSecretOnly = secretOnly; setPatterns( pats ); } -GpgME::Error Kleo::QGpgMEKeyListJob::start( const QStringList & pats, bool secretOnly ) { +GpgME::Error Kleo::QGpgMEKeyListJob::start( const TQStringList & pats, bool secretOnly ) { setup( pats, secretOnly ); hookupContextToEventLoopInteractor(); connect( QGpgME::EventLoopInteractor::instance(), - SIGNAL(nextKeyEventSignal(GpgME::Context*,const GpgME::Key&)), - SLOT(slotNextKeyEvent(GpgME::Context*,const GpgME::Key&)) ); + TQT_SIGNAL(nextKeyEventSignal(GpgME::Context*,const GpgME::Key&)), + TQT_SLOT(slotNextKeyEvent(GpgME::Context*,const GpgME::Key&)) ); // The communication channel between gpgme and gpgsm is limited in // the number of patterns that can be transported, but they won't @@ -106,7 +106,7 @@ GpgME::Error Kleo::QGpgMEKeyListJob::start( const QStringList & pats, bool secre return 0; } -GpgME::KeyListResult Kleo::QGpgMEKeyListJob::exec( const QStringList & pats, bool secretOnly, std::vector<GpgME::Key> & keys ) { +GpgME::KeyListResult Kleo::QGpgMEKeyListJob::exec( const TQStringList & pats, bool secretOnly, std::vector<GpgME::Key> & keys ) { setup( pats, secretOnly ); // The communication channel between gpgme and gpgsm is limited in @@ -174,13 +174,13 @@ void Kleo::QGpgMEKeyListJob::slotOperationDoneEvent( GpgME::Context * context, c deleteLater(); } -void Kleo::QGpgMEKeyListJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMEKeyListJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( !mResult.error() || mResult.error().isCanceled() ) return; - const QString msg = i18n( "<qt><p>An error occurred while fetching " + const TQString msg = i18n( "<qt><p>An error occurred while fetching " "the keys from the backend:</p>" "<p><b>%1</b></p></qt>" ) - .arg( QString::fromLocal8Bit( mResult.error().asString() ) ); + .arg( TQString::fromLocal8Bit( mResult.error().asString() ) ); KMessageBox::error( parent, msg, caption ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h index 8320e0134..0bc84c08c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h @@ -54,13 +54,13 @@ namespace Kleo { ~QGpgMEKeyListJob(); /*! \reimp from KeyListJob */ - GpgME::Error start( const QStringList & patterns, bool secretOnly ); + GpgME::Error start( const TQStringList & patterns, bool secretOnly ); /*! \reimp from KeyListJob */ - GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); + GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotNextKeyEvent( GpgME::Context * context, const GpgME::Key & key ); @@ -68,7 +68,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error &) {} // unused, we implement slotOperationDoneEvent ourselves. - void setup( const QStringList &, bool ); + void setup( const TQStringList &, bool ); GpgME::KeyListResult attemptSyncKeyListing( std::vector<GpgME::Key> & ); private: diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp index 3b6ae35eb..6cb71dbad 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp @@ -38,7 +38,7 @@ #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include <assert.h> #include <map> @@ -108,13 +108,13 @@ Kleo::QGpgMEProgressTokenMapper::~QGpgMEProgressTokenMapper() { mSelf = 0; } -typedef std::map< QString, std::map<int,Desc> > Map; +typedef std::map< TQString, std::map<int,Desc> > Map; static const Map & makeMap() { // return a reference to a static to avoid copying static Map map; for ( unsigned int i = 0 ; i < sizeof tokens / sizeof *tokens ; ++i ) { assert( tokens[i].token ); - const QString token = QString::fromLatin1( tokens[i].token ).lower(); + const TQString token = TQString::fromLatin1( tokens[i].token ).lower(); for ( unsigned int j = 0 ; j < tokens[i].numDesc ; ++j ) { const Desc & desc = tokens[i].desc[j]; assert( desc.display ); @@ -124,19 +124,19 @@ static const Map & makeMap() { // return a reference to a static to avoid copyin return map; } -QString Kleo::QGpgMEProgressTokenMapper::map( const char * tokenUtf8, int subtoken, int cur, int tot ) const { +TQString Kleo::QGpgMEProgressTokenMapper::map( const char * tokenUtf8, int subtoken, int cur, int tot ) const { if ( !tokenUtf8 || !*tokenUtf8 ) - return QString::null; + return TQString::null; if ( qstrcmp( tokenUtf8, "file:" ) == 0 ) - return QString::null; // gpgme's job + return TQString::null; // gpgme's job - return map( QString::fromUtf8( tokenUtf8 ), subtoken, cur, tot ); + return map( TQString::fromUtf8( tokenUtf8 ), subtoken, cur, tot ); } -QString Kleo::QGpgMEProgressTokenMapper::map( const QString & token, int subtoken, int cur, int tot ) const { +TQString Kleo::QGpgMEProgressTokenMapper::map( const TQString & token, int subtoken, int cur, int tot ) const { if ( token.startsWith( "file:" ) ) - return QString::null; // gpgme's job + return TQString::null; // gpgme's job static const Map & tokenMap = makeMap(); @@ -149,7 +149,7 @@ QString Kleo::QGpgMEProgressTokenMapper::map( const QString & token, int subtoke if ( it2 == it1->second.end() ) return token; const Desc & desc = it2->second; - QString result = i18n( desc.display ); + TQString result = i18n( desc.display ); if ( desc.useCur ) result = result.arg( cur ); if ( desc.useTot ) diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h index d0a8da6c3..2d62f0ca5 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h @@ -45,8 +45,8 @@ namespace Kleo { public: static const QGpgMEProgressTokenMapper * instance(); - QString map( const char * token, int subtoken, int current, int total ) const; - QString map( const QString & token, int subtoken, int current, int total ) const; + TQString map( const char * token, int subtoken, int current, int total ) const; + TQString map( const TQString & token, int subtoken, int current, int total ) const; private: static QGpgMEProgressTokenMapper * mSelf; diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp index 325306e8c..911afcd63 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp @@ -45,7 +45,7 @@ #include <qgpgme/eventloopinteractor.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpg-error.h> @@ -63,7 +63,7 @@ Kleo::QGpgMERefreshKeysJob::~QGpgMERefreshKeysJob() { } -GpgME::Error Kleo::QGpgMERefreshKeysJob::start( const QStringList & patterns ) { +GpgME::Error Kleo::QGpgMERefreshKeysJob::start( const TQStringList & patterns ) { assert( mPatternsToDo.empty() ); mPatternsToDo = patterns; @@ -94,7 +94,7 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() { strlen("--with-validation") + 1 + strlen("--force-crl-refresh") + 1 + strlen("--enable-crl-checks") + 1; while ( !mPatternsToDo.empty() ) { - const QCString pat = mPatternsToDo.front().utf8().stripWhiteSpace(); + const TQCString pat = mPatternsToDo.front().utf8().stripWhiteSpace(); const unsigned int patLength = pat.length(); if ( patLength >= commandLineLength ) break; @@ -107,12 +107,12 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() { mProcess->setUseStatusFD( true ); - connect( mProcess, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*)) ); - 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(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&)) ); if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else? @@ -129,10 +129,10 @@ void Kleo::QGpgMERefreshKeysJob::slotCancel() { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED ); } -void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const QString & type, const QStringList & args ) { +void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ) { if ( proc != mProcess ) return; - QStringList::const_iterator it = args.begin(); + TQStringList::const_iterator it = args.begin(); bool ok = false; if ( type == "ERROR" ) { @@ -163,7 +163,7 @@ void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const QStr kdDebug( 5150 ) << "Kleo::QGpgMERefreshKeysJob::slotStatus() not recognising PROGRESS with < 4 args!" << endl; return; } - const QString what = *++it; + const TQString what = *++it; ++it; // don't use "type"... const int cur = (*++it).toInt( &ok ); if ( !ok ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h index a0132f223..7ed476866 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h @@ -35,7 +35,7 @@ #include <kleo/refreshkeysjob.h> -#include <qstringlist.h> +#include <tqstringlist.h> namespace Kleo { class GnuPGProcessBase; @@ -56,13 +56,13 @@ namespace Kleo { ~QGpgMERefreshKeysJob(); /*! \reimp from RefreshKeysJob */ - GpgME::Error start( const QStringList & patterns ); + GpgME::Error start( const TQStringList & patterns ); private slots: /*! \reimp from Job */ void slotCancel(); - void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & ); + void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); void slotStderr( KProcess *, char *, int ); void slotProcessExited( KProcess * ); @@ -72,7 +72,7 @@ namespace Kleo { private: GnuPGProcessBase * mProcess; int mError; - QStringList mPatternsToDo; + TQStringList mPatternsToDo; }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp index 0ce543cf9..aeb7b010e 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp @@ -46,14 +46,14 @@ #include <qgpgme/eventloopinteractor.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpg-error.h> #include <string.h> #include <assert.h> -Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const QString& charset ) +Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const TQString& charset ) : ExportJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMESecretKeyExportJob" ), mProcess( 0 ), mError( 0 ), @@ -67,7 +67,7 @@ Kleo::QGpgMESecretKeyExportJob::~QGpgMESecretKeyExportJob() { } -GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const QStringList & patterns ) { +GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const TQStringList & patterns ) { assert( mKeyData.isEmpty() ); if ( patterns.size() != 1 || patterns.front().isEmpty() ) { @@ -88,14 +88,14 @@ GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const QStringList & patterns mProcess->setUseStatusFD( true ); - 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&)) ); if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else? @@ -112,10 +112,10 @@ void Kleo::QGpgMESecretKeyExportJob::slotCancel() { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED ); } -void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const QString & type, const QStringList & args ) { +void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ) { if ( proc != mProcess ) return; - QStringList::const_iterator it = args.begin(); + TQStringList::const_iterator it = args.begin(); bool ok = false; if ( type == "ERROR" ) { @@ -146,7 +146,7 @@ void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const kdDebug( 5150 ) << "Kleo::QGpgMESecretKeyExportJob::slotStatus() not recognising PROGRESS with < 4 args!" << endl; return; } - const QString what = *++it; + const TQString what = *++it; ++it; // don't use "type"... const int cur = (*++it).toInt( &ok ); if ( !ok ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h index 5f5e3b69c..50d42c3ce 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h @@ -35,7 +35,7 @@ #include <kleo/exportjob.h> -#include <qcstring.h> +#include <tqcstring.h> namespace Kleo { class GnuPGProcessBase; @@ -57,27 +57,27 @@ namespace Kleo { class QGpgMESecretKeyExportJob : public ExportJob { Q_OBJECT public: - QGpgMESecretKeyExportJob( bool armour, const QString& charset ); + QGpgMESecretKeyExportJob( bool armour, const TQString& charset ); ~QGpgMESecretKeyExportJob(); /*! \reimp from ExportJob */ - GpgME::Error start( const QStringList & patterns ); + GpgME::Error start( const TQStringList & patterns ); private slots: /*! \reimp from Job */ void slotCancel(); - void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & ); + void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); void slotStdout( KProcess *, char *, int ); void slotStderr( KProcess *, char *, int ); void slotProcessExited( KProcess * ); private: GnuPGProcessBase * mProcess; - QByteArray mKeyData; + TQByteArray mKeyData; int mError; bool mArmour; - QString mCharset; + TQString mCharset; }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp index fae748478..bc05eb86c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp @@ -60,7 +60,7 @@ Kleo::QGpgMESignEncryptJob::~QGpgMESignEncryptJob() { } GpgME::Error Kleo::QGpgMESignEncryptJob::setup( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText ) { + const TQByteArray & plainText ) { assert( !mInData ); assert( !mOutData ); @@ -72,7 +72,7 @@ GpgME::Error Kleo::QGpgMESignEncryptJob::setup( const std::vector<GpgME::Key> & GpgME::Error Kleo::QGpgMESignEncryptJob::start( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ) { + const TQByteArray & plainText, bool alwaysTrust ) { if ( const GpgME::Error error = setup( signers, plainText ) ) { deleteLater(); return error; @@ -94,8 +94,8 @@ GpgME::Error Kleo::QGpgMESignEncryptJob::start( const std::vector<GpgME::Key> & std::pair<GpgME::SigningResult,GpgME::EncryptionResult> Kleo::QGpgMESignEncryptJob::exec( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust, - QByteArray & cipherText ) { + const TQByteArray & plainText, bool alwaysTrust, + TQByteArray & cipherText ) { if ( GpgME::Error err = setup( signers, plainText ) ) return std::make_pair( GpgME::SigningResult( 0, err ), GpgME::EncryptionResult() ); const GpgME::Context::EncryptionFlags flags = @@ -112,7 +112,7 @@ void Kleo::QGpgMESignEncryptJob::doOperationDoneEvent( const GpgME::Error & ) { emit result( mResult.first, mResult.second, mOutDataDataProvider->data() ); } -void Kleo::QGpgMESignEncryptJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMESignEncryptJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( mResult.first.error() && !mResult.first.error().isCanceled() || mResult.second.error() && !mResult.second.error().isCanceled() ) Kleo::MessageBox::error( parent, mResult.first, mResult.second, this, caption ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h index a826edcbf..003377cfe 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h @@ -40,7 +40,7 @@ #include <gpgmepp/signingresult.h> #include <gpgmepp/encryptionresult.h> -#include <qcstring.h> +#include <tqcstring.h> #include <utility> @@ -62,16 +62,16 @@ namespace Kleo { /*! \reimp from SignEncryptJob */ GpgME::Error start( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ); + const TQByteArray & plainText, bool alwaysTrust ); std::pair<GpgME::SigningResult,GpgME::EncryptionResult> exec( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust, - QByteArray & cipherText ); + const TQByteArray & plainText, bool alwaysTrust, + TQByteArray & cipherText ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -81,7 +81,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); GpgME::Error setup( const std::vector<GpgME::Key> &, - const QByteArray & ); + const TQByteArray & ); private: std::pair<GpgME::SigningResult,GpgME::EncryptionResult> mResult; }; diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp index 84485ad5b..0042d6a38 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp @@ -61,7 +61,7 @@ Kleo::QGpgMESignJob::~QGpgMESignJob() { } GpgME::Error Kleo::QGpgMESignJob::setup( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText ) { + const TQByteArray & plainText ) { assert( !mInData ); assert( !mOutData ); @@ -72,7 +72,7 @@ GpgME::Error Kleo::QGpgMESignJob::setup( const std::vector<GpgME::Key> & signers } GpgME::Error Kleo::QGpgMESignJob::start( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode ) { if ( const GpgME::Error error = setup( signers, plainText ) ) { deleteLater(); @@ -90,9 +90,9 @@ GpgME::Error Kleo::QGpgMESignJob::start( const std::vector<GpgME::Key> & signers } GpgME::SigningResult Kleo::QGpgMESignJob::exec( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode, - QByteArray & signature ) { + TQByteArray & signature ) { if ( const GpgME::Error err = setup( signers, plainText ) ) return mResult = GpgME::SigningResult( 0, err ); mResult = mCtx->sign( *mInData, *mOutData, mode ); @@ -105,7 +105,7 @@ void Kleo::QGpgMESignJob::doOperationDoneEvent( const GpgME::Error & ) { emit result( mResult = mCtx->signingResult(), mOutDataDataProvider->data() ); } -void Kleo::QGpgMESignJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMESignJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( mResult.error() && !mResult.error().isCanceled() ) Kleo::MessageBox::error( parent, mResult, this, caption ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.h b/certmanager/lib/backends/qgpgme/qgpgmesignjob.h index c2589b477..6034b542b 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.h @@ -39,7 +39,7 @@ #include <gpgmepp/signingresult.h> -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -57,17 +57,17 @@ namespace Kleo { /*! \reimp from SignJob */ GpgME::Error start( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode ); /*! \reimp from SignJob */ GpgME::SigningResult exec( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode, - QByteArray & signature ); + TQByteArray & signature ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -76,7 +76,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - GpgME::Error setup( const std::vector<GpgME::Key> &, const QByteArray & ); + GpgME::Error setup( const std::vector<GpgME::Key> &, const TQByteArray & ); private: GpgME::SigningResult mResult; diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp index cc1186373..b1022f61b 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp @@ -55,7 +55,7 @@ Kleo::QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob( GpgME::Context * context Kleo::QGpgMEVerifyDetachedJob::~QGpgMEVerifyDetachedJob() { } -void Kleo::QGpgMEVerifyDetachedJob::setup( const QByteArray & signature, const QByteArray & signedData ) { +void Kleo::QGpgMEVerifyDetachedJob::setup( const TQByteArray & signature, const TQByteArray & signedData ) { assert( !mInData ); assert( !mOutData ); @@ -67,8 +67,8 @@ void Kleo::QGpgMEVerifyDetachedJob::setup( const QByteArray & signature, const Q assert( !mOutData->isNull() ); } -GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const QByteArray & signature, - const QByteArray & signedData ) { +GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const TQByteArray & signature, + const TQByteArray & signedData ) { setup( signature, signedData ); hookupContextToEventLoopInteractor(); @@ -80,8 +80,8 @@ GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const QByteArray & signature, return err; } -GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec( const QByteArray & signature, - const QByteArray & signedData ) { +GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec( const TQByteArray & signature, + const TQByteArray & signedData ) { setup( signature, signedData ); const GpgME::VerificationResult r = mCtx->verifyDetachedSignature( *mInData, *mOutData ); getAuditLog(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h index 76141fb80..4e353fe22 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,12 +53,12 @@ namespace Kleo { ~QGpgMEVerifyDetachedJob(); /*! \reimp from VerifyDetachedJob */ - GpgME::Error start( const QByteArray & signature, - const QByteArray & signedData ); + GpgME::Error start( const TQByteArray & signature, + const TQByteArray & signedData ); /*! \reimp from VerifyDetachedJob */ - GpgME::VerificationResult exec( const QByteArray & signature, - const QByteArray & signedData ); + GpgME::VerificationResult exec( const TQByteArray & signature, + const TQByteArray & signedData ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -67,7 +67,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray &, const QByteArray & ); + void setup( const TQByteArray &, const TQByteArray & ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp index 15f075963..92e1917b7 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp @@ -55,7 +55,7 @@ Kleo::QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob( GpgME::Context * context ) Kleo::QGpgMEVerifyOpaqueJob::~QGpgMEVerifyOpaqueJob() { } -void Kleo::QGpgMEVerifyOpaqueJob::setup( const QByteArray & signedData ) { +void Kleo::QGpgMEVerifyOpaqueJob::setup( const TQByteArray & signedData ) { assert( !mInData ); assert( !mOutData ); @@ -63,7 +63,7 @@ void Kleo::QGpgMEVerifyOpaqueJob::setup( const QByteArray & signedData ) { createOutData(); } -GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const QByteArray & signedData ) { +GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const TQByteArray & signedData ) { setup( signedData ); hookupContextToEventLoopInteractor(); @@ -75,7 +75,7 @@ GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const QByteArray & signedData ) return err; } -GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const QByteArray & signedData, QByteArray & plainText ) { +GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const TQByteArray & signedData, TQByteArray & plainText ) { setup( signedData ); const GpgME::VerificationResult res = mCtx->verifyOpaqueSignature( *mInData, *mOutData ); plainText = mOutDataDataProvider->data(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h index 2c167fb1d..869024f2c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,10 +53,10 @@ namespace Kleo { ~QGpgMEVerifyOpaqueJob(); /*! \reimp from VerifyOpaqueJob */ - GpgME::Error start( const QByteArray & signedData ); + GpgME::Error start( const TQByteArray & signedData ); /*! \reimp form VerifyOpaqueJob */ - GpgME::VerificationResult exec( const QByteArray & signedData, QByteArray & plainData ); + GpgME::VerificationResult exec( const TQByteArray & signedData, TQByteArray & plainData ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -65,7 +65,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); }; } diff --git a/certmanager/lib/cryptplug.cpp b/certmanager/lib/cryptplug.cpp index f9d1aa632..77a914514 100644 --- a/certmanager/lib/cryptplug.cpp +++ b/certmanager/lib/cryptplug.cpp @@ -51,7 +51,7 @@ \see cryptplug.h */ -#include <qstring.h> +#include <tqstring.h> #include <string> #include <vector> @@ -570,10 +570,10 @@ parse_dn (const unsigned char *string) } static void -add_dn_part( QCString& result, struct CryptPlug::DnPair& dnPair ) +add_dn_part( TQCString& result, struct CryptPlug::DnPair& dnPair ) { /* email hack */ - QCString mappedPart( dnPair.key ); + TQCString mappedPart( dnPair.key ); for ( unsigned int i = 0 ; i < numOidMaps ; ++i ){ if( !strcasecmp( dnPair.key, oidmap[i].oid ) ) { mappedPart = oidmap[i].name; @@ -586,7 +586,7 @@ add_dn_part( QCString& result, struct CryptPlug::DnPair& dnPair ) } static int -add_dn_parts( QCString& result, struct CryptPlug::DnPair* dn, const char* part ) +add_dn_parts( TQCString& result, struct CryptPlug::DnPair* dn, const char* part ) { int any = 0; @@ -622,8 +622,8 @@ reorder_dn( struct CryptPlug::DnPair *dn, }; const char** stdpart = attrOrder ? ((const char**)attrOrder) : defaultpart; int any=0, any2=0, found_X_=0, i; - QCString result; - QCString resultUnknowns; + TQCString result; + TQCString resultUnknowns; /* find and save the non-standard parts in their original order */ if( dn ){ diff --git a/certmanager/lib/cryptplugfactory.cpp b/certmanager/lib/cryptplugfactory.cpp index 7000d9a90..949e8db9b 100644 --- a/certmanager/lib/cryptplugfactory.cpp +++ b/certmanager/lib/cryptplugfactory.cpp @@ -84,8 +84,8 @@ CryptPlugWrapper * KMail::CryptPlugFactory::active() const { return 0; } -CryptPlugWrapper * KMail::CryptPlugFactory::createForProtocol( const QString & proto ) const { - QString p = proto.lower(); +CryptPlugWrapper * KMail::CryptPlugFactory::createForProtocol( const TQString & proto ) const { + TQString p = proto.lower(); if ( p == "application/pkcs7-signature" || p == "application/x-pkcs7-signature" ) return smime(); if ( p == "application/pgp-signature" || p == "application/x-pgp-signature" ) @@ -101,7 +101,7 @@ CryptPlugWrapper * KMail::CryptPlugFactory::openpgp() const { return mCryptPlugWrapperList->findForLibName( "openpgp" ); } -void KMail::CryptPlugFactory::scanForBackends( QStringList * reason ) { +void KMail::CryptPlugFactory::scanForBackends( TQStringList * reason ) { Kleo::CryptoBackendFactory::scanForBackends( reason ); updateCryptPlugWrapperList(); } diff --git a/certmanager/lib/cryptplugfactory.h b/certmanager/lib/cryptplugfactory.h index a50c3909c..e880f5b55 100644 --- a/certmanager/lib/cryptplugfactory.h +++ b/certmanager/lib/cryptplugfactory.h @@ -62,9 +62,9 @@ namespace KMail { CryptPlugWrapperList & list() const { return *mCryptPlugWrapperList; } - CryptPlugWrapper * createForProtocol( const QString & proto ) const; + CryptPlugWrapper * createForProtocol( const TQString & proto ) const; - void scanForBackends( QStringList * reason ); + void scanForBackends( TQStringList * reason ); private: void updateCryptPlugWrapperList(); diff --git a/certmanager/lib/cryptplugwrapper.cpp b/certmanager/lib/cryptplugwrapper.cpp index ce883d79f..ec6d6d571 100644 --- a/certmanager/lib/cryptplugwrapper.cpp +++ b/certmanager/lib/cryptplugwrapper.cpp @@ -134,16 +134,16 @@ public: _unknownAttrsHandlingChar = "INFIX"; } DNBeautifier( KConfig* config, - const QString& cfgGroup, - const QString& cfgAttributeOrderEntry, - const QString& cfgUnknownAttrsEntry, - const QStringList& fallbackAttrOrder = QStringList(), + const TQString& cfgGroup, + const TQString& cfgAttributeOrderEntry, + const TQString& cfgUnknownAttrsEntry, + const TQStringList& fallbackAttrOrder = TQStringList(), UnknownAttrsHandling fallbackUnknowAttrsHandling = unknownAttrsInfix ) { _unknownAttrsHandling = unknownAttrsInfix; _unknownAttrsHandlingChar = "INFIX"; if( config ){ - const QString oldGroup( config->group() ); + const TQString oldGroup( config->group() ); config->setGroup( cfgGroup ); // e.g. "General" _attrOrder = config->readListEntry( cfgAttributeOrderEntry ); // e.g. "DNAttributeOrder" @@ -169,7 +169,7 @@ public: }else{ _attrOrderChar = new char*[ _attrOrder.count()+1 ]; int i=0; - for( QStringList::ConstIterator itOrder = _attrOrder.begin(); + for( TQStringList::ConstIterator itOrder = _attrOrder.begin(); itOrder != _attrOrder.end(); ++itOrder ){ _attrOrderChar[ i ] = (char*)malloc( ((*itOrder).length()+1)*sizeof(char) ); @@ -182,7 +182,7 @@ public: ~DNBeautifier() { int i=0; - for( QStringList::ConstIterator itOrder = _attrOrder.begin(); + for( TQStringList::ConstIterator itOrder = _attrOrder.begin(); itOrder != _attrOrder.end(); ++itOrder ){ free( _attrOrderChar[ i ] ); @@ -191,7 +191,7 @@ public: delete[] _attrOrderChar; } - QStringList attrOrder() const + TQStringList attrOrder() const { return _attrOrder; } @@ -209,24 +209,24 @@ public: return _unknownAttrsHandlingChar; } - QValueList< QPair<QString,QString> > reorder( const QValueList< QPair<QString,QString> > & dn ) const + TQValueList< QPair<TQString,TQString> > reorder( const TQValueList< QPair<TQString,TQString> > & dn ) const { return reorder( dn, _attrOrder, _unknownAttrsHandling ); } - static QValueList< QPair<QString,QString> > reorder( - const QValueList< QPair<QString,QString> > & dn, - QStringList attrOrder, + static TQValueList< QPair<TQString,TQString> > reorder( + const TQValueList< QPair<TQString,TQString> > & dn, + TQStringList attrOrder, UnknownAttrsHandling unknownAttrsHandling ) { if( !attrOrder.isEmpty() ){ - QPtrList< QPair<QString,QString> > unknownEntries; - QValueList< QPair<QString,QString> > dnNew; + TQPtrList< QPair<TQString,TQString> > unknownEntries; + TQValueList< QPair<TQString,TQString> > dnNew; - QPair<QString,QString>* unknownEntry; - QStringList::ConstIterator itOrder; - QValueList< QPair<QString,QString> >::ConstIterator itDN; + QPair<TQString,TQString>* unknownEntry; + TQStringList::ConstIterator itOrder; + TQValueList< QPair<TQString,TQString> >::ConstIterator itDN; bool bFound; if( unknownAttrsHandling != unknownAttrsHide ){ @@ -266,7 +266,7 @@ public: for( itDN = dn.begin(); itDN != dn.end(); ++itDN ){ if( (*itOrder) == (*itDN).first ){ dnNew << *itDN; - //kdDebug(5150) << QString((*itDN).first) <<" = " << QString((*itDN).second) << endl;; + //kdDebug(5150) << TQString((*itDN).first) <<" = " << TQString((*itDN).second) << endl;; } } } @@ -286,10 +286,10 @@ public: } private: - QStringList _attrOrder; + TQStringList _attrOrder; char** _attrOrderChar; UnknownAttrsHandling _unknownAttrsHandling; - QCString _unknownAttrsHandlingChar; + TQCString _unknownAttrsHandlingChar; }; @@ -405,19 +405,19 @@ CryptPlugWrapper::Config::~Config() { /* Some multi purpose functions ******************************************/ -QString CryptPlugWrapper::errorIdToText( int errId, bool & isPassphraseError ) { +TQString CryptPlugWrapper::errorIdToText( int errId, bool & isPassphraseError ) { const GpgME::Error err( errId ); isPassphraseError = err.isCanceled() || gpgme_err_code( errId ) == GPG_ERR_NO_SECKEY ; // FIXME: more? - return QString::fromLocal8Bit( err.asString() ); + return TQString::fromLocal8Bit( err.asString() ); } /* some special functions ************************************************/ -CryptPlugWrapper::CryptPlugWrapper( const QString& name, - const QString& libName, - const QString& update, +CryptPlugWrapper::CryptPlugWrapper( const TQString& name, + const TQString& libName, + const TQString& update, bool active ) : Kleo::CryptoBackend::Protocol(), _name( name ), @@ -453,7 +453,7 @@ bool CryptPlugWrapper::active() const -bool CryptPlugWrapper::setLibName( const QString& libName ) +bool CryptPlugWrapper::setLibName( const TQString& libName ) { bool bOk = ! _cp; // Changing the lib name is only allowed if( bOk ) // when either no initialization took @@ -461,27 +461,27 @@ bool CryptPlugWrapper::setLibName( const QString& libName ) return bOk; // called afterwards. } -QString CryptPlugWrapper::libName() const +TQString CryptPlugWrapper::libName() const { return _libName; } -QString CryptPlugWrapper::protocol() const +TQString CryptPlugWrapper::protocol() const { if ( _libName.contains( "smime" ) ) return "SMIME"; if ( _libName.contains( "openpgp" ) ) return "OpenPGP"; - return QString::null; + return TQString::null; } -void CryptPlugWrapper::setDisplayName( const QString& name ) +void CryptPlugWrapper::setDisplayName( const TQString& name ) { _name = name; } -QString CryptPlugWrapper::displayName() const +TQString CryptPlugWrapper::displayName() const { if ( !_name.isEmpty() ) return _name; @@ -492,7 +492,7 @@ QString CryptPlugWrapper::displayName() const return i18n("(Unknown Protocol)"); } -bool CryptPlugWrapper::initialize( InitStatus* initStatus, QString* errorMsg ) +bool CryptPlugWrapper::initialize( InitStatus* initStatus, TQString* errorMsg ) { if ( _cp ) return true; @@ -547,7 +547,7 @@ void CryptPlugWrapper::deinitialize() } -CryptPlugWrapper::InitStatus CryptPlugWrapper::initStatus( QString* errorMsg ) const +CryptPlugWrapper::InitStatus CryptPlugWrapper::initStatus( TQString* errorMsg ) const { if( errorMsg ) *errorMsg = _lastError; @@ -780,7 +780,7 @@ Kleo::ExportJob * CryptPlugWrapper::publicKeyExportJob( bool armor ) const { return new Kleo::QGpgMEExportJob( context ); } -Kleo::ExportJob * CryptPlugWrapper::secretKeyExportJob( bool armor, const QString& charset ) const { +Kleo::ExportJob * CryptPlugWrapper::secretKeyExportJob( bool armor, const TQString& charset ) const { if ( !_cp || _cp->mProtocol != GpgME::Context::CMS ) // fixme: add support for gpg, too return 0; diff --git a/certmanager/lib/cryptplugwrapper.h b/certmanager/lib/cryptplugwrapper.h index 91cec75df..fca08b650 100644 --- a/certmanager/lib/cryptplugwrapper.h +++ b/certmanager/lib/cryptplugwrapper.h @@ -48,12 +48,12 @@ */ #include "kleo/cryptobackend.h" -#include <qdatetime.h> +#include <tqdatetime.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qstringlist.h> -#include <qstring.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqstringlist.h> +#include <tqstring.h> #include <kdepimmacros.h> @@ -452,7 +452,7 @@ private: */ class KDE_EXPORT CryptPlugWrapper : public Kleo::CryptoBackend::Protocol { public: - static QString errorIdToText( int errId, bool & isPassphraseError ); + static TQString errorIdToText( int errId, bool & isPassphraseError ); /*! \ingroup groupGeneral @@ -545,9 +545,9 @@ public: \sa ~CryptPlugWrapper, setActive, active, initialize, deinitialize \sa initStatus */ - CryptPlugWrapper( const QString& name=QString::null, - const QString& libName=QString::null, - const QString& update=QString::null, + CryptPlugWrapper( const TQString& name=TQString::null, + const TQString& libName=TQString::null, + const TQString& update=TQString::null, bool active = false ); /*! \ingroup groupAdmin @@ -561,9 +561,9 @@ public: */ ~CryptPlugWrapper(); - QString protocol() const; + TQString protocol() const; - QString name() const { + TQString name() const { return protocol(); } @@ -628,7 +628,7 @@ public: \sa libName, CryptPlugWrapper(), ~CryptPlugWrapper \sa deinitialize, initialize, initStatus */ - bool setLibName( const QString& libName ); + bool setLibName( const TQString& libName ); /*! \ingroup groupAdmin \brief Returns the CRYPTPLUG library name. @@ -638,21 +638,21 @@ public: \sa setLibName */ - QString libName() const; + TQString libName() const; /*! \ingroup groupAdmin \brief Specifies the external name that is visible in lists, messages, etc. */ - void setDisplayName( const QString& name ); + void setDisplayName( const TQString& name ); /*! \ingroup groupAdmin \brief Returns the external name. \return the external name used for display purposes */ - QString displayName() const; + TQString displayName() const; private: /*! \ingroup groupGeneral @@ -672,7 +672,7 @@ private: \sa initStatus, deinitialize, CryptPlugWrapper(), ~CryptPlugWrapper \sa setActive, active */ - bool initialize( InitStatus* initStatus, QString* errorMsg ); + bool initialize( InitStatus* initStatus, TQString* errorMsg ); public: /*! \ingroup groupGeneral @@ -701,7 +701,7 @@ public: \sa initialize, deinitialize, CryptPlugWrapper(), ~CryptPlugWrapper \sa setActive, active */ - InitStatus initStatus( QString* errorMsg ) const; + InitStatus initStatus( TQString* errorMsg ) const; /*! \ingroup groupGeneral @@ -714,7 +714,7 @@ public: however. \note In case this function cannot be executed the system's error - message may be retrieved by calling initStatus( QString* ). + message may be retrieved by calling initStatus( TQString* ). \return whether the relative feature is implemented or not */ @@ -805,7 +805,7 @@ public: Kleo::ImportJob * importJob() const; Kleo::ExportJob * publicKeyExportJob( bool armor=false ) const; - Kleo::ExportJob * secretKeyExportJob( bool armor=false, const QString& charset = QString::null ) const; + Kleo::ExportJob * secretKeyExportJob( bool armor=false, const TQString& charset = TQString::null ) const; Kleo::DownloadJob * downloadJob( bool armor=false ) const; Kleo::DeleteJob * deleteJob() const; @@ -813,19 +813,19 @@ public: Kleo::DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const; Kleo::RefreshKeysJob * refreshKeysJob() const; - Kleo::SpecialJob * specialJob( const char *, const QMap<QString,QVariant> & ) const { return 0; } + Kleo::SpecialJob * specialJob( const char *, const TQMap<TQString,TQVariant> & ) const { return 0; } GpgME::ImportResult importCertificate( const char* data, size_t length ); CryptPlug * cryptPlug() const { return _cp; } private: - QString _name; - QString _libName; - QString _updateURL; + TQString _name; + TQString _libName; + TQString _updateURL; bool _active; InitStatus _initStatus; - QString _lastError; + TQString _lastError; CryptPlug* _cp; // local parameters without representation in cryptplug.h bool mAlwaysEncryptToSelf; diff --git a/certmanager/lib/cryptplugwrapperlist.cpp b/certmanager/lib/cryptplugwrapperlist.cpp index 3ff38ddd8..43f88670d 100644 --- a/certmanager/lib/cryptplugwrapperlist.cpp +++ b/certmanager/lib/cryptplugwrapperlist.cpp @@ -25,9 +25,9 @@ #include "cryptplugwrapperlist.h" -CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const QString & libName ) const +CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const TQString & libName ) const { - for ( QPtrListIterator<CryptPlugWrapper> it( *this ) ; it.current() ; ++it ) + for ( TQPtrListIterator<CryptPlugWrapper> it( *this ) ; it.current() ; ++it ) if ( (*it)->libName().find( libName, 0, false ) >= 0 ) return *it; return 0; diff --git a/certmanager/lib/cryptplugwrapperlist.h b/certmanager/lib/cryptplugwrapperlist.h index 3fab5799c..30d4fcd95 100644 --- a/certmanager/lib/cryptplugwrapperlist.h +++ b/certmanager/lib/cryptplugwrapperlist.h @@ -24,14 +24,14 @@ #include "cryptplugwrapper.h" -#include <qptrlist.h> +#include <tqptrlist.h> -class CryptPlugWrapperList : public QPtrList<CryptPlugWrapper> +class CryptPlugWrapperList : public TQPtrList<CryptPlugWrapper> { public: - CryptPlugWrapper * findForLibName( const QString & libName ) const; + CryptPlugWrapper * findForLibName( const TQString & libName ) const; }; -typedef QPtrListIterator<CryptPlugWrapper> CryptPlugWrapperListIterator; +typedef TQPtrListIterator<CryptPlugWrapper> CryptPlugWrapperListIterator; #endif diff --git a/certmanager/lib/kleo/cryptobackend.h b/certmanager/lib/kleo/cryptobackend.h index a94e1ae3a..a004fc899 100644 --- a/certmanager/lib/kleo/cryptobackend.h +++ b/certmanager/lib/kleo/cryptobackend.h @@ -33,7 +33,7 @@ #ifndef __KLEO_CRYPTOBACKEND_H__ #define __KLEO_CRYPTOBACKEND_H__ -#include <qstring.h> +#include <tqstring.h> namespace Kleo { class CryptoConfig; @@ -69,12 +69,12 @@ namespace Kleo { virtual ~CryptoBackend() {} - virtual QString name() const = 0; - virtual QString displayName() const = 0; + virtual TQString name() const = 0; + virtual TQString displayName() const = 0; - virtual bool checkForOpenPGP( QString * reason=0 ) const = 0; - virtual bool checkForSMIME( QString * reason=0 ) const = 0; - virtual bool checkForProtocol( const char * name, QString * reason=0 ) const = 0; + virtual bool checkForOpenPGP( TQString * reason=0 ) const = 0; + virtual bool checkForSMIME( TQString * reason=0 ) const = 0; + virtual bool checkForProtocol( const char * name, TQString * reason=0 ) const = 0; virtual bool supportsOpenPGP() const = 0; virtual bool supportsSMIME() const = 0; @@ -93,9 +93,9 @@ namespace Kleo { public: virtual ~Protocol() {} - virtual QString name() const = 0; + virtual TQString name() const = 0; - virtual QString displayName() const = 0; + virtual TQString displayName() const = 0; virtual KeyListJob * keyListJob( bool remote=false, bool includeSigs=false, bool validate=false ) const = 0; virtual EncryptJob * encryptJob( bool armor=false, bool textmode=false ) const = 0; @@ -107,14 +107,14 @@ namespace Kleo { virtual ImportJob * importJob() const = 0; virtual ExportJob * publicKeyExportJob( bool armor=false ) const = 0; // @param charset the encoding of the passphrase in the exported file - virtual ExportJob * secretKeyExportJob( bool armor=false, const QString& charset = QString::null ) const = 0; + virtual ExportJob * secretKeyExportJob( bool armor=false, const TQString& charset = TQString::null ) const = 0; virtual DownloadJob * downloadJob( bool armor=false ) const = 0; virtual DeleteJob * deleteJob() const = 0; virtual SignEncryptJob * signEncryptJob( bool armor=false, bool textMode=false ) const = 0; virtual DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const = 0; virtual RefreshKeysJob * refreshKeysJob() const = 0; - virtual SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const = 0; + virtual SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const = 0; }; } diff --git a/certmanager/lib/kleo/cryptobackendfactory.cpp b/certmanager/lib/kleo/cryptobackendfactory.cpp index c56a7096f..88ba036de 100644 --- a/certmanager/lib/kleo/cryptobackendfactory.cpp +++ b/certmanager/lib/kleo/cryptobackendfactory.cpp @@ -66,7 +66,7 @@ static const char * availableProtocols[] = { static const unsigned int numAvailableProtocols = sizeof availableProtocols / sizeof *availableProtocols; Kleo::CryptoBackendFactory::CryptoBackendFactory() - : QObject( qApp, "CryptoBackendFactory::instance()" ), + : TQObject( qApp, "CryptoBackendFactory::instance()" ), mConfigObject( 0 ), mAvailableProtocols( availableProtocols, availableProtocols + numAvailableProtocols ) { @@ -146,11 +146,11 @@ bool Kleo::CryptoBackendFactory::hasBackends() const { return !mBackendList.empty(); } -void Kleo::CryptoBackendFactory::scanForBackends( QStringList * reasons ) { +void Kleo::CryptoBackendFactory::scanForBackends( TQStringList * reasons ) { for ( std::vector<CryptoBackend*>::const_iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it ) { assert( *it ); for ( int i = 0 ; const char * protocol = (*it)->enumerateProtocols( i ) ; ++i ) { - QString reason; + TQString reason; if ( (*it)->supportsProtocol( protocol ) && !(*it)->checkForProtocol( protocol, &reason ) ) { if ( reasons ) { reasons->push_back( i18n("While scanning for %1 support in backend %2:") @@ -166,7 +166,7 @@ const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backend( unsigned int id return ( idx < mBackendList.size() ) ? mBackendList[idx] : 0 ; } -const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const QString& name ) const { +const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const TQString& name ) const { for ( std::vector<CryptoBackend*>::const_iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it ) { if ( (*it)->name() == name ) return *it; @@ -174,7 +174,7 @@ const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const QSt return 0; } -Kleo::BackendConfigWidget * Kleo::CryptoBackendFactory::configWidget( QWidget * parent, const char * name ) const { +Kleo::BackendConfigWidget * Kleo::CryptoBackendFactory::configWidget( TQWidget * parent, const char * name ) const { return new Kleo::BackendConfigWidget( mSelf, parent, name ); } @@ -194,7 +194,7 @@ void Kleo::CryptoBackendFactory::setOpenPGPBackend( const CryptoBackend* backend } void Kleo::CryptoBackendFactory::setProtocolBackend( const char * protocol, const CryptoBackend * backend ) { - const QString name = backend ? backend->name() : QString::null ; + const TQString name = backend ? backend->name() : TQString::null ; KConfigGroup group( configObject(), "Backends" ); group.writeEntry( protocol, name ); configObject()->sync(); @@ -220,7 +220,7 @@ void Kleo::CryptoBackendFactory::readConfig() { mBackends.clear(); const KConfigGroup group( configObject(), "Backends" ); for ( ProtocolSet::const_iterator it = mAvailableProtocols.begin(), end = mAvailableProtocols.end() ; it != end ; ++it ) { - const QString backend = group.readEntry( *it, defaultBackend( *it ) ); + const TQString backend = group.readEntry( *it, defaultBackend( *it ) ); mBackends[*it] = backendByName( backend ); } } diff --git a/certmanager/lib/kleo/cryptobackendfactory.h b/certmanager/lib/kleo/cryptobackendfactory.h index 7a54e9fd1..09136f7e3 100644 --- a/certmanager/lib/kleo/cryptobackendfactory.h +++ b/certmanager/lib/kleo/cryptobackendfactory.h @@ -33,7 +33,7 @@ #ifndef __KLEO_CRYPTOBACKENDFACTORY_H__ #define __KLEO_CRYPTOBACKENDFACTORY_H__ -#include <qobject.h> +#include <tqobject.h> #include "cryptobackend.h" #include <kdepimmacros.h> @@ -56,7 +56,7 @@ namespace Kleo { } }; - class KDE_EXPORT CryptoBackendFactory : public QObject { + class KDE_EXPORT CryptoBackendFactory : public TQObject { Q_OBJECT protected: CryptoBackendFactory(); @@ -73,7 +73,7 @@ namespace Kleo { bool hasBackends() const; - Kleo::BackendConfigWidget * configWidget( QWidget * parent=0, const char * name=0 ) const; + Kleo::BackendConfigWidget * configWidget( TQWidget * parent=0, const char * name=0 ) const; KConfig* configObject() const; @@ -88,7 +88,7 @@ namespace Kleo { void setOpenPGPBackend( const CryptoBackend* backend ); void setProtocolBackend( const char * name, const CryptoBackend * backend ); - void scanForBackends( QStringList * reasons=0 ); + void scanForBackends( TQStringList * reasons=0 ); const char * enumerateProtocols( int i ) const; @@ -103,7 +103,7 @@ namespace Kleo { ProtocolSet mAvailableProtocols; private: - const CryptoBackend * backendByName( const QString& name ) const; + const CryptoBackend * backendByName( const TQString& name ) const; void readConfig(); CryptoBackendFactory( const CryptoBackendFactory & ); void operator=( const CryptoBackendFactory & ); diff --git a/certmanager/lib/kleo/cryptoconfig.h b/certmanager/lib/kleo/cryptoconfig.h index da16ca5b5..ec0a0ed5d 100644 --- a/certmanager/lib/kleo/cryptoconfig.h +++ b/certmanager/lib/kleo/cryptoconfig.h @@ -91,12 +91,12 @@ namespace Kleo { /** * Return the internal name of this entry */ - virtual QString name() const = 0; + virtual TQString name() const = 0; /** * @return user-visible description of this entry */ - virtual QString description() const = 0; + virtual TQString description() const = 0; /** * @return true if the argument is optional @@ -142,7 +142,7 @@ namespace Kleo { * Return value as a string (available for all argtypes) * The returned string can be empty (explicitely set to empty) or null (not set). */ - virtual QString stringValue() const = 0; + virtual TQString stringValue() const = 0; /** * Return value as a signed int @@ -167,17 +167,17 @@ namespace Kleo { /** * Return value as a list of strings (mostly meaningful for String, Path and URL argtypes, if isList()) */ - virtual QStringList stringValueList() const = 0; + virtual TQStringList stringValueList() const = 0; /** * Return value as a list of signed ints */ - virtual QValueList<int> intValueList() const = 0; + virtual TQValueList<int> intValueList() const = 0; /** * Return value as a list of unsigned ints */ - virtual QValueList<unsigned int> uintValueList() const = 0; + virtual TQValueList<unsigned int> uintValueList() const = 0; /** * Return value as a list of URLs (only meaningful for Path and URL argtypes, if isList()) @@ -198,7 +198,7 @@ namespace Kleo { /** * Set string value (allowed for all argtypes) */ - virtual void setStringValue( const QString& ) = 0; + virtual void setStringValue( const TQString& ) = 0; /** * Set a new signed int value @@ -223,17 +223,17 @@ namespace Kleo { /** * Set a new string-list value (only allowed for String, Path and URL argtypes, if isList()) */ - virtual void setStringValueList( const QStringList& ) = 0; + virtual void setStringValueList( const TQStringList& ) = 0; /** * Set a new list of signed int values */ - virtual void setIntValueList( const QValueList<int>& ) = 0; + virtual void setIntValueList( const TQValueList<int>& ) = 0; /** * Set a new list of unsigned int values */ - virtual void setUIntValueList( const QValueList<unsigned int>& ) = 0; + virtual void setUIntValueList( const TQValueList<unsigned int>& ) = 0; /** * Set value as a URL list (only meaningful for Path (if all URLs are local) and URL argtypes, if isList()) @@ -257,17 +257,17 @@ namespace Kleo { /** * Return the internal name of this group */ - virtual QString name() const = 0; + virtual TQString name() const = 0; /** * Return the name of the icon for this group */ - virtual QString iconName() const = 0; + virtual TQString iconName() const = 0; /** * @return user-visible description of this group */ - virtual QString description() const = 0; + virtual TQString description() const = 0; /** * User level @@ -279,14 +279,14 @@ namespace Kleo { * * @return list of group entry names. **/ - virtual QStringList entryList() const = 0; + virtual TQStringList entryList() const = 0; /** * @return the configuration object for a given entry in this group * The object is owned by CryptoConfigGroup, don't delete it. * Groups cannot be nested, so all entries returned here are pure entries, no groups. */ - virtual CryptoConfigEntry* entry( const QString& name ) const = 0; + virtual CryptoConfigEntry* entry( const TQString& name ) const = 0; }; /** @@ -300,17 +300,17 @@ namespace Kleo { /** * Return the internal name of this component */ - virtual QString name() const = 0; + virtual TQString name() const = 0; /** * Return the name of the icon for this component */ - virtual QString iconName() const = 0; + virtual TQString iconName() const = 0; /** * Return user-visible description of this component */ - virtual QString description() const = 0; + virtual TQString description() const = 0; /** * Returns the list of groups that are known about. @@ -318,13 +318,13 @@ namespace Kleo { * @return list of group names. One of them can be "<nogroup>", which is the group where all * "toplevel" options (belonging to no group) are. */ - virtual QStringList groupList() const = 0; + virtual TQStringList groupList() const = 0; /** * @return the configuration object for a given group * The object is owned by CryptoConfigComponent, don't delete it. */ - virtual CryptoConfigGroup* group( const QString& name ) const = 0; + virtual CryptoConfigGroup* group( const TQString& name ) const = 0; }; @@ -341,13 +341,13 @@ namespace Kleo { * Use @ref component() to retrieve more information about each one. * @return list of component names. **/ - virtual QStringList componentList() const = 0; + virtual TQStringList componentList() const = 0; /** * @return the configuration object for a given component * The object is owned by CryptoConfig, don't delete it. */ - virtual CryptoConfigComponent* component( const QString& name ) const = 0; + virtual CryptoConfigComponent* component( const TQString& name ) const = 0; /** * Convenience method to get hold of a single configuration entry when @@ -357,7 +357,7 @@ namespace Kleo { * @return the configuration object for a single configuration entry, 0 if not found. * The object is owned by CryptoConfig, don't delete it. */ - CryptoConfigEntry* entry( const QString& componentName, const QString& groupName, const QString& entryName ) const { + CryptoConfigEntry* entry( const TQString& componentName, const TQString& groupName, const TQString& entryName ) const { const Kleo::CryptoConfigComponent* comp = component( componentName ); const Kleo::CryptoConfigGroup* group = comp ? comp->group( groupName ) : 0; return group ? group->entry( entryName ) : 0; diff --git a/certmanager/lib/kleo/decryptjob.h b/certmanager/lib/kleo/decryptjob.h index e882152a0..8351a1ff6 100644 --- a/certmanager/lib/kleo/decryptjob.h +++ b/certmanager/lib/kleo/decryptjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -54,15 +54,15 @@ namespace Kleo { signals to suitable slots and then start the decryption with a call to start(). This call might fail, in which case the DecryptJob instance will have scheduled it's own destruction with - a call to QObject::deleteLater(). + a call to TQObject::deleteLater(). After result() is emitted, the DecryptJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class DecryptJob : public Job { Q_OBJECT protected: - DecryptJob( QObject * parent, const char * name ); + DecryptJob( TQObject * parent, const char * name ); public: ~DecryptJob(); @@ -70,13 +70,13 @@ namespace Kleo { Starts the decryption operation. \a cipherText is the data to decrypt. */ - virtual GpgME::Error start( const QByteArray & cipherText ) = 0; + virtual GpgME::Error start( const TQByteArray & cipherText ) = 0; - virtual GpgME::DecryptionResult exec( const QByteArray & cipherText, - QByteArray & plainText ) = 0; + virtual GpgME::DecryptionResult exec( const TQByteArray & cipherText, + TQByteArray & plainText ) = 0; signals: - void result( const GpgME::DecryptionResult & result, const QByteArray & plainText ); + void result( const GpgME::DecryptionResult & result, const TQByteArray & plainText ); }; } diff --git a/certmanager/lib/kleo/decryptverifyjob.h b/certmanager/lib/kleo/decryptverifyjob.h index f7cdb81a1..e220670c6 100644 --- a/certmanager/lib/kleo/decryptverifyjob.h +++ b/certmanager/lib/kleo/decryptverifyjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> #include <utility> @@ -57,15 +57,15 @@ namespace Kleo { signals to suitable slots and then start the operation with a call to start(). This call might fail, in which case the DecryptVerifyJob instance will have scheduled it's own destruction with - a call to QObject::deleteLater(). + a call to TQObject::deleteLater(). After result() is emitted, the DecryptVerifyJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class DecryptVerifyJob : public Job { Q_OBJECT protected: - DecryptVerifyJob( QObject * parent, const char * name ); + DecryptVerifyJob( TQObject * parent, const char * name ); public: ~DecryptVerifyJob(); @@ -73,16 +73,16 @@ namespace Kleo { Starts the combined decryption and verification operation. \a cipherText is the data to decrypt and later verify. */ - virtual GpgME::Error start( const QByteArray & cipherText ) = 0; + virtual GpgME::Error start( const TQByteArray & cipherText ) = 0; /** Synchronous equivalent of start() */ virtual std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> - exec( const QByteArray & cipherText, QByteArray & plainText ) = 0; + exec( const TQByteArray & cipherText, TQByteArray & plainText ) = 0; signals: void result( const GpgME::DecryptionResult & decryptionresult, const GpgME::VerificationResult & verificationresult, - const QByteArray & plainText ); + const TQByteArray & plainText ); }; } diff --git a/certmanager/lib/kleo/deletejob.h b/certmanager/lib/kleo/deletejob.h index fd70ec513..f5d5f111b 100644 --- a/certmanager/lib/kleo/deletejob.h +++ b/certmanager/lib/kleo/deletejob.h @@ -50,15 +50,15 @@ namespace Kleo { signals to suitable slots and then start the delete with a call to start(). This call might fail, in which case the DeleteJob instance will have scheduled it's own destruction with a call to - QObject::deleteLater(). + TQObject::deleteLater(). After result() is emitted, the DeleteJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class DeleteJob : public Job { Q_OBJECT protected: - DeleteJob( QObject * parent, const char * name ); + DeleteJob( TQObject * parent, const char * name ); public: ~DeleteJob(); diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp index 9ba2209fb..61693aff2 100644 --- a/certmanager/lib/kleo/dn.cpp +++ b/certmanager/lib/kleo/dn.cpp @@ -43,8 +43,8 @@ #include <kconfig.h> #include <klocale.h> -#include <qstringlist.h> -#include <qvaluevector.h> +#include <tqstringlist.h> +#include <tqvaluevector.h> #include <iostream> #include <iterator> @@ -230,9 +230,9 @@ parse_dn_part (DnPair *array, const unsigned char *string) static Kleo::DN::Attribute::List parse_dn( const unsigned char * string ) { if ( !string ) - return QValueVector<Kleo::DN::Attribute>(); + return TQValueVector<Kleo::DN::Attribute>(); - QValueVector<Kleo::DN::Attribute> result; + TQValueVector<Kleo::DN::Attribute> result; while (*string) { while (*string == ' ') @@ -245,8 +245,8 @@ parse_dn( const unsigned char * string ) { if (!string) goto failure; if ( pair.key && pair.value ) - result.push_back( Kleo::DN::Attribute( QString::fromUtf8( pair.key ), - QString::fromUtf8( pair.value ) ) ); + result.push_back( Kleo::DN::Attribute( TQString::fromUtf8( pair.key ), + TQString::fromUtf8( pair.value ) ) ); free( pair.key ); free( pair.value ); @@ -260,18 +260,18 @@ parse_dn( const unsigned char * string ) { return result; failure: - return QValueVector<Kleo::DN::Attribute>(); + return TQValueVector<Kleo::DN::Attribute>(); } -static QValueVector<Kleo::DN::Attribute> -parse_dn( const QString & dn ) { +static TQValueVector<Kleo::DN::Attribute> +parse_dn( const TQString & dn ) { return parse_dn( (const unsigned char*)dn.utf8().data() ); } -static QString dn_escape( const QString & s ) { - QString result; +static TQString dn_escape( const TQString & s ) { + TQString result; for ( unsigned int i = 0, end = s.length() ; i != end ; ++i ) { - const QChar ch = s[i]; + const TQChar ch = s[i]; switch ( ch.unicode() ) { case ',': case '+': @@ -290,9 +290,9 @@ static QString dn_escape( const QString & s ) { } static QString -serialise( const QValueVector<Kleo::DN::Attribute> & dn ) { - QStringList result; - for ( QValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it ) +serialise( const TQValueVector<Kleo::DN::Attribute> & dn ) { + TQStringList result; + for ( TQValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it ) if ( !(*it).name().isEmpty() && !(*it).value().isEmpty() ) result.push_back( (*it).name().stripWhiteSpace() + '=' + dn_escape( (*it).value().stripWhiteSpace() ) ); return result.join( "," ); @@ -300,7 +300,7 @@ serialise( const QValueVector<Kleo::DN::Attribute> & dn ) { static Kleo::DN::Attribute::List reorder_dn( const Kleo::DN::Attribute::List & dn ) { - const QStringList & attrOrder = Kleo::DNAttributeMapper::instance()->attributeOrder(); + const TQStringList & attrOrder = Kleo::DNAttributeMapper::instance()->attributeOrder(); Kleo::DN::Attribute::List unknownEntries; Kleo::DN::Attribute::List result; @@ -313,7 +313,7 @@ reorder_dn( const Kleo::DN::Attribute::List & dn ) { unknownEntries.push_back( *it ); // process the known attrs in the desired order - for ( QStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit ) + for ( TQStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit ) if ( *oit == "_X_" ) { // insert the unknown attrs std::copy( unknownEntries.begin(), unknownEntries.end(), @@ -339,7 +339,7 @@ Kleo::DN::DN() { d->ref(); } -Kleo::DN::DN( const QString & dn ) { +Kleo::DN::DN( const TQString & dn ) { d = new Private(); d->ref(); d->attributes = parse_dn( dn ); @@ -376,20 +376,20 @@ const Kleo::DN & Kleo::DN::operator=( const DN & that ) { return *this; } -QString Kleo::DN::prettyDN() const { +TQString Kleo::DN::prettyDN() const { if ( !d ) - return QString::null; + return TQString::null; if ( d->reorderedAttributes.empty() ) d->reorderedAttributes = reorder_dn( d->attributes ); return serialise( d->reorderedAttributes ); } -QString Kleo::DN::dn() const { - return d ? serialise( d->attributes ) : QString::null ; +TQString Kleo::DN::dn() const { + return d ? serialise( d->attributes ) : TQString::null ; } // static -QString Kleo::DN::escape( const QString & value ) { +TQString Kleo::DN::escape( const TQString & value ) { return dn_escape( value ); } @@ -411,18 +411,18 @@ void Kleo::DN::append( const Attribute & attr ) { d->reorderedAttributes.clear(); } -QString Kleo::DN::operator[]( const QString & attr ) const { +TQString Kleo::DN::operator[]( const TQString & attr ) const { if ( !d ) - return QString::null; - const QString attrUpper = attr.upper(); - for ( QValueVector<Attribute>::const_iterator it = d->attributes.begin() ; + return TQString::null; + const TQString attrUpper = attr.upper(); + for ( TQValueVector<Attribute>::const_iterator it = d->attributes.begin() ; it != d->attributes.end() ; ++it ) if ( (*it).name() == attrUpper ) return (*it).value(); - return QString::null; + return TQString::null; } -static QValueVector<Kleo::DN::Attribute> empty; +static TQValueVector<Kleo::DN::Attribute> empty; Kleo::DN::const_iterator Kleo::DN::begin() const { return d ? d->attributes.begin() : empty.begin() ; @@ -476,7 +476,7 @@ class Kleo::DNAttributeMapper::Private { public: Private(); std::map<const char*,const char*,ltstr> map; - QStringList attributeOrder; + TQStringList attributeOrder; }; Kleo::DNAttributeMapper::Private::Private() @@ -505,26 +505,26 @@ const Kleo::DNAttributeMapper * Kleo::DNAttributeMapper::instance() { return mSelf; } -QString Kleo::DNAttributeMapper::name2label( const QString & s ) const { +TQString Kleo::DNAttributeMapper::name2label( const TQString & s ) const { const std::map<const char*,const char*,ltstr>::const_iterator it = d->map.find( s.stripWhiteSpace().upper().latin1() ); if ( it == d->map.end() ) - return QString::null; + return TQString::null; return i18n( it->second ); } -QStringList Kleo::DNAttributeMapper::names() const { - QStringList result; +TQStringList Kleo::DNAttributeMapper::names() const { + TQStringList result; for ( std::map<const char*,const char*,ltstr>::const_iterator it = d->map.begin() ; it != d->map.end() ; ++it ) result.push_back( it->first ); return result; } -const QStringList & Kleo::DNAttributeMapper::attributeOrder() const { +const TQStringList & Kleo::DNAttributeMapper::attributeOrder() const { return d->attributeOrder; } -void Kleo::DNAttributeMapper::setAttributeOrder( const QStringList & order ) { +void Kleo::DNAttributeMapper::setAttributeOrder( const TQStringList & order ) { d->attributeOrder = order; if ( order.empty() ) std::copy( defaultOrder, defaultOrder + sizeof defaultOrder / sizeof *defaultOrder, @@ -533,6 +533,6 @@ void Kleo::DNAttributeMapper::setAttributeOrder( const QStringList & order ) { config.writeEntry( "AttributeOrder", order ); } -Kleo::DNAttributeOrderConfigWidget * Kleo::DNAttributeMapper::configWidget( QWidget * parent, const char * name ) const { +Kleo::DNAttributeOrderConfigWidget * Kleo::DNAttributeMapper::configWidget( TQWidget * parent, const char * name ) const { return new DNAttributeOrderConfigWidget( mSelf, parent, name ); } diff --git a/certmanager/lib/kleo/dn.h b/certmanager/lib/kleo/dn.h index 12bf9dc03..440bb4b0b 100644 --- a/certmanager/lib/kleo/dn.h +++ b/certmanager/lib/kleo/dn.h @@ -33,8 +33,8 @@ #ifndef __KLEO_DN_H__ #define __KLEO_DN_H__ -#include <qstring.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include <kdepimmacros.h> class QStringList; @@ -55,14 +55,14 @@ namespace Kleo { public: static const DNAttributeMapper * instance(); - QString name2label( const QString & s ) const; - QStringList names() const; + TQString name2label( const TQString & s ) const; + TQStringList names() const; - const QStringList & attributeOrder() const; + const TQStringList & attributeOrder() const; - void setAttributeOrder( const QStringList & order ); + void setAttributeOrder( const TQStringList & order ); - DNAttributeOrderConfigWidget * configWidget( QWidget * parent=0, const char * name=0 ) const; + DNAttributeOrderConfigWidget * configWidget( TQWidget * parent=0, const char * name=0 ) const; private: class Private; @@ -76,11 +76,11 @@ namespace Kleo { class KDE_EXPORT DN { public: class Attribute; - typedef QValueVector<Attribute> AttributeList; + typedef TQValueVector<Attribute> AttributeList; typedef AttributeList::const_iterator const_iterator; DN(); - DN( const QString & dn ); + DN( const TQString & dn ); DN( const char * utf8DN ); DN( const DN & other ); ~DN(); @@ -88,15 +88,15 @@ namespace Kleo { const DN & operator=( const DN & other ); /** @return the value in rfc-2253-escaped form */ - static QString escape( const QString & value ); + static TQString escape( const TQString & value ); /** @return the DN in a reordered form, according to the settings in the [DN] group of the application's config file */ - QString prettyDN() const; + TQString prettyDN() const; /** @return the DN in the original form */ - QString dn() const; + TQString dn() const; - QString operator[]( const QString & attr ) const; + TQString operator[]( const TQString & attr ) const; void append( const Attribute & attr ); @@ -114,7 +114,7 @@ namespace Kleo { public: typedef DN::AttributeList List; - Attribute( const QString & name=QString::null, const QString & value=QString::null ) + Attribute( const TQString & name=TQString::null, const TQString & value=TQString::null ) : mName( name.upper() ), mValue( value ) {} Attribute( const Attribute & other ) : mName( other.name() ), mValue( other.value() ) {} @@ -127,14 +127,14 @@ namespace Kleo { return *this; } - const QString & name() const { return mName; } - const QString & value() const { return mValue; } + const TQString & name() const { return mName; } + const TQString & value() const { return mValue; } - void setValue( const QString & value ) { mValue = value; } + void setValue( const TQString & value ) { mValue = value; } private: - QString mName; - QString mValue; + TQString mName; + TQString mValue; }; } diff --git a/certmanager/lib/kleo/downloadjob.h b/certmanager/lib/kleo/downloadjob.h index 006ab8ebd..6fa5a3e4b 100644 --- a/certmanager/lib/kleo/downloadjob.h +++ b/certmanager/lib/kleo/downloadjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,15 +53,15 @@ namespace Kleo { signals to suitable slots and then start the download with a call to start(). This call might fail, in which case the DownloadJob instance will have scheduled it's own destruction with a call to - QObject::deleteLater(). + TQObject::deleteLater(). After result() is emitted, the DownloadJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class DownloadJob : public Job { Q_OBJECT protected: - DownloadJob( QObject * parent, const char * name ); + DownloadJob( TQObject * parent, const char * name ); public: ~DownloadJob(); @@ -72,10 +72,10 @@ namespace Kleo { only empty strings or anything other than fingerprints, the result is undefined. */ - virtual GpgME::Error start( const QStringList & fingerprints ) = 0; + virtual GpgME::Error start( const TQStringList & fingerprints ) = 0; signals: - void result( const GpgME::Error & result, const QByteArray & keyData ); + void result( const GpgME::Error & result, const TQByteArray & keyData ); }; } diff --git a/certmanager/lib/kleo/encryptjob.h b/certmanager/lib/kleo/encryptjob.h index 02144656f..9c3b77df2 100644 --- a/certmanager/lib/kleo/encryptjob.h +++ b/certmanager/lib/kleo/encryptjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> #include <vector> @@ -56,15 +56,15 @@ namespace Kleo { signals to suitable slots and then start the encryption with a call to start(). This call might fail, in which case the EncryptJob instance will have scheduled it's own destruction with - a call to QObject::deleteLater(). + a call to TQObject::deleteLater(). After result() is emitted, the EncryptJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class EncryptJob : public Job { Q_OBJECT protected: - EncryptJob( QObject * parent, const char * name ); + EncryptJob( TQObject * parent, const char * name ); public: ~EncryptJob(); @@ -77,14 +77,14 @@ namespace Kleo { without further checks. */ virtual GpgME::Error start( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust=false ) = 0; + const TQByteArray & plainText, bool alwaysTrust=false ) = 0; virtual GpgME::EncryptionResult exec( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, - bool alwaysTrust, QByteArray & cipherText ) = 0; + const TQByteArray & plainText, + bool alwaysTrust, TQByteArray & cipherText ) = 0; signals: - void result( const GpgME::EncryptionResult & result, const QByteArray & cipherText ); + void result( const GpgME::EncryptionResult & result, const TQByteArray & cipherText ); }; } diff --git a/certmanager/lib/kleo/enum.cpp b/certmanager/lib/kleo/enum.cpp index efa4cfaa3..ca842807f 100644 --- a/certmanager/lib/kleo/enum.cpp +++ b/certmanager/lib/kleo/enum.cpp @@ -34,8 +34,8 @@ #include <klocale.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> static const struct { Kleo::CryptoMessageFormat format; @@ -67,34 +67,34 @@ const char * Kleo::cryptoMessageFormatToString( Kleo::CryptoMessageFormat f ) { return 0; } -QStringList Kleo::cryptoMessageFormatsToStringList( unsigned int f ) { - QStringList result; +TQStringList Kleo::cryptoMessageFormatsToStringList( unsigned int f ) { + TQStringList result; for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i ) if ( f & cryptoMessageFormats[i].format ) result.push_back( cryptoMessageFormats[i].configName ); return result; } -QString Kleo::cryptoMessageFormatToLabel( Kleo::CryptoMessageFormat f ) { +TQString Kleo::cryptoMessageFormatToLabel( Kleo::CryptoMessageFormat f ) { if ( f == AutoFormat ) return i18n("Any"); for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i ) if ( f == cryptoMessageFormats[i].format ) return i18n( cryptoMessageFormats[i].displayName ); - return QString::null; + return TQString::null; } -Kleo::CryptoMessageFormat Kleo::stringToCryptoMessageFormat( const QString & s ) { - const QString t = s.lower(); +Kleo::CryptoMessageFormat Kleo::stringToCryptoMessageFormat( const TQString & s ) { + const TQString t = s.lower(); for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i ) if ( t == cryptoMessageFormats[i].configName ) return cryptoMessageFormats[i].format; return AutoFormat; } -unsigned int Kleo::stringListToCryptoMessageFormats( const QStringList & sl ) { +unsigned int Kleo::stringListToCryptoMessageFormats( const TQStringList & sl ) { unsigned int result = 0; - for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) + for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) result |= stringToCryptoMessageFormat( *it ); return result; } @@ -120,7 +120,7 @@ const char* Kleo::encryptionPreferenceToString( EncryptionPreference pref ) return 0; // keep the compiler happy } -Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const QString& str ) +Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const TQString& str ) { if ( str == "never" ) return NeverEncrypt; @@ -135,7 +135,7 @@ Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const QString& st return UnknownPreference; } -QString Kleo::encryptionPreferenceToLabel( EncryptionPreference pref ) +TQString Kleo::encryptionPreferenceToLabel( EncryptionPreference pref ) { switch( pref ) { case NeverEncrypt: @@ -172,7 +172,7 @@ const char* Kleo::signingPreferenceToString( SigningPreference pref ) return 0; // keep the compiler happy } -Kleo::SigningPreference Kleo::stringToSigningPreference( const QString& str ) +Kleo::SigningPreference Kleo::stringToSigningPreference( const TQString& str ) { if ( str == "never" ) return NeverSign; @@ -187,7 +187,7 @@ Kleo::SigningPreference Kleo::stringToSigningPreference( const QString& str ) return UnknownSigningPreference; } -QString Kleo::signingPreferenceToLabel( SigningPreference pref ) +TQString Kleo::signingPreferenceToLabel( SigningPreference pref ) { switch( pref ) { case NeverSign: diff --git a/certmanager/lib/kleo/enum.h b/certmanager/lib/kleo/enum.h index 29f8e2a66..bf4a44a60 100644 --- a/certmanager/lib/kleo/enum.h +++ b/certmanager/lib/kleo/enum.h @@ -50,12 +50,12 @@ namespace Kleo { AutoFormat = AnyOpenPGP|AnySMIME }; - KDE_EXPORT QString cryptoMessageFormatToLabel( CryptoMessageFormat f ); + KDE_EXPORT TQString cryptoMessageFormatToLabel( CryptoMessageFormat f ); KDE_EXPORT const char * cryptoMessageFormatToString( CryptoMessageFormat f ); - KDE_EXPORT QStringList cryptoMessageFormatsToStringList( unsigned int f ); - KDE_EXPORT CryptoMessageFormat stringToCryptoMessageFormat( const QString & s ); - KDE_EXPORT unsigned int stringListToCryptoMessageFormats( const QStringList & sl ); + KDE_EXPORT TQStringList cryptoMessageFormatsToStringList( unsigned int f ); + KDE_EXPORT CryptoMessageFormat stringToCryptoMessageFormat( const TQString & s ); + KDE_EXPORT unsigned int stringListToCryptoMessageFormats( const TQStringList & sl ); enum Action { Conflict, DoIt, DontDoIt, Ask, AskOpportunistic, Impossible @@ -71,9 +71,9 @@ namespace Kleo { MaxEncryptionPreference = AskWheneverPossible }; - KDE_EXPORT QString encryptionPreferenceToLabel( EncryptionPreference pref ); + KDE_EXPORT TQString encryptionPreferenceToLabel( EncryptionPreference pref ); KDE_EXPORT const char* encryptionPreferenceToString( EncryptionPreference pref ); - KDE_EXPORT EncryptionPreference stringToEncryptionPreference( const QString& str ); + KDE_EXPORT EncryptionPreference stringToEncryptionPreference( const TQString& str ); enum SigningPreference { UnknownSigningPreference = 0, @@ -85,9 +85,9 @@ namespace Kleo { MaxSigningPreference = AskSigningWheneverPossible }; - KDE_EXPORT QString signingPreferenceToLabel( SigningPreference pref ) KDE_EXPORT; + KDE_EXPORT TQString signingPreferenceToLabel( SigningPreference pref ) KDE_EXPORT; KDE_EXPORT const char* signingPreferenceToString( SigningPreference pref ) KDE_EXPORT; - KDE_EXPORT SigningPreference stringToSigningPreference( const QString& str ); + KDE_EXPORT SigningPreference stringToSigningPreference( const TQString& str ); } #endif // __KLEO_CRYPTOBACKEND_H__ diff --git a/certmanager/lib/kleo/exportjob.h b/certmanager/lib/kleo/exportjob.h index d6a0db185..9e84c1351 100644 --- a/certmanager/lib/kleo/exportjob.h +++ b/certmanager/lib/kleo/exportjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,15 +53,15 @@ namespace Kleo { signals to suitable slots and then start the export with a call to start(). This call might fail, in which case the ExportJob instance will have scheduled it's own destruction with a call to - QObject::deleteLater(). + TQObject::deleteLater(). After result() is emitted, the ExportJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class ExportJob : public Job { Q_OBJECT protected: - ExportJob( QObject * parent, const char * name ); + ExportJob( TQObject * parent, const char * name ); public: ~ExportJob(); @@ -71,10 +71,10 @@ namespace Kleo { ignored. If \a patterns is empty or contains only empty strings, all available keys are exported. */ - virtual GpgME::Error start( const QStringList & patterns ) = 0; + virtual GpgME::Error start( const TQStringList & patterns ) = 0; signals: - void result( const GpgME::Error & result, const QByteArray & keyData ); + void result( const GpgME::Error & result, const TQByteArray & keyData ); }; } diff --git a/certmanager/lib/kleo/hierarchicalkeylistjob.cpp b/certmanager/lib/kleo/hierarchicalkeylistjob.cpp index a7a66b2fe..c9a9ffcec 100644 --- a/certmanager/lib/kleo/hierarchicalkeylistjob.cpp +++ b/certmanager/lib/kleo/hierarchicalkeylistjob.cpp @@ -40,8 +40,8 @@ #include <klocale.h> -#include <qstringlist.h> -#include <qtl.h> +#include <tqstringlist.h> +#include <tqtl.h> #include <gpgmepp/key.h> #include <gpgmepp/context.h> @@ -72,7 +72,7 @@ Kleo::HierarchicalKeyListJob::~HierarchicalKeyListJob() { } -GpgME::Error Kleo::HierarchicalKeyListJob::start( const QStringList & patterns, bool secretOnly ) { +GpgME::Error Kleo::HierarchicalKeyListJob::start( const TQStringList & patterns, bool secretOnly ) { if ( secretOnly || patterns.empty() ) return gpg_err_make( GPG_ERR_SOURCE_GPGME, GPG_ERR_UNSUPPORTED_OPERATION ); qCopy( patterns.begin(), patterns.end(), @@ -83,7 +83,7 @@ GpgME::Error Kleo::HierarchicalKeyListJob::start( const QStringList & patterns, return err; } -GpgME::KeyListResult Kleo::HierarchicalKeyListJob::exec( const QStringList &, bool, +GpgME::KeyListResult Kleo::HierarchicalKeyListJob::exec( const TQStringList &, bool, std::vector<GpgME::Key> & keys ) { keys.clear(); return GpgME::KeyListResult( gpg_err_make( GPG_ERR_SOURCE_GPGME, GPG_ERR_UNSUPPORTED_OPERATION ) ); @@ -107,7 +107,7 @@ void Kleo::HierarchicalKeyListJob::slotCancel() { void Kleo::HierarchicalKeyListJob::slotResult( const GpgME::KeyListResult & res ) { mJob = 0; mIntermediateResult.mergeWith( res ); - std::set<QString> tmp; + std::set<TQString> tmp; std::set_difference( mNextSet.begin(), mNextSet.end(), mScheduledSet.begin(), mScheduledSet.end(), std::inserter( tmp, tmp.begin() ) ); @@ -142,11 +142,11 @@ GpgME::Error Kleo::HierarchicalKeyListJob::startAJob() { assert( mJob ); // FIXME: we need a way to generate errors ourselves, // but I don't like the dependency on gpg-error :/ - connect( mJob, SIGNAL(nextKey(const GpgME::Key&)), SLOT(slotNextKey(const GpgME::Key&)) ); - connect( mJob, SIGNAL(result(const GpgME::KeyListResult&)), SLOT(slotResult(const GpgME::KeyListResult&)) ); + connect( mJob, TQT_SIGNAL(nextKey(const GpgME::Key&)), TQT_SLOT(slotNextKey(const GpgME::Key&)) ); + connect( mJob, TQT_SIGNAL(result(const GpgME::KeyListResult&)), TQT_SLOT(slotResult(const GpgME::KeyListResult&)) ); - QStringList patterns; - for ( std::set<QString>::const_iterator it = mNextSet.begin() ; it != mNextSet.end() ; ++it ) + TQStringList patterns; + for ( std::set<TQString>::const_iterator it = mNextSet.begin() ; it != mNextSet.end() ; ++it ) patterns.push_back( *it ); mScheduledSet.insert( mNextSet.begin(), mNextSet.end() ); diff --git a/certmanager/lib/kleo/hierarchicalkeylistjob.h b/certmanager/lib/kleo/hierarchicalkeylistjob.h index a91ff6dc0..c4f7fe047 100644 --- a/certmanager/lib/kleo/hierarchicalkeylistjob.h +++ b/certmanager/lib/kleo/hierarchicalkeylistjob.h @@ -39,8 +39,8 @@ #include <gpgmepp/keylistresult.h> -#include <qcstring.h> -#include <qguardedptr.h> +#include <tqcstring.h> +#include <tqguardedptr.h> #include <set> @@ -63,10 +63,10 @@ namespace Kleo { suitable slots and then start the keylisting with a call to start(). This call might fail, in which case the HierarchicalKeyListJob instance will have scheduled it's own - destruction with a call to QObject::deleteLater(). + destruction with a call to TQObject::deleteLater(). After result() is emitted, the HierarchicalKeyListJob will - schedule its own destruction by calling QObject::deleteLater(). + schedule its own destruction by calling TQObject::deleteLater(). */ class KDE_EXPORT HierarchicalKeyListJob : public KeyListJob { Q_OBJECT @@ -84,9 +84,9 @@ namespace Kleo { The \a secretOnly parameter is ignored by HierarchicalKeyListJob and must be set to false. */ - GpgME::Error start( const QStringList & patterns, bool secretOnly=false ); + GpgME::Error start( const TQStringList & patterns, bool secretOnly=false ); - GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, + GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); private slots: @@ -104,11 +104,11 @@ namespace Kleo { const bool mIncludeSigs; const bool mValidating; bool mTruncated; - std::set<QString> mSentSet; // keys already sent (prevent duplicates even if the backend should return them) - std::set<QString> mScheduledSet; // keys already scheduled (by starting a job for them) - std::set<QString> mNextSet; // keys to schedule for the next iteraton + std::set<TQString> mSentSet; // keys already sent (prevent duplicates even if the backend should return them) + std::set<TQString> mScheduledSet; // keys already scheduled (by starting a job for them) + std::set<TQString> mNextSet; // keys to schedule for the next iteraton GpgME::KeyListResult mIntermediateResult; - QGuardedPtr<KeyListJob> mJob; + TQGuardedPtr<KeyListJob> mJob; }; } diff --git a/certmanager/lib/kleo/importjob.h b/certmanager/lib/kleo/importjob.h index 10aa90383..9c446457f 100644 --- a/certmanager/lib/kleo/importjob.h +++ b/certmanager/lib/kleo/importjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -54,15 +54,15 @@ namespace Kleo { signals to suitable slots and then start the import with a call to start(). This call might fail, in which case the ImportJob instance will have scheduled it's own destruction with a call to - QObject::deleteLater(). + TQObject::deleteLater(). After result() is emitted, the ImportJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class ImportJob : public Job { Q_OBJECT protected: - ImportJob( QObject * parent, const char * name ); + ImportJob( TQObject * parent, const char * name ); public: ~ImportJob(); @@ -70,9 +70,9 @@ namespace Kleo { Starts the importing operation. \a keyData contains the data to import from. */ - virtual GpgME::Error start( const QByteArray & keyData ) = 0; + virtual GpgME::Error start( const TQByteArray & keyData ) = 0; - virtual GpgME::ImportResult exec( const QByteArray & keyData ) = 0; + virtual GpgME::ImportResult exec( const TQByteArray & keyData ) = 0; signals: void result( const GpgME::ImportResult & result ); diff --git a/certmanager/lib/kleo/job.cpp b/certmanager/lib/kleo/job.cpp index 77881d737..c5371b646 100644 --- a/certmanager/lib/kleo/job.cpp +++ b/certmanager/lib/kleo/job.cpp @@ -52,31 +52,31 @@ #include "refreshkeysjob.h" #include "specialjob.h" -#include <qapplication.h> +#include <tqapplication.h> #include <kdebug.h> -Kleo::Job::Job( QObject * parent, const char * name ) - : QObject( parent, name ) +Kleo::Job::Job( TQObject * parent, const char * name ) + : TQObject( parent, name ) { if ( qApp ) - connect( qApp, SIGNAL(aboutToQuit()), SLOT(slotCancel()) ); + connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(slotCancel()) ); } Kleo::Job::~Job() { } -void Kleo::Job::showErrorDialog( QWidget *, const QString & ) const { +void Kleo::Job::showErrorDialog( TQWidget *, const TQString & ) const { kdDebug() << "Kleo::Job::showErrorDialog() should be reimplemented in Kleo::Job subclasses!" << endl; } -QString Kleo::Job::auditLogAsHtml() const { +TQString Kleo::Job::auditLogAsHtml() const { kdDebug() << "Kleo::Job::auditLogAsHtml() should be reimplemented in Kleo::Job subclasses!" << endl; - return QString(); + return TQString(); } #define make_job_subclass(x) \ - Kleo::x::x( QObject * parent, const char * name ) : Job( parent, name ) {} \ + Kleo::x::x( TQObject * parent, const char * name ) : Job( parent, name ) {} \ Kleo::x::~x() {} make_job_subclass(KeyListJob) diff --git a/certmanager/lib/kleo/job.h b/certmanager/lib/kleo/job.h index ae65008b0..57d0592d6 100644 --- a/certmanager/lib/kleo/job.h +++ b/certmanager/lib/kleo/job.h @@ -33,8 +33,8 @@ #ifndef __KLEO_JOB_H__ #define __KLEO_JOB_H__ -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class QWidget; @@ -57,22 +57,22 @@ namespace Kleo { signal of subclasses will still be emitted, though, and will carry the information that the operation was canceled. */ - class Job : public QObject { + class Job : public TQObject { Q_OBJECT protected: - Job( QObject * parent, const char * name ); + Job( TQObject * parent, const char * name ); public: ~Job(); - virtual void showErrorDialog( QWidget * parent=0, const QString & caption=QString::null ) const; + virtual void showErrorDialog( TQWidget * parent=0, const TQString & caption=TQString::null ) const; - virtual QString auditLogAsHtml() const; + virtual TQString auditLogAsHtml() const; public slots: virtual void slotCancel() = 0; signals: - void progress( const QString & what, int current, int total ); + void progress( const TQString & what, int current, int total ); void done(); }; diff --git a/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp b/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp index 89d18e799..7cf0bd551 100644 --- a/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp +++ b/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp @@ -52,14 +52,14 @@ static const struct { { "ultimate", GpgME::Key::Ultimate, GpgME::UserID::Ultimate }, }; -static GpgME::Key::OwnerTrust map2OwnerTrust( const QString & s ) { +static GpgME::Key::OwnerTrust map2OwnerTrust( const TQString & s ) { for ( unsigned int i = 0 ; i < sizeof ownerTrustAndValidityMap / sizeof *ownerTrustAndValidityMap ; ++i ) if ( s.lower() == ownerTrustAndValidityMap[i].name ) return ownerTrustAndValidityMap[i].trust; return ownerTrustAndValidityMap[0].trust; } -static GpgME::UserID::Validity map2Validity( const QString & s ) { +static GpgME::UserID::Validity map2Validity( const TQString & s ) { for ( unsigned int i = 0 ; i < sizeof ownerTrustAndValidityMap / sizeof *ownerTrustAndValidityMap ; ++i ) if ( s.lower() == ownerTrustAndValidityMap[i].name ) return ownerTrustAndValidityMap[i].validity; @@ -132,7 +132,7 @@ Kleo::KConfigBasedKeyFilter::KConfigBasedKeyFilter( const KConfigBase & config ) { "is-at-most-", IsAtMost }, }; for ( unsigned int i = 0 ; i < sizeof prefixMap / sizeof *prefixMap ; ++i ) { - const QString key = QString( prefixMap[i].prefix ) + "ownertrust"; + const TQString key = TQString( prefixMap[i].prefix ) + "ownertrust"; if ( config.hasKey( key ) ) { mOwnerTrust = prefixMap[i].state; mOwnerTrustReferenceLevel = map2OwnerTrust( config.readEntry( key ) ); @@ -141,7 +141,7 @@ Kleo::KConfigBasedKeyFilter::KConfigBasedKeyFilter( const KConfigBase & config ) } } for ( unsigned int i = 0 ; i < sizeof prefixMap / sizeof *prefixMap ; ++i ) { - const QString key = QString( prefixMap[i].prefix ) + "validity"; + const TQString key = TQString( prefixMap[i].prefix ) + "validity"; if ( config.hasKey( key ) ) { mValidity = prefixMap[i].state; mValidityReferenceLevel = map2Validity( config.readEntry( key ) ); @@ -226,14 +226,14 @@ bool Kleo::KConfigBasedKeyFilter::matches( const GpgME::Key & key ) const { return true; } -static inline QFont resizedFont( QFont font, int pointSize, bool strike ) { +static inline TQFont resizedFont( TQFont font, int pointSize, bool strike ) { font.setPointSize( pointSize ); if ( strike ) font.setStrikeOut( true ); return font; } -static inline QFont adapt( QFont font, bool it, bool b, bool strike ) { +static inline TQFont adapt( TQFont font, bool it, bool b, bool strike ) { if ( it ) font.setItalic( true ); if ( b ) @@ -243,7 +243,7 @@ static inline QFont adapt( QFont font, bool it, bool b, bool strike ) { return font; } -QFont Kleo::KConfigBasedKeyFilter::font( const QFont & f ) const { +TQFont Kleo::KConfigBasedKeyFilter::font( const TQFont & f ) const { if ( mUseFullFont ) return resizedFont( mFont, f.pointSize(), mStrikeOut ); else diff --git a/certmanager/lib/kleo/kconfigbasedkeyfilter.h b/certmanager/lib/kleo/kconfigbasedkeyfilter.h index 42c083080..8d77b3913 100644 --- a/certmanager/lib/kleo/kconfigbasedkeyfilter.h +++ b/certmanager/lib/kleo/kconfigbasedkeyfilter.h @@ -35,9 +35,9 @@ #include "keyfilter.h" -#include <qfont.h> -#include <qstring.h> -#include <qcolor.h> +#include <tqfont.h> +#include <tqstring.h> +#include <tqcolor.h> #include <gpgmepp/key.h> @@ -53,22 +53,22 @@ namespace Kleo { unsigned int specificity() const { return mSpecificity; } - QColor fgColor() const { return mFgColor; } - QColor bgColor() const { return mBgColor; } - QFont font( const QFont & ) const; - QString name() const { return mName; } - QString icon() const { return mIcon; } + TQColor fgColor() const { return mFgColor; } + TQColor bgColor() const { return mBgColor; } + TQFont font( const TQFont & ) const; + TQString name() const { return mName; } + TQString icon() const { return mIcon; } private: - QColor mFgColor, mBgColor; - QString mName; - QString mIcon; + TQColor mFgColor, mBgColor; + TQString mName; + TQString mIcon; unsigned int mSpecificity; bool mItalic; bool mBold; bool mStrikeOut; bool mUseFullFont; - QFont mFont; + TQFont mFont; enum TriState { DoesNotMatter = 0, diff --git a/certmanager/lib/kleo/keyfilter.h b/certmanager/lib/kleo/keyfilter.h index f10fba9bf..e8d8eb1f1 100644 --- a/certmanager/lib/kleo/keyfilter.h +++ b/certmanager/lib/kleo/keyfilter.h @@ -56,11 +56,11 @@ namespace Kleo { // not sure if we want these here, but for the time being, it's // the easiest way: - virtual QColor fgColor() const = 0; - virtual QColor bgColor() const = 0; - virtual QFont font( const QFont & ) const = 0; - virtual QString name() const = 0; - virtual QString icon() const = 0; + virtual TQColor fgColor() const = 0; + virtual TQColor bgColor() const = 0; + virtual TQFont font( const TQFont & ) const = 0; + virtual TQString name() const = 0; + virtual TQString icon() const = 0; }; } diff --git a/certmanager/lib/kleo/keyfiltermanager.cpp b/certmanager/lib/kleo/keyfiltermanager.cpp index 14932801c..53493ab80 100644 --- a/certmanager/lib/kleo/keyfiltermanager.cpp +++ b/certmanager/lib/kleo/keyfiltermanager.cpp @@ -41,10 +41,10 @@ #include <kconfig.h> -#include <qapplication.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qvaluevector.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqvaluevector.h> #include <algorithm> @@ -61,19 +61,19 @@ struct Kleo::KeyFilterManager::Private { filters.clear(); } - QValueVector<KeyFilter*> filters; + TQValueVector<KeyFilter*> filters; }; Kleo::KeyFilterManager * Kleo::KeyFilterManager::mSelf = 0; -Kleo::KeyFilterManager::KeyFilterManager( QObject * parent, const char * name ) - : QObject( parent, name ), d( 0 ) +Kleo::KeyFilterManager::KeyFilterManager( TQObject * parent, const char * name ) + : TQObject( parent, name ), d( 0 ) { mSelf = this; d = new Private(); // ### DF: doesn't a KStaticDeleter work more reliably? if ( qApp ) - connect( qApp, SIGNAL(aboutToQuit()), SLOT(deleteLater()) ); + connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(deleteLater()) ); reload(); } @@ -91,7 +91,7 @@ Kleo::KeyFilterManager * Kleo::KeyFilterManager::instance() { } const Kleo::KeyFilter * Kleo::KeyFilterManager::filterMatching( const GpgME::Key & key ) const { - for ( QValueVector<KeyFilter*>::const_iterator it = d->filters.begin() ; it != d->filters.end() ; ++it ) + for ( TQValueVector<KeyFilter*>::const_iterator it = d->filters.begin() ; it != d->filters.end() ; ++it ) if ( (*it)->matches( key ) ) return *it; return 0; @@ -107,8 +107,8 @@ void Kleo::KeyFilterManager::reload() { KConfig * config = Kleo::CryptoBackendFactory::instance()->configObject(); if ( !config ) return; - const QStringList groups = config->groupList().grep( QRegExp( "^Key Filter #\\d+$" ) ); - for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) { + const TQStringList groups = config->groupList().grep( TQRegExp( "^Key Filter #\\d+$" ) ); + for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) { const KConfigGroup cfg( config, *it ); d->filters.push_back( new KConfigBasedKeyFilter( cfg ) ); } diff --git a/certmanager/lib/kleo/keyfiltermanager.h b/certmanager/lib/kleo/keyfiltermanager.h index 25353d71a..662dfdb82 100644 --- a/certmanager/lib/kleo/keyfiltermanager.h +++ b/certmanager/lib/kleo/keyfiltermanager.h @@ -33,7 +33,7 @@ #ifndef __KLEO_KEYFILTERMANAGER_H__ #define __KLEO_KEYFILTERMANAGER_H__ -#include <qobject.h> +#include <tqobject.h> #include <kdepimmacros.h> namespace GpgME { class Key; @@ -45,10 +45,10 @@ namespace Kleo { namespace Kleo { - class KDE_EXPORT KeyFilterManager : public QObject { + class KDE_EXPORT KeyFilterManager : public TQObject { Q_OBJECT protected: - KeyFilterManager( QObject * parent=0, const char * name=0 ); + KeyFilterManager( TQObject * parent=0, const char * name=0 ); ~KeyFilterManager(); public: diff --git a/certmanager/lib/kleo/keygenerationjob.h b/certmanager/lib/kleo/keygenerationjob.h index f78152c5c..384d43065 100644 --- a/certmanager/lib/kleo/keygenerationjob.h +++ b/certmanager/lib/kleo/keygenerationjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,15 +53,15 @@ namespace Kleo { signals to suitable slots and then start the key generation with a call to start(). This call might fail, in which case the KeyGenerationJob instance will have scheduled it's own - destruction with a call to QObject::deleteLater(). + destruction with a call to TQObject::deleteLater(). After result() is emitted, the KeyGenerationJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class KeyGenerationJob : public Job { Q_OBJECT protected: - KeyGenerationJob( QObject * parent, const char * name ); + KeyGenerationJob( TQObject * parent, const char * name ); public: ~KeyGenerationJob(); @@ -70,10 +70,10 @@ namespace Kleo { backend-specific string containing the paramaters of the key to create (length, capabilities, etc). */ - virtual GpgME::Error start( const QString & parameters ) = 0; + virtual GpgME::Error start( const TQString & parameters ) = 0; signals: - void result( const GpgME::KeyGenerationResult & result, const QByteArray & pubKeyData ); + void result( const GpgME::KeyGenerationResult & result, const TQByteArray & pubKeyData ); }; } diff --git a/certmanager/lib/kleo/keylistjob.h b/certmanager/lib/kleo/keylistjob.h index c419ad47d..9d566bcbc 100644 --- a/certmanager/lib/kleo/keylistjob.h +++ b/certmanager/lib/kleo/keylistjob.h @@ -55,17 +55,17 @@ namespace Kleo { and result() signals to suitable slots and then start the key listing with a call to start(). This call might fail, in which case the KeylistJob instance will have schedules it's own - destruction with a call to QObject::deleteLater(). + destruction with a call to TQObject::deleteLater(). During keylisting, you will receive new key objects through the nextKey() signal as they arrive. After result() is emitted, the KeyListJob will schedule it's own destruction by calling - QObject::deleteLater(). + TQObject::deleteLater(). */ class KeyListJob : public Job { Q_OBJECT protected: - KeyListJob( QObject * parent, const char * name ); + KeyListJob( TQObject * parent, const char * name ); public: ~KeyListJob(); @@ -82,9 +82,9 @@ namespace Kleo { also available are returned. Use this if you need to select a key for signing. */ - virtual GpgME::Error start( const QStringList & patterns, bool secretOnly=false ) = 0; + virtual GpgME::Error start( const TQStringList & patterns, bool secretOnly=false ) = 0; - virtual GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ) = 0; + virtual GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ) = 0; signals: void nextKey( const GpgME::Key & key ); diff --git a/certmanager/lib/kleo/multideletejob.cpp b/certmanager/lib/kleo/multideletejob.cpp index 32596e78f..bd4766475 100644 --- a/certmanager/lib/kleo/multideletejob.cpp +++ b/certmanager/lib/kleo/multideletejob.cpp @@ -102,7 +102,7 @@ GpgME::Error Kleo::MultiDeleteJob::startAJob() { assert( mJob ); // FIXME: we need a way to generate errors ourselves, // but I don't like the dependency on gpg-error :/ - connect( mJob, SIGNAL(result(const GpgME::Error&)), SLOT(slotResult(const GpgME::Error&)) ); + connect( mJob, TQT_SIGNAL(result(const GpgME::Error&)), TQT_SLOT(slotResult(const GpgME::Error&)) ); return mJob->start( *mIt, mAllowSecretKeyDeletion ); } diff --git a/certmanager/lib/kleo/multideletejob.h b/certmanager/lib/kleo/multideletejob.h index 5b995adaf..9bc5d05a6 100644 --- a/certmanager/lib/kleo/multideletejob.h +++ b/certmanager/lib/kleo/multideletejob.h @@ -37,7 +37,7 @@ #include <kleo/cryptobackend.h> #include <kdepimmacros.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> #include <vector> @@ -59,10 +59,10 @@ namespace Kleo { connect the progress() and result() signals to suitable slots and then start the delete with a call to start(). This call might fail, in which case the MultiDeleteJob instance will have scheduled - it's own destruction with a call to QObject::deleteLater(). + it's own destruction with a call to TQObject::deleteLater(). After result() is emitted, the MultiDeleteJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class KDE_EXPORT MultiDeleteJob : public Job { Q_OBJECT @@ -90,7 +90,7 @@ namespace Kleo { private: const CryptoBackend::Protocol * mProtocol; - QGuardedPtr<DeleteJob> mJob; + TQGuardedPtr<DeleteJob> mJob; std::vector<GpgME::Key> mKeys; std::vector<GpgME::Key>::const_iterator mIt; bool mAllowSecretKeyDeletion; diff --git a/certmanager/lib/kleo/refreshkeysjob.h b/certmanager/lib/kleo/refreshkeysjob.h index dcf9cd516..5ace60b6e 100644 --- a/certmanager/lib/kleo/refreshkeysjob.h +++ b/certmanager/lib/kleo/refreshkeysjob.h @@ -54,15 +54,15 @@ namespace Kleo { signals to suitable slots and then start the key refresh with a call to start(). This call might fail, in which case the RefreshKeysJob instance will have scheduled its own destruction - with a call to QObject::deleteLater(). + with a call to TQObject::deleteLater(). After result() is emitted, the KeyListJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class RefreshKeysJob : public Job { Q_OBJECT protected: - RefreshKeysJob( QObject * parent, const char * name ); + RefreshKeysJob( TQObject * parent, const char * name ); public: ~RefreshKeysJob(); @@ -79,7 +79,7 @@ namespace Kleo { also available are returned. Use this if you need to select a key for signing. */ - virtual GpgME::Error start( const QStringList & patterns ) = 0; + virtual GpgME::Error start( const TQStringList & patterns ) = 0; signals: void result( const GpgME::Error & error ); diff --git a/certmanager/lib/kleo/signencryptjob.h b/certmanager/lib/kleo/signencryptjob.h index 42d3a179f..5e12723ef 100644 --- a/certmanager/lib/kleo/signencryptjob.h +++ b/certmanager/lib/kleo/signencryptjob.h @@ -36,7 +36,7 @@ #include <gpgmepp/context.h> // for Context::SignatureMode (or should // we roll our own enum here?) #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> #include <vector> #include <utility> @@ -59,15 +59,15 @@ namespace Kleo { signals to suitable slots and then start the operation with a call to start(). This call might fail, in which case the SignEncryptJob instance will have scheduled it's own destruction - with a call to QObject::deleteLater(). + with a call to TQObject::deleteLater(). After result() is emitted, the SignEncryptJob will schedule it's - own destruction by calling QObject::deleteLater(). + own destruction by calling TQObject::deleteLater(). */ class SignEncryptJob : public Job { Q_OBJECT protected: - SignEncryptJob( QObject * parent, const char * name ); + SignEncryptJob( TQObject * parent, const char * name ); public: ~SignEncryptJob(); @@ -83,19 +83,19 @@ namespace Kleo { */ virtual GpgME::Error start( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, + const TQByteArray & plainText, bool alwaysTrust=false ) = 0; virtual std::pair<GpgME::SigningResult,GpgME::EncryptionResult> exec( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, - bool alwaysTrust, QByteArray & cipherText ) = 0; + const TQByteArray & plainText, + bool alwaysTrust, TQByteArray & cipherText ) = 0; signals: void result( const GpgME::SigningResult & signingresult, const GpgME::EncryptionResult & encryptionresult, - const QByteArray & cipherText ); + const TQByteArray & cipherText ); }; } diff --git a/certmanager/lib/kleo/signjob.h b/certmanager/lib/kleo/signjob.h index 17ea3d947..677aedcf0 100644 --- a/certmanager/lib/kleo/signjob.h +++ b/certmanager/lib/kleo/signjob.h @@ -36,7 +36,7 @@ #include <gpgmepp/context.h> // for Context::SignatureMode (or should // we roll our own enum here?) #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> #include <vector> @@ -57,15 +57,15 @@ namespace Kleo { suitable slots and then start the signing with a call to start(). This call might fail, in which case the SignJob instance will have scheduled it's own destruction with a call to - QObject::deleteLater(). + TQObject::deleteLater(). After result() is emitted, the SignJob will schedule it's own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). */ class SignJob : public Job { Q_OBJECT protected: - SignJob( QObject * parent, const char * name ); + SignJob( TQObject * parent, const char * name ); public: ~SignJob(); @@ -74,15 +74,15 @@ namespace Kleo { sign \a plainText with. Empty (null) keys are ignored. */ virtual GpgME::Error start( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode ) = 0; virtual GpgME::SigningResult exec( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode, - QByteArray & signature ) = 0; + TQByteArray & signature ) = 0; signals: - void result( const GpgME::SigningResult & result, const QByteArray & signature ); + void result( const GpgME::SigningResult & result, const TQByteArray & signature ); }; } diff --git a/certmanager/lib/kleo/specialjob.h b/certmanager/lib/kleo/specialjob.h index e7280b0a5..04867c32b 100644 --- a/certmanager/lib/kleo/specialjob.h +++ b/certmanager/lib/kleo/specialjob.h @@ -49,10 +49,10 @@ namespace Kleo { signals to suitable slots and then start the job with a call to start(). This call might fail, in which case the SpecialJob instance will have schedules its own destruction with a call to - QObject::deleteLater(). + TQObject::deleteLater(). After result() is emitted, the SpecialJob will schedule its own - destruction by calling QObject::deleteLater(). + destruction by calling TQObject::deleteLater(). Parameters are set using the Qt property system. More general, or constructor parameters are given in the call to @@ -65,7 +65,7 @@ namespace Kleo { class SpecialJob : public Job { Q_OBJECT protected: - SpecialJob( QObject * parent, const char * name ); + SpecialJob( TQObject * parent, const char * name ); public: ~SpecialJob(); @@ -78,7 +78,7 @@ namespace Kleo { virtual GpgME::Error exec() = 0; signals: - void result( const GpgME::Error & result, const QVariant & data ); + void result( const GpgME::Error & result, const TQVariant & data ); }; } diff --git a/certmanager/lib/kleo/verifydetachedjob.h b/certmanager/lib/kleo/verifydetachedjob.h index f50fda546..58ff64732 100644 --- a/certmanager/lib/kleo/verifydetachedjob.h +++ b/certmanager/lib/kleo/verifydetachedjob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -54,15 +54,15 @@ namespace Kleo { signals to suitable slots and then start the verification with a call to start(). This call might fail, in which case the VerifyDetachedJob instance will have scheduled it's own - destruction with a call to QObject::deleteLater(). + destruction with a call to TQObject::deleteLater(). After result() is emitted, the VerifyDetachedJob will schedule - it's own destruction by calling QObject::deleteLater(). + it's own destruction by calling TQObject::deleteLater(). */ class VerifyDetachedJob : public Job { Q_OBJECT protected: - VerifyDetachedJob( QObject * parent, const char * name ); + VerifyDetachedJob( TQObject * parent, const char * name ); public: ~VerifyDetachedJob(); @@ -71,11 +71,11 @@ namespace Kleo { signature data, while \a signedData contains the data over which the signature was made. */ - virtual GpgME::Error start( const QByteArray & signature, - const QByteArray & signedData ) = 0; + virtual GpgME::Error start( const TQByteArray & signature, + const TQByteArray & signedData ) = 0; - virtual GpgME::VerificationResult exec( const QByteArray & signature, - const QByteArray & signedData ) = 0; + virtual GpgME::VerificationResult exec( const TQByteArray & signature, + const TQByteArray & signedData ) = 0; signals: void result( const GpgME::VerificationResult & result ); diff --git a/certmanager/lib/kleo/verifyopaquejob.h b/certmanager/lib/kleo/verifyopaquejob.h index b38b18de1..58c452b7c 100644 --- a/certmanager/lib/kleo/verifyopaquejob.h +++ b/certmanager/lib/kleo/verifyopaquejob.h @@ -35,7 +35,7 @@ #include "job.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -54,15 +54,15 @@ namespace Kleo { signals to suitable slots and then start the verification with a call to start(). This call might fail, in which case the VerifyOpaqueJob instance will have scheduled it's own - destruction with a call to QObject::deleteLater(). + destruction with a call to TQObject::deleteLater(). After result() is emitted, the VerifyOpaqueJob will schedule - it's own destruction by calling QObject::deleteLater(). + it's own destruction by calling TQObject::deleteLater(). */ class VerifyOpaqueJob : public Job { Q_OBJECT protected: - VerifyOpaqueJob( QObject * parent, const char * name ); + VerifyOpaqueJob( TQObject * parent, const char * name ); public: ~VerifyOpaqueJob(); @@ -71,13 +71,13 @@ namespace Kleo { signature data, while \a signedData contains the data over which the signature was made. */ - virtual GpgME::Error start( const QByteArray & signedData ) = 0; + virtual GpgME::Error start( const TQByteArray & signedData ) = 0; /** Synchronous version of @ref start */ - virtual GpgME::VerificationResult exec( const QByteArray & signedData, QByteArray & plainText ) = 0; + virtual GpgME::VerificationResult exec( const TQByteArray & signedData, TQByteArray & plainText ) = 0; signals: - void result( const GpgME::VerificationResult & result, const QByteArray & plainText ); + void result( const GpgME::VerificationResult & result, const TQByteArray & plainText ); }; } 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( '&', "&" ).replace( '<', "<" ).replace( '>', ">" ); } 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 ); diff --git a/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp b/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp index 973266b16..7567be710 100644 --- a/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp +++ b/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp @@ -36,7 +36,7 @@ #include "adddirectoryservicedialogimpl.h" -#include <qvalidator.h> +#include <tqvalidator.h> #include <klineedit.h> /* @@ -46,10 +46,10 @@ * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -AddDirectoryServiceDialogImpl::AddDirectoryServiceDialogImpl( QWidget* parent, const char* name, bool modal, WFlags fl ) +AddDirectoryServiceDialogImpl::AddDirectoryServiceDialogImpl( TQWidget* parent, const char* name, bool modal, WFlags fl ) : AddDirectoryServiceDialog( parent, name, modal, fl ) { - portED->setValidator( new QIntValidator( 0, 65535, portED ) ); + portED->setValidator( new TQIntValidator( 0, 65535, portED ) ); } /* diff --git a/certmanager/lib/ui/adddirectoryservicedialogimpl.h b/certmanager/lib/ui/adddirectoryservicedialogimpl.h index deee06439..3fc0d6a55 100644 --- a/certmanager/lib/ui/adddirectoryservicedialogimpl.h +++ b/certmanager/lib/ui/adddirectoryservicedialogimpl.h @@ -39,7 +39,7 @@ class AddDirectoryServiceDialogImpl : public AddDirectoryServiceDialog Q_OBJECT public: - AddDirectoryServiceDialogImpl( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + AddDirectoryServiceDialogImpl( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~AddDirectoryServiceDialogImpl(); }; diff --git a/certmanager/lib/ui/backendconfigwidget.cpp b/certmanager/lib/ui/backendconfigwidget.cpp index c40890a43..2871b920f 100644 --- a/certmanager/lib/ui/backendconfigwidget.cpp +++ b/certmanager/lib/ui/backendconfigwidget.cpp @@ -49,10 +49,10 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqtimer.h> #include <assert.h> @@ -63,8 +63,8 @@ namespace Kleo { class Kleo::BackendConfigWidget::Private { public: Kleo::BackendListView * listView; - QPushButton * configureButton; - QPushButton * rescanButton; + TQPushButton * configureButton; + TQPushButton * rescanButton; Kleo::CryptoBackendFactory * backendFactory; }; @@ -86,7 +86,7 @@ public: const Kleo::CryptoBackend* chosenBackend( const char * protocol ); /// deselect all except one for a given protocol type (radiobutton-like exclusivity) - void deselectAll( const char * protocol, QCheckListItem* except ); + void deselectAll( const char * protocol, TQCheckListItem* except ); void emitChanged() { static_cast<BackendConfigWidget *>( parentWidget() )->emitChanged( true ); } }; @@ -95,8 +95,8 @@ public: class Kleo::BackendListViewItem : public QListViewItem { public: - BackendListViewItem( KListView* lv, QListViewItem *prev, const CryptoBackend *cryptoBackend ) - : QListViewItem( lv, prev, cryptoBackend->displayName() ), mCryptoBackend( cryptoBackend ) + BackendListViewItem( KListView* lv, TQListViewItem *prev, const CryptoBackend *cryptoBackend ) + : TQListViewItem( lv, prev, cryptoBackend->displayName() ), mCryptoBackend( cryptoBackend ) {} const CryptoBackend *cryptoBackend() const { return mCryptoBackend; } @@ -114,10 +114,10 @@ class Kleo::ProtocolCheckListItem : public QCheckListItem { public: ProtocolCheckListItem( BackendListViewItem* blvi, - QListViewItem* prev, const char * protocolName, + TQListViewItem* prev, const char * protocolName, const CryptoBackend::Protocol* protocol ) // can be 0 - : QCheckListItem( blvi, prev, itemText( protocolName, protocol ), - QCheckListItem::CheckBox ), + : TQCheckListItem( blvi, prev, itemText( protocolName, protocol ), + TQCheckListItem::CheckBox ), mProtocol( protocol ), mProtocolName( protocolName ) {} @@ -135,20 +135,20 @@ protected: if ( b ) lv->deselectAll( mProtocolName, this ); lv->emitChanged(); - QCheckListItem::stateChange( b ); + TQCheckListItem::stateChange( b ); } private: // Helper for the constructor. - static QString itemText( const char * protocolName, const CryptoBackend::Protocol* protocol ) { + static TQString itemText( const char * protocolName, const CryptoBackend::Protocol* protocol ) { // First one is the generic name (find a nice one for OpenPGP, SMIME) - const QString protoName = qstricmp( protocolName, "openpgp" ) != 0 + const TQString protoName = qstricmp( protocolName, "openpgp" ) != 0 ? qstricmp( protocolName, "smime" ) != 0 - ? QString::fromLatin1( protocolName ) + ? TQString::fromLatin1( protocolName ) : i18n( "S/MIME" ) : i18n( "OpenPGP" ); // second one is implementation name (gpg, gpgsm...) - const QString impName = protocol ? protocol->displayName() : i18n( "failed" ); + const TQString impName = protocol ? protocol->displayName() : i18n( "failed" ); return i18n( "Items in Kleo::BackendConfigWidget listview (1: protocol; 2: implementation name)", "%1 (%2)" ).arg( protoName, impName ); } @@ -158,7 +158,7 @@ private: }; const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const { - const QListViewItem* curItem = currentItem(); + const TQListViewItem* curItem = currentItem(); if ( !curItem ) // can't happen return 0; if ( lvi_cast<Kleo::ProtocolCheckListItem>( curItem ) ) @@ -168,10 +168,10 @@ const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const { return 0; } -// can't be const method due to QListViewItemIterator (why?) +// can't be const method due to TQListViewItemIterator (why?) const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * protocolName ) { - for ( QListViewItemIterator it( this /*, QListViewItemIterator::Checked doesn't work*/ ) ; + for ( TQListViewItemIterator it( this /*, TQListViewItemIterator::Checked doesn't work*/ ) ; it.current() ; ++it ) if ( ProtocolCheckListItem * p = lvi_cast<ProtocolCheckListItem>( it.current() ) ) if ( p->isOn() && qstricmp( p->protocolName(), protocolName ) == 0 ) { @@ -183,9 +183,9 @@ const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * pr return 0; } -void Kleo::BackendListView::deselectAll( const char * protocolName, QCheckListItem* except ) +void Kleo::BackendListView::deselectAll( const char * protocolName, TQCheckListItem* except ) { - for ( QListViewItemIterator it( this /*, QListViewItemIterator::Checked doesn't work*/ ) ; + for ( TQListViewItemIterator it( this /*, TQListViewItemIterator::Checked doesn't work*/ ) ; it.current() ; ++it ) { if ( it.current() == except ) continue; if ( ProtocolCheckListItem * p = lvi_cast<ProtocolCheckListItem>( it.current() ) ) @@ -196,15 +196,15 @@ void Kleo::BackendListView::deselectAll( const char * protocolName, QCheckListIt //// -Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, QWidget * parent, const char * name, WFlags f ) - : QWidget( parent, name, f ), d( 0 ) +Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent, const char * name, WFlags f ) + : TQWidget( parent, name, f ), d( 0 ) { assert( factory ); d = new Private(); d->backendFactory = factory; - QHBoxLayout * hlay = - new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = + new TQHBoxLayout( this, 0, KDialog::spacingHint() ); d->listView = new BackendListView( this, "d->listView" ); d->listView->addColumn( i18n("Available Backends") ); @@ -215,24 +215,24 @@ Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, hlay->addWidget( d->listView, 1 ); - connect( d->listView, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotSelectionChanged(QListViewItem*)) ); + connect( d->listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(slotSelectionChanged(TQListViewItem*)) ); - QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing + TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing - d->configureButton = new QPushButton( i18n("Confi&gure..."), this ); + d->configureButton = new TQPushButton( i18n("Confi&gure..."), this ); d->configureButton->setAutoDefault( false ); vlay->addWidget( d->configureButton ); - connect( d->configureButton, SIGNAL(clicked()), - SLOT(slotConfigureButtonClicked()) ); + connect( d->configureButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotConfigureButtonClicked()) ); - d->rescanButton = new QPushButton( i18n("Rescan"), this ); + d->rescanButton = new TQPushButton( i18n("Rescan"), this ); d->rescanButton->setAutoDefault( false ); vlay->addWidget( d->rescanButton ); - connect( d->rescanButton, SIGNAL(clicked()), - SLOT(slotRescanButtonClicked()) ); + connect( d->rescanButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotRescanButtonClicked()) ); vlay->addStretch( 1 ); } @@ -278,7 +278,7 @@ void Kleo::BackendConfigWidget::load() { slotSelectionChanged( d->listView->firstChild() ); } -void Kleo::BackendConfigWidget::slotSelectionChanged( QListViewItem * ) { +void Kleo::BackendConfigWidget::slotSelectionChanged( TQListViewItem * ) { const CryptoBackend* backend = d->listView->currentBackend(); if ( backend && !backend->config() ) kdDebug(5150) << "Backend w/o config object!" << endl; @@ -287,7 +287,7 @@ void Kleo::BackendConfigWidget::slotSelectionChanged( QListViewItem * ) { void Kleo::BackendConfigWidget::slotRescanButtonClicked() { - QStringList reasons; + TQStringList reasons; d->backendFactory->scanForBackends( &reasons ); if ( !reasons.empty() ) KMessageBox::informationList( this, @@ -302,11 +302,11 @@ void Kleo::BackendConfigWidget::slotConfigureButtonClicked() { if ( backend && backend->config() ) { Kleo::CryptoConfigDialog dlg( backend->config(), this ); int result = dlg.exec(); - if ( result == QDialog::Accepted ) { + if ( result == TQDialog::Accepted ) { // Tell other users of gpgconf (e.g. the s/mime page) that the gpgconf data might have changed - kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", QByteArray() ); + kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", TQByteArray() ); // and schedule a rescan, in case the updates make a backend valid - QTimer::singleShot( 0, this, SLOT(slotRescanButtonClicked()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotRescanButtonClicked()) ); } } else // shouldn't happen, button is disabled diff --git a/certmanager/lib/ui/backendconfigwidget.h b/certmanager/lib/ui/backendconfigwidget.h index 0e26655ce..57a1675a7 100644 --- a/certmanager/lib/ui/backendconfigwidget.h +++ b/certmanager/lib/ui/backendconfigwidget.h @@ -34,7 +34,7 @@ #ifndef __KLEO_UI_BACKENDCONFIGWIDGET_H__ #define __KLEO_UI_BACKENDCONFIGWIDGET_H__ -#include <qwidget.h> +#include <tqwidget.h> #include <kdepimmacros.h> namespace Kleo { @@ -45,10 +45,10 @@ class QListViewItem; namespace Kleo { - class KDE_EXPORT BackendConfigWidget : public QWidget { + class KDE_EXPORT BackendConfigWidget : public TQWidget { Q_OBJECT public: - BackendConfigWidget( CryptoBackendFactory * factory, QWidget * parent=0, const char * name=0, WFlags f=0 ); + BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent=0, const char * name=0, WFlags f=0 ); ~BackendConfigWidget(); void load(); @@ -60,7 +60,7 @@ namespace Kleo { void changed( bool ); private slots: - void slotSelectionChanged( QListViewItem * ); + void slotSelectionChanged( TQListViewItem * ); void slotRescanButtonClicked(); void slotConfigureButtonClicked(); diff --git a/certmanager/lib/ui/cryptoconfigdialog.cpp b/certmanager/lib/ui/cryptoconfigdialog.cpp index 3fa0a97ca..472429942 100644 --- a/certmanager/lib/ui/cryptoconfigdialog.cpp +++ b/certmanager/lib/ui/cryptoconfigdialog.cpp @@ -34,7 +34,7 @@ #include <klocale.h> #include <kaccelmanager.h> -Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, QWidget *parent, const char* name ) +Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, TQWidget *parent, const char* name ) : KDialogBase( Swallow, // Remove the "whats's this" button since we have no support for it WStyle_Customize | WStyle_DialogBorder | WStyle_Maximize | WStyle_Title | WStyle_SysMenu, @@ -44,7 +44,7 @@ Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, QWidge { mMainWidget = new CryptoConfigModule( config, this ); setMainWidget( mMainWidget ); - connect( mMainWidget, SIGNAL( changed() ), SLOT( slotChanged() ) ); + connect( mMainWidget, TQT_SIGNAL( changed() ), TQT_SLOT( slotChanged() ) ); enableButton( Apply, false ); // Automatically assign accelerators diff --git a/certmanager/lib/ui/cryptoconfigdialog.h b/certmanager/lib/ui/cryptoconfigdialog.h index 484c55ea4..d25cdc16c 100644 --- a/certmanager/lib/ui/cryptoconfigdialog.h +++ b/certmanager/lib/ui/cryptoconfigdialog.h @@ -47,7 +47,7 @@ namespace Kleo { { Q_OBJECT public: - CryptoConfigDialog( Kleo::CryptoConfig* config, QWidget *parent = 0, const char* name = 0 ); + CryptoConfigDialog( Kleo::CryptoConfig* config, TQWidget *parent = 0, const char* name = 0 ); protected: virtual void slotOk(); diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp index dbc8edc57..70b0a0be4 100644 --- a/certmanager/lib/ui/cryptoconfigmodule.cpp +++ b/certmanager/lib/ui/cryptoconfigmodule.cpp @@ -45,21 +45,21 @@ #include <kglobal.h> #include <kurlrequester.h> -#include <qgrid.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qstyle.h> -#include <qapplication.h> +#include <tqgrid.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqstyle.h> +#include <tqapplication.h> using namespace Kleo; -static inline QPixmap loadIcon( QString s ) { +static inline TQPixmap loadIcon( TQString s ) { return KGlobal::instance()->iconLoader() - ->loadIcon( s.replace( QRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); } static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * config ) { @@ -68,31 +68,31 @@ static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * c : KJanusWidget::IconList ; } -Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidget * parent, const char * name ) +Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent, const char * name ) : KJanusWidget( parent, name, determineJanusFace( config ) ), mConfig( config ) { - QWidget * vbox = 0; + TQWidget * vbox = 0; if ( face() == Plain ) { vbox = plainPage(); - QVBoxLayout * vlay = new QVBoxLayout( vbox, 0, KDialog::spacingHint() ); + TQVBoxLayout * vlay = new TQVBoxLayout( vbox, 0, KDialog::spacingHint() ); vlay->setAutoAdd( true ); } - const QStringList components = config->componentList(); - for ( QStringList::const_iterator it = components.begin(); it != components.end(); ++it ) { + const TQStringList components = config->componentList(); + for ( TQStringList::const_iterator it = components.begin(); it != components.end(); ++it ) { //kdDebug(5150) << "Component " << (*it).local8Bit() << ":" << endl; Kleo::CryptoConfigComponent* comp = config->component( *it ); Q_ASSERT( comp ); if ( comp->groupList().empty() ) continue; if ( face() != Plain ) { - vbox = addVBoxPage( comp->description(), QString::null, loadIcon( comp->iconName() ) ); + vbox = addVBoxPage( comp->description(), TQString::null, loadIcon( comp->iconName() ) ); } - QScrollView * scrollView = new QScrollView( vbox ); - scrollView->setHScrollBarMode( QScrollView::AlwaysOff ); - scrollView->setResizePolicy( QScrollView::AutoOneFit ); - QVBox* boxInScrollView = new QVBox( scrollView->viewport() ); + TQScrollView * scrollView = new TQScrollView( vbox ); + scrollView->setHScrollBarMode( TQScrollView::AlwaysOff ); + scrollView->setResizePolicy( TQScrollView::AutoOneFit ); + TQVBox* boxInScrollView = new TQVBox( scrollView->viewport() ); boxInScrollView->setMargin( KDialog::marginHint() ); scrollView->addChild( boxInScrollView ); @@ -102,7 +102,7 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge mComponentGUIs.append( compGUI ); // Set a nice startup size - const int deskHeight = QApplication::desktop()->height(); + const int deskHeight = TQApplication::desktop()->height(); int dialogHeight; if (deskHeight > 1000) // very big desktop ? dialogHeight = 800; @@ -110,9 +110,9 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge dialogHeight = 500; else // small (800x600, 640x480) desktop dialogHeight = 400; - QSize sz = scrollView->sizeHint(); + TQSize sz = scrollView->sizeHint(); scrollView->setMinimumSize( sz.width() - + scrollView->style().pixelMetric(QStyle::PM_ScrollBarExtent), + + scrollView->style().pixelMetric(TQStyle::PM_ScrollBarExtent), QMIN( compGUI->sizeHint().height(), dialogHeight ) ); } } @@ -120,7 +120,7 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge void Kleo::CryptoConfigModule::save() { bool changed = false; - QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin(); + TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin(); for( ; it != mComponentGUIs.end(); ++it ) { if ( (*it)->save() ) changed = true; @@ -131,7 +131,7 @@ void Kleo::CryptoConfigModule::save() void Kleo::CryptoConfigModule::reset() { - QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin(); + TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin(); for( ; it != mComponentGUIs.end(); ++it ) { (*it)->load(); } @@ -139,7 +139,7 @@ void Kleo::CryptoConfigModule::reset() void Kleo::CryptoConfigModule::defaults() { - QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin(); + TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin(); for( ; it != mComponentGUIs.end(); ++it ) { (*it)->defaults(); } @@ -154,15 +154,15 @@ void Kleo::CryptoConfigModule::cancel() Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI( CryptoConfigModule* module, Kleo::CryptoConfigComponent* component, - QWidget* parent, const char* name ) - : QWidget( parent, name ), + TQWidget* parent, const char* name ) + : TQWidget( parent, name ), mComponent( component ) { - QGridLayout * glay = new QGridLayout( this, 1, 3, 0, KDialog::spacingHint() ); - const QStringList groups = mComponent->groupList(); + TQGridLayout * glay = new TQGridLayout( this, 1, 3, 0, KDialog::spacingHint() ); + const TQStringList groups = mComponent->groupList(); if ( groups.size() > 1 ) { glay->setColSpacing( 0, KDHorizontalLine::indentHint() ); - for ( QStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) { + for ( TQStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) { Kleo::CryptoConfigGroup* group = mComponent->group( *it ); Q_ASSERT( group ); if ( !group ) @@ -182,7 +182,7 @@ Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI( bool Kleo::CryptoConfigComponentGUI::save() { bool changed = false; - QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin(); + TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin(); for( ; it != mGroupGUIs.end(); ++it ) { if ( (*it)->save() ) changed = true; @@ -192,14 +192,14 @@ bool Kleo::CryptoConfigComponentGUI::save() void Kleo::CryptoConfigComponentGUI::load() { - QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin(); + TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin(); for( ; it != mGroupGUIs.end(); ++it ) (*it)->load(); } void Kleo::CryptoConfigComponentGUI::defaults() { - QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin(); + TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin(); for( ; it != mGroupGUIs.end(); ++it ) (*it)->defaults(); } @@ -208,12 +208,12 @@ void Kleo::CryptoConfigComponentGUI::defaults() Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI( CryptoConfigModule* module, Kleo::CryptoConfigGroup* group, - QGridLayout * glay, QWidget* widget, const char* name ) - : QObject( module, name ), mGroup( group ) + TQGridLayout * glay, TQWidget* widget, const char* name ) + : TQObject( module, name ), mGroup( group ) { const int startRow = glay->numRows(); - const QStringList entries = mGroup->entryList(); - for( QStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) { + const TQStringList entries = mGroup->entryList(); + for( TQStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) { Kleo::CryptoConfigEntry* entry = group->entry( *it ); Q_ASSERT( entry ); if ( entry->level() > CryptoConfigEntry::Level_Advanced ) continue; @@ -228,11 +228,11 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI( if ( endRow < startRow ) return; - const QString iconName = group->iconName(); + const TQString iconName = group->iconName(); if ( iconName.isEmpty() ) return; - QLabel * l = new QLabel( widget ); + TQLabel * l = new TQLabel( widget ); l->setPixmap( loadIcon( iconName ) ); glay->addMultiCellWidget( l, startRow, endRow, 0, 0, Qt::AlignTop ); } @@ -240,7 +240,7 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI( bool Kleo::CryptoConfigGroupGUI::save() { bool changed = false; - QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin(); + TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin(); for( ; it != mEntryGUIs.end(); ++it ) { if ( (*it)->isChanged() ) { (*it)->save(); @@ -252,21 +252,21 @@ bool Kleo::CryptoConfigGroupGUI::save() void Kleo::CryptoConfigGroupGUI::load() { - QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin(); + TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin(); for( ; it != mEntryGUIs.end(); ++it ) (*it)->load(); } void Kleo::CryptoConfigGroupGUI::defaults() { - QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin(); + TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin(); for( ; it != mEntryGUIs.end(); ++it ) (*it)->resetToDefault(); } //// -CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, const QString& entryName, QGridLayout * glay, QWidget* widget, const char* name ) +CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, const TQString& entryName, TQGridLayout * glay, TQWidget* widget, const char* name ) { if ( entry->isList() ) { switch( entry->argType() ) { @@ -317,18 +317,18 @@ CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoC Kleo::CryptoConfigEntryGUI::CryptoConfigEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, + const TQString& entryName, const char* name ) - : QObject( module, name ), mEntry( entry ), mName( entryName ), mChanged( false ) + : TQObject( module, name ), mEntry( entry ), mName( entryName ), mChanged( false ) { - connect( this, SIGNAL( changed() ), module, SIGNAL( changed() ) ); + connect( this, TQT_SIGNAL( changed() ), module, TQT_SIGNAL( changed() ) ); } -QString Kleo::CryptoConfigEntryGUI::description() const +TQString Kleo::CryptoConfigEntryGUI::description() const { - QString descr = mEntry->description(); + TQString descr = mEntry->description(); if ( descr.isEmpty() ) // shouldn't happen - descr = QString( "<%1>" ).arg( mName ); + descr = TQString( "<%1>" ).arg( mName ); return descr; } @@ -342,20 +342,20 @@ void Kleo::CryptoConfigEntryGUI::resetToDefault() Kleo::CryptoConfigEntryLineEdit::CryptoConfigEntryLineEdit( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { const int row = glay->numRows(); mLineEdit = new KLineEdit( widget ); - QLabel* label = new QLabel( mLineEdit, description(), widget ); + TQLabel* label = new TQLabel( mLineEdit, description(), widget ); glay->addWidget( label, row, 1 ); glay->addWidget( mLineEdit, row, 2 ); if ( entry->isReadOnly() ) { label->setEnabled( false ); mLineEdit->setEnabled( false ); } else { - connect( mLineEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) ); + connect( mLineEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) ); } } @@ -373,21 +373,21 @@ void Kleo::CryptoConfigEntryLineEdit::doLoad() Kleo::CryptoConfigEntryPath::CryptoConfigEntryPath( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { const int row = glay->numRows(); mUrlRequester = new KURLRequester( widget ); mUrlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); - QLabel* label = new QLabel( mUrlRequester, description(), widget ); + TQLabel* label = new TQLabel( mUrlRequester, description(), widget ); glay->addWidget( label, row, 1 ); glay->addWidget( mUrlRequester, row, 2 ); if ( entry->isReadOnly() ) { label->setEnabled( false ); mUrlRequester->setEnabled( false ); } else { - connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) ); + connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) ); } } @@ -407,21 +407,21 @@ void Kleo::CryptoConfigEntryPath::doLoad() Kleo::CryptoConfigEntryDirPath::CryptoConfigEntryDirPath( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { const int row = glay->numRows(); mUrlRequester = new KURLRequester( widget ); mUrlRequester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); - QLabel* label = new QLabel( mUrlRequester, description(), widget ); + TQLabel* label = new TQLabel( mUrlRequester, description(), widget ); glay->addWidget( label, row, 1 ); glay->addWidget( mUrlRequester, row, 2 ); if ( entry->isReadOnly() ) { label->setEnabled( false ); mUrlRequester->setEnabled( false ); } else { - connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) ); + connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) ); } } @@ -442,21 +442,21 @@ void Kleo::CryptoConfigEntryDirPath::doLoad() Kleo::CryptoConfigEntryURL::CryptoConfigEntryURL( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { const int row = glay->numRows(); mUrlRequester = new KURLRequester( widget ); mUrlRequester->setMode( KFile::File | KFile::ExistingOnly ); - QLabel* label = new QLabel( mUrlRequester, description(), widget ); + TQLabel* label = new TQLabel( mUrlRequester, description(), widget ); glay->addWidget( label, row, 1 ); glay->addWidget( mUrlRequester, row, 2 ); if ( entry->isReadOnly() ) { label->setEnabled( false ); mUrlRequester->setEnabled( false ); } else { - connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) ); + connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) ); } } @@ -474,8 +474,8 @@ void Kleo::CryptoConfigEntryURL::doLoad() Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { @@ -490,7 +490,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox( const int row = glay->numRows(); mNumInput = new KIntNumInput( widget ); - QLabel* label = new QLabel( mNumInput, description(), widget ); + TQLabel* label = new TQLabel( mNumInput, description(), widget ); glay->addWidget( label, row, 1 ); glay->addWidget( mNumInput, row, 2 ); @@ -500,7 +500,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox( } else { if ( mKind == UInt || mKind == ListOfNone ) mNumInput->setMinValue( 0 ); - connect( mNumInput, SIGNAL( valueChanged(int) ), SLOT( slotChanged() ) ); + connect( mNumInput, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChanged() ) ); } } @@ -541,18 +541,18 @@ void Kleo::CryptoConfigEntrySpinBox::doLoad() Kleo::CryptoConfigEntryCheckBox::CryptoConfigEntryCheckBox( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { const int row = glay->numRows(); - mCheckBox = new QCheckBox( widget ); + mCheckBox = new TQCheckBox( widget ); glay->addMultiCellWidget( mCheckBox, row, row, 1, 2 ); mCheckBox->setText( description() ); if ( entry->isReadOnly() ) { mCheckBox->setEnabled( false ); } else { - connect( mCheckBox, SIGNAL( toggled(bool) ), SLOT( slotChanged() ) ); + connect( mCheckBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotChanged() ) ); } } @@ -569,16 +569,16 @@ void Kleo::CryptoConfigEntryCheckBox::doLoad() Kleo::CryptoConfigEntryLDAPURL::CryptoConfigEntryLDAPURL( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * glay, QWidget* widget, const char* name ) + const TQString& entryName, + TQGridLayout * glay, TQWidget* widget, const char* name ) : CryptoConfigEntryGUI( module, entry, entryName, name ) { - mLabel = new QLabel( widget ); - mPushButton = new QPushButton( i18n( "Edit..." ), widget ); + mLabel = new TQLabel( widget ); + mPushButton = new TQPushButton( i18n( "Edit..." ), widget ); const int row = glay->numRows(); - glay->addWidget( new QLabel( mPushButton, description(), widget ), row, 1 ); - QHBoxLayout * hlay = new QHBoxLayout; + glay->addWidget( new TQLabel( mPushButton, description(), widget ), row, 1 ); + TQHBoxLayout * hlay = new QHBoxLayout; glay->addLayout( hlay, row, 2 ); hlay->addWidget( mLabel, 1 ); hlay->addWidget( mPushButton ); @@ -587,7 +587,7 @@ Kleo::CryptoConfigEntryLDAPURL::CryptoConfigEntryLDAPURL( mLabel->setEnabled( false ); mPushButton->hide(); } else { - connect( mPushButton, SIGNAL( clicked() ), SLOT( slotOpenDialog() ) ); + connect( mPushButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenDialog() ) ); } } @@ -612,7 +612,7 @@ void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog() DirectoryServicesWidget* dirserv = new DirectoryServicesWidget( mEntry, &dialog ); dirserv->load(); dialog.setMainWidget( dirserv ); - connect( &dialog, SIGNAL( defaultClicked() ), dirserv, SLOT( defaults() ) ); + connect( &dialog, TQT_SIGNAL( defaultClicked() ), dirserv, TQT_SLOT( defaults() ) ); if ( dialog.exec() ) { // Note that we just grab the urls from the dialog, we don't call its save method, // since the user hasn't confirmed the big config dialog yet. diff --git a/certmanager/lib/ui/cryptoconfigmodule.h b/certmanager/lib/ui/cryptoconfigmodule.h index 185814594..70c4a2691 100644 --- a/certmanager/lib/ui/cryptoconfigmodule.h +++ b/certmanager/lib/ui/cryptoconfigmodule.h @@ -34,7 +34,7 @@ #include <kjanuswidget.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace Kleo { @@ -43,12 +43,12 @@ namespace Kleo { /** * Crypto Config Module widget, dynamically generated from CryptoConfig - * It's a simple QWidget so that it can be embedded into a dialog or into a KCModule. + * It's a simple TQWidget so that it can be embedded into a dialog or into a KCModule. */ class CryptoConfigModule : public KJanusWidget { Q_OBJECT public: - CryptoConfigModule( Kleo::CryptoConfig* config, QWidget * parent=0, const char * name=0 ); + CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent=0, const char * name=0 ); void save(); void reset(); // i.e. reload current settings, discarding user input @@ -60,7 +60,7 @@ namespace Kleo { private: Kleo::CryptoConfig* mConfig; - QValueList<CryptoConfigComponentGUI *> mComponentGUIs; + TQValueList<CryptoConfigComponentGUI *> mComponentGUIs; }; } diff --git a/certmanager/lib/ui/cryptoconfigmodule_p.h b/certmanager/lib/ui/cryptoconfigmodule_p.h index 22145f323..3e71b8de1 100644 --- a/certmanager/lib/ui/cryptoconfigmodule_p.h +++ b/certmanager/lib/ui/cryptoconfigmodule_p.h @@ -32,9 +32,9 @@ #ifndef CRYPTOCONFIGMODULE_P_H #define CRYPTOCONFIGMODULE_P_H -#include <qtabwidget.h> -#include <qhbox.h> -#include <qcheckbox.h> +#include <tqtabwidget.h> +#include <tqhbox.h> +#include <tqcheckbox.h> #include <kurl.h> class KLineEdit; @@ -56,12 +56,12 @@ namespace Kleo { /** * A widget corresponding to a component in the crypto config */ - class CryptoConfigComponentGUI : public QWidget { + class CryptoConfigComponentGUI : public TQWidget { Q_OBJECT public: CryptoConfigComponentGUI( CryptoConfigModule* module, Kleo::CryptoConfigComponent* component, - QWidget* parent, const char* name = 0 ); + TQWidget* parent, const char* name = 0 ); bool save(); void load(); @@ -69,18 +69,18 @@ namespace Kleo { private: Kleo::CryptoConfigComponent* mComponent; - QValueList<CryptoConfigGroupGUI *> mGroupGUIs; + TQValueList<CryptoConfigGroupGUI *> mGroupGUIs; }; /** * A class managing widgets corresponding to a group in the crypto config */ - class CryptoConfigGroupGUI : public QObject { + class CryptoConfigGroupGUI : public TQObject { Q_OBJECT public: CryptoConfigGroupGUI( CryptoConfigModule* module, Kleo::CryptoConfigGroup* group, - QGridLayout * layout, QWidget* parent, const char* name = 0 ); + TQGridLayout * layout, TQWidget* parent, const char* name = 0 ); bool save(); void load(); @@ -88,7 +88,7 @@ namespace Kleo { private: Kleo::CryptoConfigGroup* mGroup; - QValueList<CryptoConfigEntryGUI *> mEntryGUIs; + TQValueList<CryptoConfigEntryGUI *> mEntryGUIs; }; /** @@ -99,19 +99,19 @@ namespace Kleo { public: static CryptoConfigEntryGUI* createEntryGUI( CryptoConfigModule* module, - Kleo::CryptoConfigEntry* entry, const QString& entryName, - QGridLayout * layout, QWidget* widget, const char* name = 0 ); + Kleo::CryptoConfigEntry* entry, const TQString& entryName, + TQGridLayout * layout, TQWidget* widget, const char* name = 0 ); }; /** * Base class for the widget managers tied to an entry in the crypto config */ - class CryptoConfigEntryGUI : public QObject { + class CryptoConfigEntryGUI : public TQObject { Q_OBJECT public: CryptoConfigEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, + const TQString& entryName, const char* name = 0 ); virtual ~CryptoConfigEntryGUI() {} @@ -119,7 +119,7 @@ namespace Kleo { void save() { Q_ASSERT( mChanged ); doSave(); mChanged = false; } void resetToDefault(); - QString description() const; + TQString description() const; bool isChanged() const { return mChanged; } signals: @@ -136,7 +136,7 @@ namespace Kleo { virtual void doLoad() = 0; Kleo::CryptoConfigEntry* mEntry; - QString mName; + TQString mName; bool mChanged; }; @@ -149,9 +149,9 @@ namespace Kleo { public: CryptoConfigEntryLineEdit( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); @@ -168,9 +168,9 @@ namespace Kleo { public: CryptoConfigEntryPath( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); @@ -187,9 +187,9 @@ namespace Kleo { public: CryptoConfigEntryDirPath( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); @@ -206,9 +206,9 @@ namespace Kleo { public: CryptoConfigEntryURL( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); @@ -225,9 +225,9 @@ namespace Kleo { public: CryptoConfigEntrySpinBox( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); private: @@ -244,13 +244,13 @@ namespace Kleo { public: CryptoConfigEntryCheckBox( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); private: - QCheckBox* mCheckBox; + TQCheckBox* mCheckBox; }; /** @@ -262,17 +262,17 @@ namespace Kleo { public: CryptoConfigEntryLDAPURL( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, - const QString& entryName, - QGridLayout * layout, - QWidget* parent, const char* name = 0 ); + const TQString& entryName, + TQGridLayout * layout, + TQWidget* parent, const char* name = 0 ); virtual void doSave(); virtual void doLoad(); private slots: void slotOpenDialog(); private: void setURLList( const KURL::List& urlList ); - QLabel* mLabel; - QPushButton* mPushButton; + TQLabel* mLabel; + TQPushButton* mPushButton; KURL::List mURLList; }; } diff --git a/certmanager/lib/ui/directoryserviceswidget.cpp b/certmanager/lib/ui/directoryserviceswidget.cpp index 76c1b3dda..0b9dd91f2 100644 --- a/certmanager/lib/ui/directoryserviceswidget.cpp +++ b/certmanager/lib/ui/directoryserviceswidget.cpp @@ -41,38 +41,38 @@ #include <kiconloader.h> #include <kdebug.h> -#include <qbuttongroup.h> -#include <qtoolbutton.h> -#include <qlistview.h> -#include <qpushbutton.h> +#include <tqbuttongroup.h> +#include <tqtoolbutton.h> +#include <tqlistview.h> +#include <tqpushbutton.h> using namespace Kleo; class QX500ListViewItem : public QListViewItem { public: - QX500ListViewItem( QListView* lv, QListViewItem* prev, - const QString& serverName, - const QString& portNumber, - const QString& dn, - const QString& username, - const QString& password ) - : QListViewItem( lv, prev, serverName, portNumber, dn, username ) { + QX500ListViewItem( TQListView* lv, TQListViewItem* prev, + const TQString& serverName, + const TQString& portNumber, + const TQString& dn, + const TQString& username, + const TQString& password ) + : TQListViewItem( lv, prev, serverName, portNumber, dn, username ) { setPassword( password ); } - void setPassword( const QString& pass ) { + void setPassword( const TQString& pass ) { mPassword = pass; - setText( 4, pass.isEmpty() ? QString::null : QString::fromLatin1( "******" ) ); + setText( 4, pass.isEmpty() ? TQString::null : TQString::fromLatin1( "******" ) ); } - const QString& password() const { return mPassword; } + const TQString& password() const { return mPassword; } - void setData( const QString& serverName, - const QString& portNumber, - const QString& dn, - const QString& username, - const QString& password ) { + void setData( const TQString& serverName, + const TQString& portNumber, + const TQString& dn, + const TQString& username, + const TQString& password ) { setText( 0, serverName ); setText( 1, portNumber ); setText( 2, dn ); @@ -87,12 +87,12 @@ public: } private: - QString mPassword; + TQString mPassword; }; Kleo::DirectoryServicesWidget::DirectoryServicesWidget( Kleo::CryptoConfigEntry* configEntry, - QWidget* parent, const char* name, WFlags fl ) + TQWidget* parent, const char* name, WFlags fl ) : DirectoryServicesWidgetBase( parent, name, fl ), mConfigEntry( configEntry ) { @@ -132,7 +132,7 @@ void DirectoryServicesWidget::enableDisable( CryptPlugWrapper* cryptPlug ) // un /* * protected slot, connected to selectionChanged() */ -void DirectoryServicesWidget::slotServiceChanged( QListViewItem* item ) +void DirectoryServicesWidget::slotServiceChanged( TQListViewItem* item ) { if( item ) removeServicePB->setEnabled( true ); @@ -146,17 +146,17 @@ void DirectoryServicesWidget::slotServiceChanged( QListViewItem* item ) /* * protected slot, connected to returnPressed/doubleClicked */ -void DirectoryServicesWidget::slotServiceSelected( QListViewItem* item ) +void DirectoryServicesWidget::slotServiceSelected( TQListViewItem* item ) { AddDirectoryServiceDialogImpl* dlg = new AddDirectoryServiceDialogImpl( this ); dlg->serverNameED->setText( item->text( 0 ) ); dlg->portED->setText( item->text( 1 ) ); dlg->descriptionED->setText( item->text( 2 ) ); dlg->usernameED->setText( item->text( 3 ) ); - QString pass = static_cast<QX500ListViewItem *>( item )->password(); + TQString pass = static_cast<QX500ListViewItem *>( item )->password(); dlg->passwordED->setText( pass ); - if( dlg->exec() == QDialog::Accepted ) { + if( dlg->exec() == TQDialog::Accepted ) { item->setText( 0, dlg->serverNameED->text() ); item->setText( 1, dlg->portED->text() ); item->setText( 2, dlg->descriptionED->text() ); @@ -174,7 +174,7 @@ void DirectoryServicesWidget::slotServiceSelected( QListViewItem* item ) void DirectoryServicesWidget::slotAddService() { AddDirectoryServiceDialogImpl* dlg = new AddDirectoryServiceDialogImpl( this ); - if( dlg->exec() == QDialog::Accepted ) { + if( dlg->exec() == TQDialog::Accepted ) { QX500ListViewItem *item = new QX500ListViewItem( x500LV, x500LV->lastItem(), dlg->serverNameED->text(), dlg->portED->text(), @@ -192,7 +192,7 @@ void DirectoryServicesWidget::slotAddService() */ void DirectoryServicesWidget::slotDeleteService() { - QListViewItem* item = x500LV->selectedItem(); + TQListViewItem* item = x500LV->selectedItem(); Q_ASSERT( item ); if( !item ) return; @@ -210,10 +210,10 @@ void DirectoryServicesWidget::setInitialServices( const KURL::List& urls ) { x500LV->clear(); for( KURL::List::const_iterator it = urls.begin(); it != urls.end(); ++it ) { - QString dn = KURL::decode_string( (*it).query().mid( 1 ) ); // decode query and skip leading '?' + TQString dn = KURL::decode_string( (*it).query().mid( 1 ) ); // decode query and skip leading '?' (void)new QX500ListViewItem( x500LV, x500LV->lastItem(), (*it).host(), - QString::number( (*it).port() ), + TQString::number( (*it).port() ), dn, (*it).user(), (*it).pass()); @@ -223,9 +223,9 @@ void DirectoryServicesWidget::setInitialServices( const KURL::List& urls ) KURL::List DirectoryServicesWidget::urlList() const { KURL::List lst; - QListViewItemIterator it( x500LV ); + TQListViewItemIterator it( x500LV ); for ( ; it.current() ; ++it ) { - QListViewItem* item = it.current(); + TQListViewItem* item = it.current(); KURL url; url.setProtocol( "ldap" ); url.setHost( item->text( 0 ) ); @@ -272,11 +272,11 @@ void DirectoryServicesWidget::defaults() static void swapItems( QX500ListViewItem *item, QX500ListViewItem *other ) { - QString serverName = item->text( 0 ); - QString portNumber = item->text( 1 ); - QString dn = item->text( 2 ); - QString username = item->text( 3 ); - QString password = item->password(); + TQString serverName = item->text( 0 ); + TQString portNumber = item->text( 1 ); + TQString dn = item->text( 2 ); + TQString username = item->text( 3 ); + TQString password = item->password(); item->copyItem( other ); other->setData( serverName, portNumber, dn, username, password ); } diff --git a/certmanager/lib/ui/directoryserviceswidget.h b/certmanager/lib/ui/directoryserviceswidget.h index 02e428c95..5c58dc090 100644 --- a/certmanager/lib/ui/directoryserviceswidget.h +++ b/certmanager/lib/ui/directoryserviceswidget.h @@ -48,7 +48,7 @@ class KDE_EXPORT DirectoryServicesWidget : public DirectoryServicesWidgetBase public: DirectoryServicesWidget( Kleo::CryptoConfigEntry* configEntry, - QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~DirectoryServicesWidget(); void load(); @@ -66,8 +66,8 @@ signals: void changed(); protected slots: - void slotServiceChanged( QListViewItem* ); - void slotServiceSelected( QListViewItem* ); + void slotServiceChanged( TQListViewItem* ); + void slotServiceSelected( TQListViewItem* ); void slotAddService(); void slotDeleteService(); void slotMoveUp(); diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp index 54fe32af1..4c7184066 100644 --- a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp +++ b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp @@ -45,76 +45,76 @@ #include <kconfig.h> #include <kapplication.h> -#include <qtoolbutton.h> -#include <qlayout.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qtooltip.h> +#include <tqtoolbutton.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqtooltip.h> #include <assert.h> struct Kleo::DNAttributeOrderConfigWidget::Private { enum { UUp=0, Up=1, Left=2, Right=3, Down=4, DDown=5 }; - QListView * availableLV; - QListView * currentLV; - QToolButton * navTB[6]; + TQListView * availableLV; + TQListView * currentLV; + TQToolButton * navTB[6]; - QListViewItem * placeHolderItem; + TQListViewItem * placeHolderItem; Kleo::DNAttributeMapper * mapper; }; -static void prepare( QListView * lv ) { +static void prepare( TQListView * lv ) { lv->setAllColumnsShowFocus( true ); - lv->setResizeMode( QListView::LastColumn ); + lv->setResizeMode( TQListView::LastColumn ); lv->header()->setClickEnabled( false ); - lv->addColumn( QString::null ); + lv->addColumn( TQString::null ); lv->addColumn( i18n("Description") ); } -Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, QWidget * parent, const char * name, WFlags f ) - : QWidget( parent, name, f ), d( 0 ) +Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent, const char * name, WFlags f ) + : TQWidget( parent, name, f ), d( 0 ) { assert( mapper ); d = new Private(); d->mapper = mapper; - QGridLayout * glay = new QGridLayout( this, 2, 3, 0, KDialog::spacingHint() ); + TQGridLayout * glay = new TQGridLayout( this, 2, 3, 0, KDialog::spacingHint() ); glay->setColStretch( 0, 1 ); glay->setColStretch( 2, 1 ); int row = -1; ++row; - glay->addWidget( new QLabel( i18n("Available attributes:"), this ), row, 0 ); - glay->addWidget( new QLabel( i18n("Current attribute order:"), this ), row, 2 ); + glay->addWidget( new TQLabel( i18n("Available attributes:"), this ), row, 0 ); + glay->addWidget( new TQLabel( i18n("Current attribute order:"), this ), row, 2 ); ++row; glay->setRowStretch( row, 1 ); - d->availableLV = new QListView( this ); + d->availableLV = new TQListView( this ); prepare( d->availableLV ); d->availableLV->setSorting( 0 ); glay->addWidget( d->availableLV, row, 0 ); - d->currentLV = new QListView( this ); + d->currentLV = new TQListView( this ); prepare( d->currentLV ); d->currentLV->setSorting( -1 ); glay->addWidget( d->currentLV, row, 2 ); - connect( d->availableLV, SIGNAL(clicked( QListViewItem * )), - SLOT(slotAvailableSelectionChanged(QListViewItem*)) ); - connect( d->currentLV, SIGNAL(clicked(QListViewItem*)), - SLOT(slotCurrentOrderSelectionChanged(QListViewItem*)) ); + connect( d->availableLV, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotAvailableSelectionChanged(TQListViewItem*)) ); + connect( d->currentLV, TQT_SIGNAL(clicked(TQListViewItem*)), + TQT_SLOT(slotCurrentOrderSelectionChanged(TQListViewItem*)) ); - d->placeHolderItem = new QListViewItem( d->availableLV, "_X_", i18n("All others") ); + d->placeHolderItem = new TQListViewItem( d->availableLV, "_X_", i18n("All others") ); // the up/down/left/right arrow cross: - QGridLayout * xlay = new QGridLayout( 5, 3, 0, "xlay" ); + TQGridLayout * xlay = new TQGridLayout( 5, 3, 0, "xlay" ); xlay->setAlignment( AlignCenter ); static const struct { @@ -123,21 +123,21 @@ Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMap const char * tooltip; const char * slot; } navButtons[] = { - { "2uparrow", 0, 1, I18N_NOOP( "Move to top" ), SLOT(slotDoubleUpButtonClicked()) }, - { "1uparrow", 1, 1, I18N_NOOP( "Move one up" ), SLOT(slotUpButtonClicked()) }, - { "1leftarrow", 2, 0, I18N_NOOP( "Remove from current attribute order" ), SLOT(slotLeftButtonClicked()) }, - { "1rightarrow", 2, 2, I18N_NOOP( "Add to current attribute order" ), SLOT(slotRightButtonClicked()) }, - { "1downarrow", 3, 1, I18N_NOOP( "Move one down" ), SLOT(slotDownButtonClicked()) }, - { "2downarrow", 4, 1, I18N_NOOP( "Move to bottom" ), SLOT(slotDoubleDownButtonClicked()) } + { "2uparrow", 0, 1, I18N_NOOP( "Move to top" ), TQT_SLOT(slotDoubleUpButtonClicked()) }, + { "1uparrow", 1, 1, I18N_NOOP( "Move one up" ), TQT_SLOT(slotUpButtonClicked()) }, + { "1leftarrow", 2, 0, I18N_NOOP( "Remove from current attribute order" ), TQT_SLOT(slotLeftButtonClicked()) }, + { "1rightarrow", 2, 2, I18N_NOOP( "Add to current attribute order" ), TQT_SLOT(slotRightButtonClicked()) }, + { "1downarrow", 3, 1, I18N_NOOP( "Move one down" ), TQT_SLOT(slotDownButtonClicked()) }, + { "2downarrow", 4, 1, I18N_NOOP( "Move to bottom" ), TQT_SLOT(slotDoubleDownButtonClicked()) } }; for ( unsigned int i = 0 ; i < sizeof navButtons / sizeof *navButtons ; ++i ) { - QToolButton * tb = d->navTB[i] = new QToolButton( this ); + TQToolButton * tb = d->navTB[i] = new TQToolButton( this ); tb->setIconSet( SmallIconSet( navButtons[i].icon ) ); tb->setEnabled( false ); - QToolTip::add( tb, i18n( navButtons[i].tooltip ) ); + TQToolTip::add( tb, i18n( navButtons[i].tooltip ) ); xlay->addWidget( tb, navButtons[i].row, navButtons[i].col ); - connect( tb, SIGNAL(clicked()), navButtons[i].slot ); + connect( tb, TQT_SIGNAL(clicked()), navButtons[i].slot ); } glay->addLayout( xlay, row, 1 ); @@ -154,40 +154,40 @@ void Kleo::DNAttributeOrderConfigWidget::load() { d->availableLV->clear(); d->currentLV->clear(); - const QStringList order = d->mapper->attributeOrder(); + const TQStringList order = d->mapper->attributeOrder(); // fill the RHS listview: - QListViewItem * last = 0; - for ( QStringList::const_iterator it = order.begin() ; it != order.end() ; ++it ) { - const QString attr = (*it).upper(); + TQListViewItem * last = 0; + for ( TQStringList::const_iterator it = order.begin() ; it != order.end() ; ++it ) { + const TQString attr = (*it).upper(); if ( attr == "_X_" ) { takePlaceHolderItem(); d->currentLV->insertItem( d->placeHolderItem ); d->placeHolderItem->moveItem( last ); last = d->placeHolderItem; } else - last = new QListViewItem( d->currentLV, last, attr, d->mapper->name2label( attr ) ); + last = new TQListViewItem( d->currentLV, last, attr, d->mapper->name2label( attr ) ); } // fill the LHS listview with what's left: - const QStringList all = Kleo::DNAttributeMapper::instance()->names(); - for ( QStringList::const_iterator it = all.begin() ; it != all.end() ; ++it ) + const TQStringList all = Kleo::DNAttributeMapper::instance()->names(); + for ( TQStringList::const_iterator it = all.begin() ; it != all.end() ; ++it ) if ( order.find( *it ) == order.end() ) - (void)new QListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) ); + (void)new TQListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) ); if ( !d->placeHolderItem->listView() ) d->availableLV->insertItem( d->placeHolderItem ); } void Kleo::DNAttributeOrderConfigWidget::takePlaceHolderItem() { - if ( QListView * lv = d->placeHolderItem->listView() ) + if ( TQListView * lv = d->placeHolderItem->listView() ) lv->takeItem( d->placeHolderItem ); } void Kleo::DNAttributeOrderConfigWidget::save() const { - QStringList order; - for ( QListViewItemIterator it( d->currentLV ) ; it.current() ; ++it ) + TQStringList order; + for ( TQListViewItemIterator it( d->currentLV ) ; it.current() ; ++it ) order.push_back( it.current()->text( 0 ) ); d->mapper->setAttributeOrder( order ); @@ -199,15 +199,15 @@ void Kleo::DNAttributeOrderConfigWidget::defaults() { -void Kleo::DNAttributeOrderConfigWidget::slotAvailableSelectionChanged( QListViewItem * item ) { +void Kleo::DNAttributeOrderConfigWidget::slotAvailableSelectionChanged( TQListViewItem * item ) { d->navTB[Private::Right]->setEnabled( item ); } -void Kleo::DNAttributeOrderConfigWidget::slotCurrentOrderSelectionChanged( QListViewItem * item ) { +void Kleo::DNAttributeOrderConfigWidget::slotCurrentOrderSelectionChanged( TQListViewItem * item ) { enableDisableButtons( item ); } -void Kleo::DNAttributeOrderConfigWidget::enableDisableButtons( QListViewItem * item ) { +void Kleo::DNAttributeOrderConfigWidget::enableDisableButtons( TQListViewItem * item ) { d->navTB[Private::UUp ]->setEnabled( item && item->itemAbove() ); d->navTB[Private::Up ]->setEnabled( item && item->itemAbove() ); d->navTB[Private::Left ]->setEnabled( item ); @@ -216,10 +216,10 @@ void Kleo::DNAttributeOrderConfigWidget::enableDisableButtons( QListViewItem * i } void Kleo::DNAttributeOrderConfigWidget::slotUpButtonClicked() { - QListViewItem * item = d->currentLV->selectedItem(); + TQListViewItem * item = d->currentLV->selectedItem(); if ( !item ) return; - QListViewItem * above = item->itemAbove(); + TQListViewItem * above = item->itemAbove(); if ( !above ) return; above->moveItem( item ); // moves "above" to after "item", ie. "item" one up @@ -228,7 +228,7 @@ void Kleo::DNAttributeOrderConfigWidget::slotUpButtonClicked() { } void Kleo::DNAttributeOrderConfigWidget::slotDoubleUpButtonClicked() { - QListViewItem * item = d->currentLV->selectedItem(); + TQListViewItem * item = d->currentLV->selectedItem(); if ( !item ) return; if ( item == d->currentLV->firstChild() ) @@ -241,10 +241,10 @@ void Kleo::DNAttributeOrderConfigWidget::slotDoubleUpButtonClicked() { } void Kleo::DNAttributeOrderConfigWidget::slotDownButtonClicked() { - QListViewItem * item = d->currentLV->selectedItem(); + TQListViewItem * item = d->currentLV->selectedItem(); if ( !item ) return; - QListViewItem * below = item->itemBelow(); + TQListViewItem * below = item->itemBelow(); if ( !below ) return; item->moveItem( below ); // moves "item" to after "below", ie. "item" one down @@ -253,10 +253,10 @@ void Kleo::DNAttributeOrderConfigWidget::slotDownButtonClicked() { } void Kleo::DNAttributeOrderConfigWidget::slotDoubleDownButtonClicked() { - QListViewItem * item = d->currentLV->selectedItem(); + TQListViewItem * item = d->currentLV->selectedItem(); if ( !item ) return; - QListViewItem * last = d->currentLV->lastItem(); + TQListViewItem * last = d->currentLV->lastItem(); assert( last ); if ( item == last ) return; @@ -266,10 +266,10 @@ void Kleo::DNAttributeOrderConfigWidget::slotDoubleDownButtonClicked() { } void Kleo::DNAttributeOrderConfigWidget::slotLeftButtonClicked() { - QListViewItem * right = d->currentLV->selectedItem(); + TQListViewItem * right = d->currentLV->selectedItem(); if ( !right ) return; - QListViewItem * next = right->itemBelow(); + TQListViewItem * next = right->itemBelow(); if ( !next ) next = right->itemAbove(); d->currentLV->takeItem( right ); @@ -281,16 +281,16 @@ void Kleo::DNAttributeOrderConfigWidget::slotLeftButtonClicked() { } void Kleo::DNAttributeOrderConfigWidget::slotRightButtonClicked() { - QListViewItem * left = d->availableLV->selectedItem(); + TQListViewItem * left = d->availableLV->selectedItem(); if ( !left ) return; - QListViewItem * next = left->itemBelow(); + TQListViewItem * next = left->itemBelow(); if ( !next ) next = left->itemAbove(); d->availableLV->takeItem( left ); d->currentLV->insertItem( left ); - if ( QListViewItem * right = d->currentLV->selectedItem() ) { - if ( QListViewItem * above = right->itemAbove() ) + if ( TQListViewItem * right = d->currentLV->selectedItem() ) { + if ( TQListViewItem * above = right->itemAbove() ) left->moveItem( above ); // move new item immediately before old selected d->currentLV->setSelected( right, false ); } diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.h b/certmanager/lib/ui/dnattributeorderconfigwidget.h index 11299ab37..d57dfbdcf 100644 --- a/certmanager/lib/ui/dnattributeorderconfigwidget.h +++ b/certmanager/lib/ui/dnattributeorderconfigwidget.h @@ -33,7 +33,7 @@ #ifndef __KLEO_UI_DNATTRIBUTEORDERCONFIGWIDGET_H__ #define __KLEO_UI_DNATTRIBUTEORDERCONFIGWIDGET_H__ -#include <qwidget.h> +#include <tqwidget.h> #include <kdepimmacros.h> namespace Kleo { class DNAttributeMapper; @@ -43,11 +43,11 @@ class QListViewItem; namespace Kleo { - class KDE_EXPORT DNAttributeOrderConfigWidget : public QWidget { + class KDE_EXPORT DNAttributeOrderConfigWidget : public TQWidget { Q_OBJECT public: /*! Use Kleo::DNAttributeMapper::instance()->configWidget( parent, name ) instead. */ - DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, QWidget * parent=0, const char * name=0, WFlags f=0 ); + DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent=0, const char * name=0, WFlags f=0 ); ~DNAttributeOrderConfigWidget(); void load(); @@ -62,8 +62,8 @@ namespace Kleo { // private slots: - void slotAvailableSelectionChanged( QListViewItem * ); - void slotCurrentOrderSelectionChanged( QListViewItem * ); + void slotAvailableSelectionChanged( TQListViewItem * ); + void slotCurrentOrderSelectionChanged( TQListViewItem * ); void slotDoubleUpButtonClicked(); void slotUpButtonClicked(); void slotDownButtonClicked(); @@ -73,7 +73,7 @@ namespace Kleo { private: void takePlaceHolderItem(); - void enableDisableButtons( QListViewItem * ); + void enableDisableButtons( TQListViewItem * ); private: class Private; diff --git a/certmanager/lib/ui/kdhorizontalline.cpp b/certmanager/lib/ui/kdhorizontalline.cpp index 83b92a19b..7ccddb5d0 100644 --- a/certmanager/lib/ui/kdhorizontalline.cpp +++ b/certmanager/lib/ui/kdhorizontalline.cpp @@ -40,38 +40,38 @@ #include "kdhorizontalline.h" -#include <qstyle.h> -#include <qpainter.h> +#include <tqstyle.h> +#include <tqpainter.h> #ifdef QT_ACCESSIBILITY_SUPPORT -#include <qaccessible.h> +#include <tqaccessible.h> #endif -#include <qfontmetrics.h> -#include <qapplication.h> +#include <tqfontmetrics.h> +#include <tqapplication.h> -KDHorizontalLine::KDHorizontalLine( QWidget * parent, const char * name, WFlags f ) - : QFrame( parent, name, f ), +KDHorizontalLine::KDHorizontalLine( TQWidget * parent, const char * name, WFlags f ) + : TQFrame( parent, name, f ), mAlign( Qt::AlignAuto ), mLenVisible( 0 ) { - QFrame::setFrameStyle( HLine | Sunken ); + TQFrame::setFrameStyle( HLine | Sunken ); } -KDHorizontalLine::KDHorizontalLine( const QString & title, QWidget * parent, const char * name, WFlags f ) - : QFrame( parent, name, f ), +KDHorizontalLine::KDHorizontalLine( const TQString & title, TQWidget * parent, const char * name, WFlags f ) + : TQFrame( parent, name, f ), mAlign( Qt::AlignAuto ), mLenVisible( 0 ) { - QFrame::setFrameStyle( HLine | Sunken ); + TQFrame::setFrameStyle( HLine | Sunken ); setTitle( title ); } KDHorizontalLine::~KDHorizontalLine() {} void KDHorizontalLine::setFrameStyle( int style ) { - QFrame::setFrameStyle( ( style & ~MShape ) | HLine ); // force HLine + TQFrame::setFrameStyle( ( style & ~MShape ) | HLine ); // force HLine } -void KDHorizontalLine::setTitle( const QString & title ) { +void KDHorizontalLine::setTitle( const TQString & title ) { if ( mTitle == title ) return; mTitle = title; @@ -79,7 +79,7 @@ void KDHorizontalLine::setTitle( const QString & title ) { update(); updateGeometry(); #ifdef QT_ACCESSIBILITY_SUPPORT - QAccessible::updateAccessibility( this, 0, QAccessible::NameChanged ); + TQAccessible::updateAccessibility( this, 0, TQAccessible::NameChanged ); #endif } @@ -87,17 +87,17 @@ void KDHorizontalLine::calculateFrame() { mLenVisible = mTitle.length(); #if 0 if ( mLenVisible ) { - const QFontMetrics fm = fontMetrics(); + const TQFontMetrics fm = fontMetrics(); while ( mLenVisible ) { - const int tw = fm.width( mTitle, mLenVisible ) + 4*fm.width(QChar(' ')); + const int tw = fm.width( mTitle, mLenVisible ) + 4*fm.width(TQChar(' ')); if ( tw < width() ) break; mLenVisible--; } qDebug( "mLenVisible = %d (of %d)", mLenVisible, mTitle.length() ); if ( mLenVisible ) { // but do we also have a visible label? - QRect r = rect(); - const int va = style().styleHint( QStyle::SH_GroupBox_TextLabelVerticalAlignment, this ); + TQRect r = rect(); + const int va = style().styleHint( TQStyle::SH_GroupBox_TextLabelVerticalAlignment, this ); if( va & AlignVCenter ) r.setTop( fm.height() / 2 ); // frame rect should be else if( va & AlignTop ) @@ -107,32 +107,32 @@ void KDHorizontalLine::calculateFrame() { } } // no visible label - setFrameRect( QRect(0,0,0,0) ); // then use client rect + setFrameRect( TQRect(0,0,0,0) ); // then use client rect #endif } -QSizePolicy KDHorizontalLine::sizePolicy() const { - return QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ); +TQSizePolicy KDHorizontalLine::sizePolicy() const { + return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); } -QSize KDHorizontalLine::sizeHint() const { +TQSize KDHorizontalLine::sizeHint() const { return minimumSizeHint(); } -QSize KDHorizontalLine::minimumSizeHint() const { +TQSize KDHorizontalLine::minimumSizeHint() const { const int w = fontMetrics().width( mTitle, mLenVisible ) + - fontMetrics().width( QChar( ' ' ) ); + fontMetrics().width( TQChar( ' ' ) ); const int h = fontMetrics().height(); - return QSize( QMAX( w, indentHint() ), h ).expandedTo( qApp->globalStrut() ); + return TQSize( QMAX( w, indentHint() ), h ).expandedTo( qApp->globalStrut() ); } -void KDHorizontalLine::paintEvent( QPaintEvent * e ) { - QPainter paint( this ); +void KDHorizontalLine::paintEvent( TQPaintEvent * e ) { + TQPainter paint( this ); if ( mLenVisible ) { // draw title - const QFontMetrics & fm = paint.fontMetrics(); + const TQFontMetrics & fm = paint.fontMetrics(); const int h = fm.height(); - const int tw = fm.width( mTitle, mLenVisible ) + fm.width(QChar(' ')); + const int tw = fm.width( mTitle, mLenVisible ) + fm.width(TQChar(' ')); int x; if ( mAlign & AlignHCenter ) // center alignment x = frameRect().width()/2 - tw/2; @@ -141,18 +141,18 @@ void KDHorizontalLine::paintEvent( QPaintEvent * e ) { else if ( mAlign & AlignLeft ) // left alignment x = 0; else { // auto align - if( QApplication::reverseLayout() ) + if( TQApplication::reverseLayout() ) x = frameRect().width() - tw; else x = 0; } - QRect r( x, 0, tw, h ); - int va = style().styleHint( QStyle::SH_GroupBox_TextLabelVerticalAlignment, this ); + TQRect r( x, 0, tw, h ); + int va = style().styleHint( TQStyle::SH_GroupBox_TextLabelVerticalAlignment, this ); if ( va & AlignTop ) r.moveBy( 0, fm.descent() ); - const QColor pen( (QRgb) style().styleHint( QStyle::SH_GroupBox_TextLabelColor, this ) ); + const TQColor pen( (QRgb) style().styleHint( TQStyle::SH_GroupBox_TextLabelColor, this ) ); #if QT_VERSION >= 0x030300 - if ( !style().styleHint( QStyle::SH_UnderlineAccelerator, this ) ) + if ( !style().styleHint( TQStyle::SH_UnderlineAccelerator, this ) ) va |= NoAccel; #endif style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, colorGroup(), diff --git a/certmanager/lib/ui/kdhorizontalline.h b/certmanager/lib/ui/kdhorizontalline.h index a79682ebd..5b6d5da9a 100644 --- a/certmanager/lib/ui/kdhorizontalline.h +++ b/certmanager/lib/ui/kdhorizontalline.h @@ -41,39 +41,39 @@ #ifndef __KDTOOLS__KDHORIZONTALLINE_H__ #define __KDTOOLS__KDHORIZONTALLINE_H__ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> -class KDHorizontalLine : public QFrame { +class KDHorizontalLine : public TQFrame { Q_OBJECT - Q_PROPERTY( QString title READ title WRITE setTitle ) + Q_PROPERTY( TQString title READ title WRITE setTitle ) public: - KDHorizontalLine( QWidget * parent=0, const char * name=0, WFlags f=0 ); - KDHorizontalLine( const QString & title, QWidget * parent=0, const char * name=0, WFlags f=0 ); + KDHorizontalLine( TQWidget * parent=0, const char * name=0, WFlags f=0 ); + KDHorizontalLine( const TQString & title, TQWidget * parent=0, const char * name=0, WFlags f=0 ); ~KDHorizontalLine(); - QString title() const { return mTitle; } + TQString title() const { return mTitle; } /*! \reimp to hard-code the frame shape */ void setFrameStyle( int style ); - QSize sizeHint() const; - QSize minimumSizeHint() const; - QSizePolicy sizePolicy() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; + TQSizePolicy sizePolicy() const; static int indentHint(); public slots: - virtual void setTitle( const QString & title ); + virtual void setTitle( const TQString & title ); protected: - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); private: void calculateFrame(); private: - QString mTitle; + TQString mTitle; Qt::AlignmentFlags mAlign; int mLenVisible; }; diff --git a/certmanager/lib/ui/keyapprovaldialog.cpp b/certmanager/lib/ui/keyapprovaldialog.cpp index 7af85a0bb..d45b64a8c 100644 --- a/certmanager/lib/ui/keyapprovaldialog.cpp +++ b/certmanager/lib/ui/keyapprovaldialog.cpp @@ -49,13 +49,13 @@ #include <kglobalsettings.h> #include <kseparator.h> -#include <qstringlist.h> -#include <qframe.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qscrollview.h> -#include <qpushbutton.h> +#include <tqstringlist.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqscrollview.h> +#include <tqpushbutton.h> #include <gpgmepp/key.h> @@ -84,8 +84,8 @@ static int pref2cb( Kleo::EncryptionPreference p ) { } } -static QStringList preferencesStrings() { - return QStringList() << i18n("<none>") +static TQStringList preferencesStrings() { + return TQStringList() << i18n("<none>") << i18n("Never Encrypt with This Key") << i18n("Always Encrypt with This Key") << i18n("Encrypt Whenever Encryption is Possible") @@ -98,15 +98,15 @@ struct Kleo::KeyApprovalDialog::Private { Private() : selfRequester( 0 ), prefsChanged( false ) {} Kleo::KeyRequester * selfRequester; - QStringList addresses; + TQStringList addresses; std::vector<Kleo::KeyRequester*> requesters; - std::vector<QComboBox*> preferences; + std::vector<TQComboBox*> preferences; bool prefsChanged; }; Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients, const std::vector<GpgME::Key> & sender, - QWidget * parent, const char * name, + TQWidget * parent, const char * name, bool modal ) : KDialogBase( parent, name, modal, i18n("Encryption Key Approval"), Ok|Cancel, Ok ), d( 0 ) @@ -115,18 +115,18 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients d = new Private(); - QFrame *page = makeMainWidget(); - QVBoxLayout * vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout * vlay = new TQVBoxLayout( page, 0, spacingHint() ); - vlay->addWidget( new QLabel( i18n("The following keys will be used for encryption:"), page ) ); + vlay->addWidget( new TQLabel( i18n("The following keys will be used for encryption:"), page ) ); - QScrollView * sv = new QScrollView( page ); - sv->setResizePolicy( QScrollView::AutoOneFit ); + TQScrollView * sv = new TQScrollView( page ); + sv->setResizePolicy( TQScrollView::AutoOneFit ); vlay->addWidget( sv ); - QWidget * view = new QWidget( sv->viewport() ); + TQWidget * view = new TQWidget( sv->viewport() ); - QGridLayout * glay = new QGridLayout( view, 3, 2, marginHint(), spacingHint() ); + TQGridLayout * glay = new TQGridLayout( view, 3, 2, marginHint(), spacingHint() ); glay->setColStretch( 1, 1 ); sv->addChild( view ); @@ -134,7 +134,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients if ( !sender.empty() ) { ++row; - glay->addWidget( new QLabel( i18n("Your keys:"), view ), row, 0 ); + glay->addWidget( new TQLabel( i18n("Your keys:"), view ), row, 0 ); d->selfRequester = new EncryptionKeyRequester( true, EncryptionKeyRequester::AllProtocols, view ); d->selfRequester->setKeys( sender ); glay->addWidget( d->selfRequester, row, 1 ); @@ -142,28 +142,28 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients glay->addMultiCellWidget( new KSeparator( Horizontal, view ), row, row, 0, 1 ); } - const QStringList prefs = preferencesStrings(); + const TQStringList prefs = preferencesStrings(); for ( std::vector<Item>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it ) { ++row; - glay->addWidget( new QLabel( i18n("Recipient:"), view ), row, 0 ); - glay->addWidget( new QLabel( it->address, view ), row, 1 ); + glay->addWidget( new TQLabel( i18n("Recipient:"), view ), row, 0 ); + glay->addWidget( new TQLabel( it->address, view ), row, 1 ); d->addresses.push_back( it->address ); ++row; - glay->addWidget( new QLabel( i18n("Encryption keys:"), view ), row, 0 ); + glay->addWidget( new TQLabel( i18n("Encryption keys:"), view ), row, 0 ); KeyRequester * req = new EncryptionKeyRequester( true, EncryptionKeyRequester::AllProtocols, view ); req->setKeys( it->keys ); glay->addWidget( req, row, 1 ); d->requesters.push_back( req ); ++row; - glay->addWidget( new QLabel( i18n("Encryption preference:"), view ), row, 0 ); - QComboBox * cb = new QComboBox( false, view ); + glay->addWidget( new TQLabel( i18n("Encryption preference:"), view ), row, 0 ); + TQComboBox * cb = new TQComboBox( false, view ); cb->insertStringList( prefs ); glay->addWidget( cb, row, 1 ); cb->setCurrentItem( pref2cb( it->pref ) ); - connect( cb, SIGNAL(activated(int)), SLOT(slotPrefsChanged()) ); + connect( cb, TQT_SIGNAL(activated(int)), TQT_SLOT(slotPrefsChanged()) ); d->preferences.push_back( cb ); } @@ -189,8 +189,8 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients + 2; // don't make the dialog too large - const QRect desk = KGlobalSettings::desktopGeometry( this ); - setInitialSize( QSize( kMin( dialogWidth, 3 * desk.width() / 4 ), + const TQRect desk = KGlobalSettings::desktopGeometry( this ); + setInitialSize( TQSize( kMin( dialogWidth, 3 * desk.width() / 4 ), kMin( dialogHeight, 7 * desk.height() / 8 ) ) ); } @@ -208,9 +208,9 @@ std::vector<Kleo::KeyApprovalDialog::Item> Kleo::KeyApprovalDialog::items() cons std::vector<Item> result; result.reserve( d->requesters.size() ); - QStringList::const_iterator ait = d->addresses.begin(); + TQStringList::const_iterator ait = d->addresses.begin(); std::vector<KeyRequester*>::const_iterator rit = d->requesters.begin(); - std::vector<QComboBox*>::const_iterator cit = d->preferences.begin(); + std::vector<TQComboBox*>::const_iterator cit = d->preferences.begin(); while ( ait != d->addresses.end() ) result.push_back( Item( *ait++, (*rit++)->keys(), cb2pref( (*cit++)->currentItem() ) ) ); return result; diff --git a/certmanager/lib/ui/keyapprovaldialog.h b/certmanager/lib/ui/keyapprovaldialog.h index 224530a71..e669690ec 100644 --- a/certmanager/lib/ui/keyapprovaldialog.h +++ b/certmanager/lib/ui/keyapprovaldialog.h @@ -60,17 +60,17 @@ namespace Kleo { public: struct Item { Item() : pref( UnknownPreference ) {} - Item( const QString & a, const std::vector<GpgME::Key> & k, + Item( const TQString & a, const std::vector<GpgME::Key> & k, EncryptionPreference p=UnknownPreference ) : address( a ), keys( k ), pref( p ) {} - QString address; + TQString address; std::vector<GpgME::Key> keys; EncryptionPreference pref; }; KeyApprovalDialog( const std::vector<Item> & recipients, const std::vector<GpgME::Key> & sender, - QWidget * parent=0, const char * name=0, + TQWidget * parent=0, const char * name=0, bool modal=true ); ~KeyApprovalDialog(); diff --git a/certmanager/lib/ui/keylistview.cpp b/certmanager/lib/ui/keylistview.cpp index 98534a4b7..fa8c9eb83 100644 --- a/certmanager/lib/ui/keylistview.cpp +++ b/certmanager/lib/ui/keylistview.cpp @@ -38,17 +38,17 @@ #include <kdebug.h> -#include <qfontmetrics.h> -#include <qtooltip.h> -#include <qrect.h> -#include <qheader.h> -#include <qpoint.h> -#include <qptrlist.h> -#include <qpainter.h> -#include <qfont.h> -#include <qcolor.h> -#include <qtimer.h> -#include <qcstring.h> +#include <tqfontmetrics.h> +#include <tqtooltip.h> +#include <tqrect.h> +#include <tqheader.h> +#include <tqpoint.h> +#include <tqptrlist.h> +#include <tqpainter.h> +#include <tqfont.h> +#include <tqcolor.h> +#include <tqtimer.h> +#include <tqcstring.h> #include <gpgmepp/key.h> @@ -61,27 +61,27 @@ static const int updateDelayMilliSecs = 500; namespace { - class ItemToolTip : public QToolTip { + class ItemToolTip : public TQToolTip { public: ItemToolTip( Kleo::KeyListView * parent ); protected: - void maybeTip( const QPoint & p ); + void maybeTip( const TQPoint & p ); private: Kleo::KeyListView * mKeyListView; }; ItemToolTip::ItemToolTip( Kleo::KeyListView * parent ) - : QToolTip( parent->viewport() ), mKeyListView( parent ) {} + : TQToolTip( parent->viewport() ), mKeyListView( parent ) {} - void ItemToolTip::maybeTip( const QPoint & p ) { + void ItemToolTip::maybeTip( const TQPoint & p ) { if ( !mKeyListView ) return; - const QListViewItem * item = mKeyListView->itemAt( p ); + const TQListViewItem * item = mKeyListView->itemAt( p ); if ( !item ) return; - const QRect itemRect = mKeyListView->itemRect( item ); + const TQRect itemRect = mKeyListView->itemRect( item ); if ( !itemRect.isValid() ) return; @@ -89,14 +89,14 @@ namespace { if ( col == -1 ) return; - const QRect headerRect = mKeyListView->header()->sectionRect( col ); + const TQRect headerRect = mKeyListView->header()->sectionRect( col ); if ( !headerRect.isValid() ) return; - const QRect cellRect( headerRect.left(), itemRect.top(), + const TQRect cellRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ); - QString tipStr; + TQString tipStr; if ( const Kleo::KeyListViewItem * klvi = Kleo::lvi_cast<Kleo::KeyListViewItem>( item ) ) tipStr = klvi->toolTip( col ); else @@ -112,30 +112,30 @@ struct Kleo::KeyListView::Private { Private() : updateTimer( 0 ), itemToolTip( 0 ) {} std::vector<GpgME::Key> keyBuffer; - QTimer * updateTimer; - QToolTip * itemToolTip; - std::map<QCString,KeyListViewItem*> itemMap; + TQTimer * updateTimer; + TQToolTip * itemToolTip; + std::map<TQCString,KeyListViewItem*> itemMap; }; -// a list of signals where we want to replace QListViewItem with +// a list of signals where we want to replace TQListViewItem with // Kleo:KeyListViewItem: static const struct { const char * source; const char * target; } signalReplacements[] = { - { SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), - SLOT(slotEmitDoubleClicked(QListViewItem*,const QPoint&,int)) }, - { SIGNAL(returnPressed(QListViewItem*)), - SLOT(slotEmitReturnPressed(QListViewItem*)) }, - { SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotEmitSelectionChanged(QListViewItem*)) }, - { SIGNAL(contextMenu(KListView*, QListViewItem*,const QPoint&)), - SLOT(slotEmitContextMenu(KListView*, QListViewItem*,const QPoint&)) }, + { TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), + TQT_SLOT(slotEmitDoubleClicked(TQListViewItem*,const TQPoint&,int)) }, + { TQT_SIGNAL(returnPressed(TQListViewItem*)), + TQT_SLOT(slotEmitReturnPressed(TQListViewItem*)) }, + { TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(slotEmitSelectionChanged(TQListViewItem*)) }, + { TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*,const TQPoint&)), + TQT_SLOT(slotEmitContextMenu(KListView*, TQListViewItem*,const TQPoint&)) }, }; static const int numSignalReplacements = sizeof signalReplacements / sizeof *signalReplacements; -Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, QWidget * parent, const char * name, WFlags f ) +Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, TQWidget * parent, const char * name, WFlags f ) : KListView( parent, name ), mColumnStrategy( columnStrategy ), mDisplayStrategy ( displayStrategy ), @@ -145,15 +145,15 @@ Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const Dis d = new Private(); - d->updateTimer = new QTimer( this ); - connect( d->updateTimer, SIGNAL(timeout()), SLOT(slotUpdateTimeout()) ); + d->updateTimer = new TQTimer( this ); + connect( d->updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdateTimeout()) ); if ( !columnStrategy ) { kdWarning(5150) << "Kleo::KeyListView: need a column strategy to work with!" << endl; return; } - const QFontMetrics fm = fontMetrics(); + const TQFontMetrics fm = fontMetrics(); for ( int col = 0 ; !columnStrategy->title( col ).isEmpty() ; ++col ) { addColumn( columnStrategy->title( col ), columnStrategy->width( col, fm ) ); @@ -166,33 +166,33 @@ Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const Dis for ( int i = 0 ; i < numSignalReplacements ; ++i ) connect( this, signalReplacements[i].source, signalReplacements[i].target ); - QToolTip::remove( this ); - QToolTip::remove( viewport() ); // make double sure :) + TQToolTip::remove( this ); + TQToolTip::remove( viewport() ); // make double sure :) d->itemToolTip = new ItemToolTip( this ); } Kleo::KeyListView::~KeyListView() { d->updateTimer->stop(); - // need to clear here, since in ~QListView, our children won't have + // need to clear here, since in ~TQListView, our children won't have // a valid listView() pointing to us anymore, and their dtors try to // unregister from us. clear(); assert( d->itemMap.size() == 0 ); - // need to delete the tooltip ourselves, as ~QToolTip isn't virtual :o + // need to delete the tooltip ourselves, as ~TQToolTip isn't virtual :o delete d->itemToolTip; d->itemToolTip = 0; delete d; d = 0; delete mColumnStrategy; mColumnStrategy = 0; delete mDisplayStrategy; mDisplayStrategy = 0; } -void Kleo::KeyListView::insertItem( QListViewItem * qlvi ) { +void Kleo::KeyListView::insertItem( TQListViewItem * qlvi ) { //kdDebug() << "Kleo::KeyListView::insertItem( " << qlvi << " )" << endl; KListView::insertItem( qlvi ); if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) ) registerItem( item ); } -void Kleo::KeyListView::takeItem( QListViewItem * qlvi ) { +void Kleo::KeyListView::takeItem( TQListViewItem * qlvi ) { //kdDebug() << "Kleo::KeyListView::takeItem( " << qlvi << " )" << endl; if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) ) deregisterItem( item ); @@ -251,7 +251,7 @@ void Kleo::KeyListView::registerItem( KeyListViewItem * item ) { //kdDebug() << "registerItem( " << item << " )" << endl; if ( !item ) return; - const QCString fpr = item->key().primaryFingerprint(); + const TQCString fpr = item->key().primaryFingerprint(); if ( !fpr.isEmpty() ) d->itemMap.insert( std::make_pair( fpr, item ) ); } @@ -260,7 +260,7 @@ void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) { //kdDebug() << "deregisterItem( KeyLVI: " << item << " )" << endl; if ( !item ) return; - std::map<QCString,KeyListViewItem*>::iterator it + std::map<TQCString,KeyListViewItem*>::iterator it = d->itemMap.find( item->key().primaryFingerprint() ); if ( it == d->itemMap.end() ) return; @@ -271,7 +271,7 @@ void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) { } void Kleo::KeyListView::doHierarchicalInsert( const GpgME::Key & key ) { - const QCString fpr = key.primaryFingerprint(); + const TQCString fpr = key.primaryFingerprint(); if ( fpr.isEmpty() ) return; KeyListViewItem * item = 0; @@ -303,10 +303,10 @@ void Kleo::KeyListView::gatherScattered() { } } -void Kleo::KeyListView::scatterGathered( QListViewItem * start ) { - QListViewItem * item = start; +void Kleo::KeyListView::scatterGathered( TQListViewItem * start ) { + TQListViewItem * item = start; while ( item ) { - QListViewItem * cur = item; + TQListViewItem * cur = item; item = item->nextSibling(); scatterGathered( cur->firstChild() ); @@ -321,10 +321,10 @@ void Kleo::KeyListView::scatterGathered( QListViewItem * start ) { } } -Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const QCString & s ) const { +Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const TQCString & s ) const { if ( s.isEmpty() ) return 0; - const std::map<QCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s ); + const std::map<TQCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s ); if ( it == d->itemMap.end() ) return 0; return it->second; @@ -344,22 +344,22 @@ void Kleo::KeyListView::slotRefreshKey( const GpgME::Key & key ) { // slots for the emission of covariant signals: -void Kleo::KeyListView::slotEmitDoubleClicked( QListViewItem * item, const QPoint & p, int col ) { +void Kleo::KeyListView::slotEmitDoubleClicked( TQListViewItem * item, const TQPoint & p, int col ) { if ( !item || lvi_cast<KeyListViewItem>( item ) ) emit doubleClicked( static_cast<KeyListViewItem*>( item ), p, col ); } -void Kleo::KeyListView::slotEmitReturnPressed( QListViewItem * item ) { +void Kleo::KeyListView::slotEmitReturnPressed( TQListViewItem * item ) { if ( !item || lvi_cast<KeyListViewItem>( item ) ) emit returnPressed( static_cast<KeyListViewItem*>( item ) ); } -void Kleo::KeyListView::slotEmitSelectionChanged( QListViewItem * item ) { +void Kleo::KeyListView::slotEmitSelectionChanged( TQListViewItem * item ) { if ( !item || lvi_cast<KeyListViewItem>( item ) ) emit selectionChanged( static_cast<KeyListViewItem*>( item ) ); } -void Kleo::KeyListView::slotEmitContextMenu( KListView*, QListViewItem * item, const QPoint & p ) { +void Kleo::KeyListView::slotEmitContextMenu( KListView*, TQListViewItem * item, const TQPoint & p ) { if ( !item || lvi_cast<KeyListViewItem>( item ) ) emit contextMenu( static_cast<KeyListViewItem*>( item ), p ); } @@ -371,25 +371,25 @@ void Kleo::KeyListView::slotEmitContextMenu( KListView*, QListViewItem * item, c // Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, const GpgME::Key & key ) - : QListViewItem( parent ) + : TQListViewItem( parent ) { setKey( key ); } Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, KeyListViewItem * after, const GpgME::Key & key ) - : QListViewItem( parent, after ) + : TQListViewItem( parent, after ) { setKey( key ); } Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, const GpgME::Key & key ) - : QListViewItem( parent ) + : TQListViewItem( parent ) { setKey( key ); } Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, KeyListViewItem * after, const GpgME::Key & key ) - : QListViewItem( parent, after ) + : TQListViewItem( parent, after ) { setKey( key ); } @@ -399,11 +399,11 @@ Kleo::KeyListViewItem::~KeyListViewItem() { // QLVI dtor, they don't have listView() anymore, thus they don't // call deregister( this ), leading to stale entries in the // itemMap... - while ( QListViewItem * item = firstChild() ) + while ( TQListViewItem * item = firstChild() ) delete item; // better do this here, too, since deletion is top-down and thus // we're deleted when our parent item is no longer a - // KeyListViewItem, but a mere QListViewItem, so our takeItem() + // KeyListViewItem, but a mere TQListViewItem, so our takeItem() // overload is gone by that time... if ( KeyListView * lv = listView() ) lv->deregisterItem( this ); @@ -425,55 +425,55 @@ void Kleo::KeyListViewItem::setKey( const GpgME::Key & key ) { const int numCols = lv ? lv->columns() : 0 ; for ( int i = 0 ; i < numCols ; ++i ) { setText( i, cs->text( key, i ) ); - if ( const QPixmap * pix = cs->pixmap( key, i ) ) + if ( const TQPixmap * pix = cs->pixmap( key, i ) ) setPixmap( i, *pix ); } repaint(); } -QString Kleo::KeyListViewItem::toolTip( int col ) const { +TQString Kleo::KeyListViewItem::toolTip( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->toolTip( key(), col ) - : QString::null ; + : TQString::null ; } -int Kleo::KeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const { +int Kleo::KeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const { if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() ) - return QListViewItem::compare( item, col, ascending ); + return TQListViewItem::compare( item, col, ascending ); KeyListViewItem * that = static_cast<KeyListViewItem*>( item ); return listView()->columnStrategy()->compare( this->key(), that->key(), col ); } -void Kleo::KeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) { +void Kleo::KeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) { const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ; if ( !ds ) { - QListViewItem::paintCell( p, cg, column, width, alignment ); + TQListViewItem::paintCell( p, cg, column, width, alignment ); return; } - const QColor fg = ds->keyForeground( key(), cg.text() ); - const QColor bg = ds->keyBackground( key(), cg.base() ); - const QFont f = ds->keyFont( key(), p->font() ); + const TQColor fg = ds->keyForeground( key(), cg.text() ); + const TQColor bg = ds->keyBackground( key(), cg.base() ); + const TQFont f = ds->keyFont( key(), p->font() ); - QColorGroup _cg = cg; + TQColorGroup _cg = cg; p->setFont( f ); - _cg.setColor( QColorGroup::Text, fg ); - _cg.setColor( QColorGroup::Base, bg ); + _cg.setColor( TQColorGroup::Text, fg ); + _cg.setColor( TQColorGroup::Base, bg ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); } -void Kleo::KeyListViewItem::insertItem( QListViewItem * qlvi ) { +void Kleo::KeyListViewItem::insertItem( TQListViewItem * qlvi ) { //kdDebug() << "Kleo::KeyListViewItem::insertItem( " << qlvi << " )" << endl; - QListViewItem::insertItem( qlvi ); + TQListViewItem::insertItem( qlvi ); if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) ) listView()->registerItem( item ); } -void Kleo::KeyListViewItem::takeItem( QListViewItem * qlvi ) { +void Kleo::KeyListViewItem::takeItem( TQListViewItem * qlvi ) { //kdDebug() << "Kleo::KeyListViewItem::takeItem( " << qlvi << " )" << endl; if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) ) listView()->deregisterItem( item ); - QListViewItem::takeItem( qlvi ); + TQListViewItem::takeItem( qlvi ); } @@ -512,46 +512,46 @@ void Kleo::SubkeyKeyListViewItem::setSubkey( const GpgME::Subkey & subkey ) { setKey( subkey.parent() ); } -QString Kleo::SubkeyKeyListViewItem::text( int col ) const { +TQString Kleo::SubkeyKeyListViewItem::text( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->subkeyText( subkey(), col ) - : QString::null ; + : TQString::null ; } -QString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const { +TQString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->subkeyToolTip( subkey(), col ) - : QString::null ; + : TQString::null ; } -const QPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const { +const TQPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->subkeyPixmap( subkey(), col ) : 0 ; } -int Kleo::SubkeyKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const { +int Kleo::SubkeyKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const { if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() ) return KeyListViewItem::compare( item, col, ascending ); SubkeyKeyListViewItem * that = static_cast<SubkeyKeyListViewItem*>( item ); return listView()->columnStrategy()->subkeyCompare( this->subkey(), that->subkey(), col ); } -void Kleo::SubkeyKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) { +void Kleo::SubkeyKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) { const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ; if ( !ds ) { - QListViewItem::paintCell( p, cg, column, width, alignment ); + TQListViewItem::paintCell( p, cg, column, width, alignment ); return; } - const QColor fg = ds->subkeyForeground( subkey(), cg.text() ); - const QColor bg = ds->subkeyBackground( subkey(), cg.base() ); - const QFont f = ds->subkeyFont( subkey(), p->font() ); + const TQColor fg = ds->subkeyForeground( subkey(), cg.text() ); + const TQColor bg = ds->subkeyBackground( subkey(), cg.base() ); + const TQFont f = ds->subkeyFont( subkey(), p->font() ); - QColorGroup _cg = cg; + TQColorGroup _cg = cg; p->setFont( f ); - _cg.setColor( QColorGroup::Text, fg ); - _cg.setColor( QColorGroup::Base, bg ); + _cg.setColor( TQColorGroup::Text, fg ); + _cg.setColor( TQColorGroup::Base, bg ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); } @@ -590,24 +590,24 @@ void Kleo::UserIDKeyListViewItem::setUserID( const GpgME::UserID & userID ) { setKey( userID.parent() ); } -QString Kleo::UserIDKeyListViewItem::text( int col ) const { +TQString Kleo::UserIDKeyListViewItem::text( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->userIDText( userID(), col ) - : QString::null ; + : TQString::null ; } -QString Kleo::UserIDKeyListViewItem::toolTip( int col ) const { +TQString Kleo::UserIDKeyListViewItem::toolTip( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->userIDToolTip( userID(), col ) - : QString::null ; + : TQString::null ; } -const QPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const { +const TQPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->userIDPixmap( userID(), col ) : 0 ; } -int Kleo::UserIDKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const { +int Kleo::UserIDKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const { if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() ) return KeyListViewItem::compare( item, col, ascending ); UserIDKeyListViewItem * that = static_cast<UserIDKeyListViewItem*>( item ); @@ -615,22 +615,22 @@ int Kleo::UserIDKeyListViewItem::compare( QListViewItem * item, int col, bool as } -void Kleo::UserIDKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) { +void Kleo::UserIDKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) { const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ; if ( !ds ) { - QListViewItem::paintCell( p, cg, column, width, alignment ); + TQListViewItem::paintCell( p, cg, column, width, alignment ); return; } - const QColor fg = ds->useridForeground( userID(), cg.text() ); - const QColor bg = ds->useridBackground( userID(), cg.base() ); - const QFont f = ds->useridFont( userID(), p->font() ); + const TQColor fg = ds->useridForeground( userID(), cg.text() ); + const TQColor bg = ds->useridBackground( userID(), cg.base() ); + const TQFont f = ds->useridFont( userID(), p->font() ); - QColorGroup _cg = cg; + TQColorGroup _cg = cg; p->setFont( f ); - _cg.setColor( QColorGroup::Text, fg ); - _cg.setColor( QColorGroup::Base, bg ); + _cg.setColor( TQColorGroup::Text, fg ); + _cg.setColor( TQColorGroup::Base, bg ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); } @@ -669,46 +669,46 @@ void Kleo::SignatureKeyListViewItem::setSignature( const GpgME::UserID::Signatur setKey( signature.parent().parent() ); } -QString Kleo::SignatureKeyListViewItem::text( int col ) const { +TQString Kleo::SignatureKeyListViewItem::text( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->signatureText( signature(), col ) - : QString::null ; + : TQString::null ; } -QString Kleo::SignatureKeyListViewItem::toolTip( int col ) const { +TQString Kleo::SignatureKeyListViewItem::toolTip( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->signatureToolTip( signature(), col ) - : QString::null ; + : TQString::null ; } -const QPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const { +const TQPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const { return listView() && listView()->columnStrategy() ? listView()->columnStrategy()->signaturePixmap( signature(), col ) : 0 ; } -int Kleo::SignatureKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const { +int Kleo::SignatureKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const { if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() ) return KeyListViewItem::compare( item, col, ascending ); SignatureKeyListViewItem * that = static_cast<SignatureKeyListViewItem*>( item ); return listView()->columnStrategy()->signatureCompare( this->signature(), that->signature(), col ); } -void Kleo::SignatureKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) { +void Kleo::SignatureKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) { const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ; if ( !ds ) { - QListViewItem::paintCell( p, cg, column, width, alignment ); + TQListViewItem::paintCell( p, cg, column, width, alignment ); return; } - const QColor fg = ds->signatureForeground( signature(), cg.text() ); - const QColor bg = ds->signatureBackground( signature(), cg.base() ); - const QFont f = ds->signatureFont( signature(), p->font() ); + const TQColor fg = ds->signatureForeground( signature(), cg.text() ); + const TQColor bg = ds->signatureBackground( signature(), cg.base() ); + const TQFont f = ds->signatureFont( signature(), p->font() ); - QColorGroup _cg = cg; + TQColorGroup _cg = cg; p->setFont( f ); - _cg.setColor( QColorGroup::Text, fg ); - _cg.setColor( QColorGroup::Base, bg ); + _cg.setColor( TQColorGroup::Text, fg ); + _cg.setColor( TQColorGroup::Base, bg ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); } @@ -721,38 +721,38 @@ void Kleo::SignatureKeyListViewItem::paintCell( QPainter * p, const QColorGroup Kleo::KeyListView::ColumnStrategy::~ColumnStrategy() {} int Kleo::KeyListView::ColumnStrategy::compare( const GpgME::Key & key1, const GpgME::Key & key2, int col ) const { - return QString::localeAwareCompare( text( key1, col ), text( key2, col ) ); + return TQString::localeAwareCompare( text( key1, col ), text( key2, col ) ); } -int Kleo::KeyListView::ColumnStrategy::width( int col, const QFontMetrics & fm ) const { +int Kleo::KeyListView::ColumnStrategy::width( int col, const TQFontMetrics & fm ) const { return fm.width( title( col ) ) * 2; } int Kleo::KeyListView::ColumnStrategy::subkeyCompare( const GpgME::Subkey & sub1, const GpgME::Subkey & sub2, int col ) const { - return QString::localeAwareCompare( subkeyText( sub1, col ), subkeyText( sub2, col ) ); + return TQString::localeAwareCompare( subkeyText( sub1, col ), subkeyText( sub2, col ) ); } int Kleo::KeyListView::ColumnStrategy::userIDCompare( const GpgME::UserID & uid1, const GpgME::UserID & uid2, int col ) const { - return QString::localeAwareCompare( userIDText( uid1, col ), userIDText( uid2, col ) ); + return TQString::localeAwareCompare( userIDText( uid1, col ), userIDText( uid2, col ) ); } int Kleo::KeyListView::ColumnStrategy::signatureCompare( const GpgME::UserID::Signature & sig1, const GpgME::UserID::Signature & sig2, int col ) const { - return QString::localeAwareCompare( signatureText( sig1, col ), signatureText( sig2, col ) ); + return TQString::localeAwareCompare( signatureText( sig1, col ), signatureText( sig2, col ) ); } -QString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const { +TQString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const { return text( key, col ); } -QString Kleo::KeyListView::ColumnStrategy::subkeyToolTip( const GpgME::Subkey & sub, int col ) const { +TQString Kleo::KeyListView::ColumnStrategy::subkeyToolTip( const GpgME::Subkey & sub, int col ) const { return subkeyText( sub, col ); } -QString Kleo::KeyListView::ColumnStrategy::userIDToolTip( const GpgME::UserID & uid, int col ) const { +TQString Kleo::KeyListView::ColumnStrategy::userIDToolTip( const GpgME::UserID & uid, int col ) const { return userIDText( uid, col ); } -QString Kleo::KeyListView::ColumnStrategy::signatureToolTip( const GpgME::UserID::Signature & sig, int col ) const { +TQString Kleo::KeyListView::ColumnStrategy::signatureToolTip( const GpgME::UserID::Signature & sig, int col ) const { return signatureText( sig, col ); } @@ -766,70 +766,70 @@ Kleo::KeyListView::DisplayStrategy::~DisplayStrategy() {} //font -QFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const QFont & font ) const { +TQFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const TQFont & font ) const { return font; } -QFont Kleo::KeyListView::DisplayStrategy::subkeyFont( const GpgME::Subkey &, const QFont & font ) const { +TQFont Kleo::KeyListView::DisplayStrategy::subkeyFont( const GpgME::Subkey &, const TQFont & font ) const { return font; } -QFont Kleo::KeyListView::DisplayStrategy::useridFont( const GpgME::UserID &, const QFont & font ) const { +TQFont Kleo::KeyListView::DisplayStrategy::useridFont( const GpgME::UserID &, const TQFont & font ) const { return font; } -QFont Kleo::KeyListView::DisplayStrategy::signatureFont( const GpgME::UserID::Signature &, const QFont & font ) const { +TQFont Kleo::KeyListView::DisplayStrategy::signatureFont( const GpgME::UserID::Signature &, const TQFont & font ) const { return font; } //foreground -QColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const QColor & fg )const { +TQColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const TQColor & fg )const { return fg; } -QColor Kleo::KeyListView::DisplayStrategy::subkeyForeground( const GpgME::Subkey &, const QColor & fg ) const { +TQColor Kleo::KeyListView::DisplayStrategy::subkeyForeground( const GpgME::Subkey &, const TQColor & fg ) const { return fg; } -QColor Kleo::KeyListView::DisplayStrategy::useridForeground( const GpgME::UserID &, const QColor & fg ) const { +TQColor Kleo::KeyListView::DisplayStrategy::useridForeground( const GpgME::UserID &, const TQColor & fg ) const { return fg; } -QColor Kleo::KeyListView::DisplayStrategy::signatureForeground( const GpgME::UserID::Signature &, const QColor & fg ) const { +TQColor Kleo::KeyListView::DisplayStrategy::signatureForeground( const GpgME::UserID::Signature &, const TQColor & fg ) const { return fg; } //background -QColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const QColor & bg )const { +TQColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const TQColor & bg )const { return bg; } -QColor Kleo::KeyListView::DisplayStrategy::subkeyBackground( const GpgME::Subkey &, const QColor & bg ) const { +TQColor Kleo::KeyListView::DisplayStrategy::subkeyBackground( const GpgME::Subkey &, const TQColor & bg ) const { return bg; } -QColor Kleo::KeyListView::DisplayStrategy::useridBackground( const GpgME::UserID &, const QColor & bg ) const { +TQColor Kleo::KeyListView::DisplayStrategy::useridBackground( const GpgME::UserID &, const TQColor & bg ) const { return bg; } -QColor Kleo::KeyListView::DisplayStrategy::signatureBackground( const GpgME::UserID::Signature &, const QColor & bg ) const { +TQColor Kleo::KeyListView::DisplayStrategy::signatureBackground( const GpgME::UserID::Signature &, const TQColor & bg ) const { return bg; } // // -// Collection of covariant return reimplementations of QListView(Item) +// Collection of covariant return reimplementations of TQListView(Item) // members: // // Kleo::KeyListView * Kleo::KeyListViewItem::listView() const { - return static_cast<Kleo::KeyListView*>( QListViewItem::listView() ); + return static_cast<Kleo::KeyListView*>( TQListViewItem::listView() ); } Kleo::KeyListViewItem * Kleo::KeyListViewItem::nextSibling() const { - return static_cast<Kleo::KeyListViewItem*>( QListViewItem::nextSibling() ); + return static_cast<Kleo::KeyListViewItem*>( TQListViewItem::nextSibling() ); } Kleo::KeyListViewItem * Kleo::KeyListView::firstChild() const { @@ -840,8 +840,8 @@ Kleo::KeyListViewItem * Kleo::KeyListView::selectedItem() const { return static_cast<Kleo::KeyListViewItem*>( KListView::selectedItem() ); } -static void selectedItems( QPtrList<Kleo::KeyListViewItem> & result, QListViewItem * start ) { - for ( QListViewItem * item = start ; item ; item = item->nextSibling() ) { +static void selectedItems( TQPtrList<Kleo::KeyListViewItem> & result, TQListViewItem * start ) { + for ( TQListViewItem * item = start ; item ; item = item->nextSibling() ) { if ( item->isSelected() ) if ( Kleo::KeyListViewItem * i = Kleo::lvi_cast<Kleo::KeyListViewItem>( item ) ) result.append( i ); @@ -849,14 +849,14 @@ static void selectedItems( QPtrList<Kleo::KeyListViewItem> & result, QListViewIt } } -QPtrList<Kleo::KeyListViewItem> Kleo::KeyListView::selectedItems() const { - QPtrList<KeyListViewItem> result; +TQPtrList<Kleo::KeyListViewItem> Kleo::KeyListView::selectedItems() const { + TQPtrList<KeyListViewItem> result; ::selectedItems( result, firstChild() ); return result; } -static bool hasSelection( QListViewItem * start ) { - for ( QListViewItem * item = start ; item ; item = item->nextSibling() ) +static bool hasSelection( TQListViewItem * start ) { + for ( TQListViewItem * item = start ; item ; item = item->nextSibling() ) if ( item->isSelected() || hasSelection( item->firstChild() ) ) return true; return false; diff --git a/certmanager/lib/ui/keylistview.h b/certmanager/lib/ui/keylistview.h index 3ef708771..11301fe5e 100644 --- a/certmanager/lib/ui/keylistview.h +++ b/certmanager/lib/ui/keylistview.h @@ -48,13 +48,13 @@ namespace Kleo { // work around moc parser bug... #define TEMPLATE_TYPENAME(T) template <typename T> TEMPLATE_TYPENAME(T) - inline T * lvi_cast( QListViewItem * item ) { + inline T * lvi_cast( TQListViewItem * item ) { return item && (item->rtti() & T::RTTI_MASK) == T::RTTI ? static_cast<T*>( item ) : 0 ; } TEMPLATE_TYPENAME(T) - inline const T * lvi_cast( const QListViewItem * item ) { + inline const T * lvi_cast( const TQListViewItem * item ) { return item && (item->rtti() & T::RTTI_MASK) == T::RTTI ? static_cast<const T*>( item ) : 0 ; } @@ -62,7 +62,7 @@ namespace Kleo { class KeyListView; - class KDE_EXPORT KeyListViewItem : public QListViewItem { + class KDE_EXPORT KeyListViewItem : public TQListViewItem { public: KeyListViewItem( KeyListView * parent, const GpgME::Key & key ); KeyListViewItem( KeyListView * parent, KeyListViewItem * after, const GpgME::Key & key ); @@ -78,24 +78,24 @@ namespace Kleo { // // only boring stuff below: // - virtual QString toolTip( int column ) const; + virtual TQString toolTip( int column ) const; /*! \reimp for covariant return */ KeyListView * listView() const; /*! \reimp for covariant return */ KeyListViewItem * nextSibling() const; /*! \reimp */ - int compare( QListViewItem * other, int col, bool ascending ) const; + int compare( TQListViewItem * other, int col, bool ascending ) const; /*! \reimp to allow for key() overload above */ - QString key( int col, bool ascending ) const { return QListViewItem::key( col, ascending ); } + TQString key( int col, bool ascending ) const { return TQListViewItem::key( col, ascending ); } /*! \reimp */ int rtti() const { return RTTI; } /*! \reimp */ - void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ); + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ); /*! \reimp */ - void insertItem( QListViewItem * item ); + void insertItem( TQListViewItem * item ); /*! \reimp */ - void takeItem( QListViewItem * item ); + void takeItem( TQListViewItem * item ); private: GpgME::Key mKey; @@ -117,17 +117,17 @@ namespace Kleo { // only boring stuff below: // /*! \reimp */ - QString toolTip( int col ) const; + TQString toolTip( int col ) const; /*! \reimp */ - QString text( int col ) const; + TQString text( int col ) const; /*! \reimp */ - const QPixmap * pixmap( int col ) const; + const TQPixmap * pixmap( int col ) const; /*! \reimp */ - int compare( QListViewItem * other, int col, bool ascending ) const; + int compare( TQListViewItem * other, int col, bool ascending ) const; /*! \reimp */ int rtti() const { return RTTI; } /*! \reimp */ - void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ); + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ); private: GpgME::Subkey mSubkey; @@ -149,17 +149,17 @@ namespace Kleo { // only boring stuff below: // /*! \reimp */ - QString toolTip( int col ) const; + TQString toolTip( int col ) const; /*! \reimp */ - QString text( int col ) const; + TQString text( int col ) const; /*! \reimp */ - const QPixmap * pixmap( int col ) const; + const TQPixmap * pixmap( int col ) const; /*! \reimp */ - int compare( QListViewItem * other, int col, bool ascending ) const; + int compare( TQListViewItem * other, int col, bool ascending ) const; /*! \reimp */ int rtti() const { return RTTI; } /*! \reimp */ - void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ); + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ); private: GpgME::UserID mUserID; @@ -181,17 +181,17 @@ namespace Kleo { // only boring stuff below: // /*! \reimp */ - QString toolTip( int col ) const; + TQString toolTip( int col ) const; /*! \reimp */ - QString text( int col ) const; + TQString text( int col ) const; /*! \reimp */ - const QPixmap * pixmap( int col ) const; + const TQPixmap * pixmap( int col ) const; /*! \reimp */ - int compare( QListViewItem * other, int col, bool ascending ) const; + int compare( TQListViewItem * other, int col, bool ascending ) const; /*! \reimp */ int rtti() const { return RTTI; } /*! \reimp */ - void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ); + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ); private: GpgME::UserID::Signature mSignature; @@ -206,28 +206,28 @@ namespace Kleo { class KDE_EXPORT ColumnStrategy { public: virtual ~ColumnStrategy(); - virtual QString title( int column ) const = 0; - virtual int width( int column, const QFontMetrics & fm ) const; - virtual QListView::WidthMode widthMode( int ) const { return QListView::Manual; } + virtual TQString title( int column ) const = 0; + virtual int width( int column, const TQFontMetrics & fm ) const; + virtual TQListView::WidthMode widthMode( int ) const { return TQListView::Manual; } - virtual QString text( const GpgME::Key & key, int column ) const = 0; - virtual QString toolTip( const GpgME::Key & key, int column ) const; - virtual const QPixmap * pixmap( const GpgME::Key &, int ) const { return 0; } + virtual TQString text( const GpgME::Key & key, int column ) const = 0; + virtual TQString toolTip( const GpgME::Key & key, int column ) const; + virtual const TQPixmap * pixmap( const GpgME::Key &, int ) const { return 0; } virtual int compare( const GpgME::Key & key1, const GpgME::Key & key2, const int column ) const; - virtual QString subkeyText( const GpgME::Subkey &, int ) const { return QString::null; } - virtual QString subkeyToolTip( const GpgME::Subkey & subkey, int column ) const; - virtual const QPixmap * subkeyPixmap( const GpgME::Subkey &, int ) const { return 0; } + virtual TQString subkeyText( const GpgME::Subkey &, int ) const { return TQString::null; } + virtual TQString subkeyToolTip( const GpgME::Subkey & subkey, int column ) const; + virtual const TQPixmap * subkeyPixmap( const GpgME::Subkey &, int ) const { return 0; } virtual int subkeyCompare( const GpgME::Subkey & subkey1, const GpgME::Subkey & subkey2, const int column ) const; - virtual QString userIDText( const GpgME::UserID &, int ) const { return QString::null; } - virtual QString userIDToolTip( const GpgME::UserID & userID, int column ) const; - virtual const QPixmap * userIDPixmap( const GpgME::UserID &, int ) const { return 0; } + virtual TQString userIDText( const GpgME::UserID &, int ) const { return TQString::null; } + virtual TQString userIDToolTip( const GpgME::UserID & userID, int column ) const; + virtual const TQPixmap * userIDPixmap( const GpgME::UserID &, int ) const { return 0; } virtual int userIDCompare( const GpgME::UserID & userID1, const GpgME::UserID & userID2, const int column ) const; - virtual QString signatureText( const GpgME::UserID::Signature &, int ) const { return QString::null; } - virtual QString signatureToolTip( const GpgME::UserID::Signature & sig, int column ) const; - virtual const QPixmap * signaturePixmap( const GpgME::UserID::Signature &, int ) const { return 0; } + virtual TQString signatureText( const GpgME::UserID::Signature &, int ) const { return TQString::null; } + virtual TQString signatureToolTip( const GpgME::UserID::Signature & sig, int column ) const; + virtual const TQPixmap * signaturePixmap( const GpgME::UserID::Signature &, int ) const { return 0; } virtual int signatureCompare( const GpgME::UserID::Signature & sig1, const GpgME::UserID::Signature & sig2, const int column ) const; }; @@ -235,25 +235,25 @@ namespace Kleo { public: virtual ~DisplayStrategy(); //font - virtual QFont keyFont( const GpgME::Key &, const QFont & ) const; - virtual QFont subkeyFont( const GpgME::Subkey &, const QFont & ) const; - virtual QFont useridFont( const GpgME::UserID &, const QFont & ) const; - virtual QFont signatureFont( const GpgME::UserID::Signature & , const QFont & ) const; + virtual TQFont keyFont( const GpgME::Key &, const TQFont & ) const; + virtual TQFont subkeyFont( const GpgME::Subkey &, const TQFont & ) const; + virtual TQFont useridFont( const GpgME::UserID &, const TQFont & ) const; + virtual TQFont signatureFont( const GpgME::UserID::Signature & , const TQFont & ) const; //foreground - virtual QColor keyForeground( const GpgME::Key & , const QColor & ) const; - virtual QColor subkeyForeground( const GpgME::Subkey &, const QColor & ) const; - virtual QColor useridForeground( const GpgME::UserID &, const QColor & ) const; - virtual QColor signatureForeground( const GpgME::UserID::Signature &, const QColor & ) const; + virtual TQColor keyForeground( const GpgME::Key & , const TQColor & ) const; + virtual TQColor subkeyForeground( const GpgME::Subkey &, const TQColor & ) const; + virtual TQColor useridForeground( const GpgME::UserID &, const TQColor & ) const; + virtual TQColor signatureForeground( const GpgME::UserID::Signature &, const TQColor & ) const; //background - virtual QColor keyBackground( const GpgME::Key &, const QColor & ) const; - virtual QColor subkeyBackground( const GpgME::Subkey &, const QColor & ) const; - virtual QColor useridBackground( const GpgME::UserID &, const QColor & ) const; - virtual QColor signatureBackground( const GpgME::UserID::Signature &, const QColor & ) const; + virtual TQColor keyBackground( const GpgME::Key &, const TQColor & ) const; + virtual TQColor subkeyBackground( const GpgME::Subkey &, const TQColor & ) const; + virtual TQColor useridBackground( const GpgME::UserID &, const TQColor & ) const; + virtual TQColor signatureBackground( const GpgME::UserID::Signature &, const TQColor & ) const; }; KeyListView( const ColumnStrategy * strategy, const DisplayStrategy * display=0, - QWidget * parent=0, const char * name=0, WFlags f=0 ); + TQWidget * parent=0, const char * name=0, WFlags f=0 ); ~KeyListView(); @@ -267,13 +267,13 @@ namespace Kleo { bool hasSelection() const; - KeyListViewItem * itemByFingerprint( const QCString & ) const; + KeyListViewItem * itemByFingerprint( const TQCString & ) const; signals: - void doubleClicked( Kleo::KeyListViewItem*, const QPoint&, int ); + void doubleClicked( Kleo::KeyListViewItem*, const TQPoint&, int ); void returnPressed( Kleo::KeyListViewItem* ); void selectionChanged( Kleo::KeyListViewItem* ); - void contextMenu( Kleo::KeyListViewItem*, const QPoint& ); + void contextMenu( Kleo::KeyListViewItem*, const TQPoint& ); public slots: virtual void slotAddKey( const GpgME::Key & key ); @@ -283,30 +283,30 @@ namespace Kleo { // Only boring stuff below: // private slots: - void slotEmitDoubleClicked( QListViewItem*, const QPoint&, int ); - void slotEmitReturnPressed( QListViewItem* ); - void slotEmitSelectionChanged( QListViewItem* ); - void slotEmitContextMenu( KListView*, QListViewItem*, const QPoint& ); + void slotEmitDoubleClicked( TQListViewItem*, const TQPoint&, int ); + void slotEmitReturnPressed( TQListViewItem* ); + void slotEmitSelectionChanged( TQListViewItem* ); + void slotEmitContextMenu( KListView*, TQListViewItem*, const TQPoint& ); void slotUpdateTimeout(); public: /*! \reimp for covariant return */ KeyListViewItem * selectedItem() const; /*! \reimp */ - QPtrList<KeyListViewItem> selectedItems() const; + TQPtrList<KeyListViewItem> selectedItems() const; /*! \reimp for covariant return */ KeyListViewItem * firstChild() const; /*! \reimp */ void clear(); /*! \reimp */ - void insertItem( QListViewItem * ); + void insertItem( TQListViewItem * ); /*! \reimp */ - void takeItem( QListViewItem * ); + void takeItem( TQListViewItem * ); private: void doHierarchicalInsert( const GpgME::Key & ); void gatherScattered(); - void scatterGathered( QListViewItem * ); + void scatterGathered( TQListViewItem * ); void registerItem( KeyListViewItem * ); void deregisterItem( const KeyListViewItem * ); diff --git a/certmanager/lib/ui/keyrequester.cpp b/certmanager/lib/ui/keyrequester.cpp index d537affc5..3a883dea1 100644 --- a/certmanager/lib/ui/keyrequester.cpp +++ b/certmanager/lib/ui/keyrequester.cpp @@ -71,19 +71,19 @@ #include <kpushbutton.h> // Qt -#include <qapplication.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlabel.h> -#include <qregexp.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlabel.h> +#include <tqregexp.h> #include <assert.h> Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys, - QWidget * parent, const char * name ) - : QWidget( parent, name ), + TQWidget * parent, const char * name ) + : TQWidget( parent, name ), mOpenPGPBackend( 0 ), mSMIMEBackend( 0 ), mMulti( multipleKeys ), @@ -94,8 +94,8 @@ Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys, init(); } -Kleo::KeyRequester::KeyRequester( QWidget * parent, const char * name ) - : QWidget( parent, name ), +Kleo::KeyRequester::KeyRequester( TQWidget * parent, const char * name ) + : TQWidget( parent, name ), mOpenPGPBackend( 0 ), mSMIMEBackend( 0 ), mMulti( false ), @@ -108,33 +108,33 @@ Kleo::KeyRequester::KeyRequester( QWidget * parent, const char * name ) void Kleo::KeyRequester::init() { - QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); // the label where the key id is to be displayed: - mLabel = new QLabel( this ); - mLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mLabel = new TQLabel( this ); + mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); // the button to unset any key: mEraseButton = new KPushButton( this ); mEraseButton->setAutoDefault( false ); - mEraseButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, - QSizePolicy::Minimum ) ); - mEraseButton->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); - QToolTip::add( mEraseButton, i18n("Clear") ); + mEraseButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, + TQSizePolicy::Minimum ) ); + mEraseButton->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); + TQToolTip::add( mEraseButton, i18n("Clear") ); // the button to call the KeySelectionDialog: - mDialogButton = new QPushButton( i18n("Change..."), this ); + mDialogButton = new TQPushButton( i18n("Change..."), this ); mDialogButton->setAutoDefault( false ); hlay->addWidget( mLabel, 1 ); hlay->addWidget( mEraseButton ); hlay->addWidget( mDialogButton ); - connect( mEraseButton, SIGNAL(clicked()), SLOT(slotEraseButtonClicked()) ); - connect( mDialogButton, SIGNAL(clicked()), SLOT(slotDialogButtonClicked()) ); + connect( mEraseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEraseButtonClicked()) ); + connect( mDialogButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDialogButtonClicked()) ); - setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, - QSizePolicy::Fixed ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + TQSizePolicy::Fixed ) ); setAllowedKeys( mKeyUsage ); } @@ -169,15 +169,15 @@ void Kleo::KeyRequester::setKey( const GpgME::Key & key ) { updateKeys(); } -QString Kleo::KeyRequester::fingerprint() const { +TQString Kleo::KeyRequester::fingerprint() const { if ( mKeys.empty() ) - return QString::null; + return TQString::null; else return mKeys.front().primaryFingerprint(); } -QStringList Kleo::KeyRequester::fingerprints() const { - QStringList result; +TQStringList Kleo::KeyRequester::fingerprints() const { + TQStringList result; for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it ) if ( !it->isNull() ) if ( const char * fpr = it->primaryFingerprint() ) @@ -185,11 +185,11 @@ QStringList Kleo::KeyRequester::fingerprints() const { return result; } -void Kleo::KeyRequester::setFingerprint( const QString & fingerprint ) { +void Kleo::KeyRequester::setFingerprint( const TQString & fingerprint ) { startKeyListJob( fingerprint ); } -void Kleo::KeyRequester::setFingerprints( const QStringList & fingerprints ) { +void Kleo::KeyRequester::setFingerprints( const TQStringList & fingerprints ) { startKeyListJob( fingerprints ); } @@ -201,17 +201,17 @@ void Kleo::KeyRequester::updateKeys() { if ( mKeys.size() > 1 ) setMultipleKeysEnabled( true ); - QStringList labelTexts; - QString toolTipText; + TQStringList labelTexts; + TQString toolTipText; for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it ) { if ( it->isNull() ) continue; - const QString fpr = it->primaryFingerprint(); + const TQString fpr = it->primaryFingerprint(); labelTexts.push_back( fpr.right(8) ); toolTipText += fpr.right(8) + ": "; if ( const char * uid = it->userID(0).id() ) if ( it->protocol() == GpgME::Context::OpenPGP ) - toolTipText += QString::fromUtf8( uid ); + toolTipText += TQString::fromUtf8( uid ); else toolTipText += Kleo::DN( uid ).prettyDN(); else @@ -220,24 +220,24 @@ void Kleo::KeyRequester::updateKeys() { } mLabel->setText( labelTexts.join(", ") ); - QToolTip::remove( mLabel ); - QToolTip::add( mLabel, toolTipText ); + TQToolTip::remove( mLabel ); + TQToolTip::add( mLabel, toolTipText ); } #ifndef __KLEO_UI_SHOW_KEY_LIST_ERROR_H__ #define __KLEO_UI_SHOW_KEY_LIST_ERROR_H__ -static void showKeyListError( QWidget * parent, const GpgME::Error & err ) { +static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n( "<qt><p>An error occurred while fetching " + const TQString msg = i18n( "<qt><p>An error occurred while fetching " "the keys from the backend:</p>" "<p><b>%1</b></p></qt>" ) - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n( "Key Listing Failed" ) ); } #endif // __KLEO_UI_SHOW_KEY_LIST_ERROR_H__ -void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) { +void Kleo::KeyRequester::startKeyListJob( const TQStringList & fingerprints ) { if ( !mSMIMEBackend && !mOpenPGPBackend ) return; @@ -245,7 +245,7 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) { mJobs = 0; unsigned int count = 0; - for ( QStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it ) + for ( TQStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it ) if ( !(*it).stripWhiteSpace().isEmpty() ) ++count; @@ -264,10 +264,10 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) { "Check your installation."), i18n("Key Listing Failed") ); } else { - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), - SLOT(slotNextKey(const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), + TQT_SLOT(slotNextKey(const GpgME::Key&)) ); const GpgME::Error err = job->start( fingerprints, mKeyUsage & Kleo::KeySelectionDialog::SecretKeys && @@ -288,10 +288,10 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) { "Check your installation."), i18n("Key Listing Failed") ); } else { - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), - SLOT(slotNextKey(const GpgME::Key&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), + TQT_SLOT(slotNextKey(const GpgME::Key&)) ); const GpgME::Error err = job->start( fingerprints, mKeyUsage & Kleo::KeySelectionDialog::SecretKeys && @@ -334,7 +334,7 @@ void Kleo::KeyRequester::slotDialogButtonClicked() { ? new KeySelectionDialog( mDialogCaption, mDialogMessage, mInitialQuery, mKeyUsage, mMulti, false, this ) : new KeySelectionDialog( mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, this ) ; - if ( dlg->exec() == QDialog::Accepted ) { + if ( dlg->exec() == TQDialog::Accepted ) { if ( mMulti ) setKeys( dlg->selectedKeys() ); else @@ -352,11 +352,11 @@ void Kleo::KeyRequester::slotEraseButtonClicked() { updateKeys(); } -void Kleo::KeyRequester::setDialogCaption( const QString & caption ) { +void Kleo::KeyRequester::setDialogCaption( const TQString & caption ) { mDialogCaption = caption; } -void Kleo::KeyRequester::setDialogMessage( const QString & msg ) { +void Kleo::KeyRequester::setDialogMessage( const TQString & msg ) { mDialogMessage = msg; } @@ -400,11 +400,11 @@ void Kleo::KeyRequester::setAllowedKeys( unsigned int keyUsage ) { } } -QPushButton * Kleo::KeyRequester::dialogButton() { +TQPushButton * Kleo::KeyRequester::dialogButton() { return mDialogButton; } -QPushButton * Kleo::KeyRequester::eraseButton() { +TQPushButton * Kleo::KeyRequester::eraseButton() { return mEraseButton; } @@ -430,14 +430,14 @@ static inline unsigned int signingKeyUsage( bool openpgp, bool smime, bool trust } Kleo::EncryptionKeyRequester::EncryptionKeyRequester( bool multi, unsigned int proto, - QWidget * parent, const char * name, + TQWidget * parent, const char * name, bool onlyTrusted, bool onlyValid ) : KeyRequester( encryptionKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi, parent, name ) { } -Kleo::EncryptionKeyRequester::EncryptionKeyRequester( QWidget * parent, const char * name ) +Kleo::EncryptionKeyRequester::EncryptionKeyRequester( TQWidget * parent, const char * name ) : KeyRequester( 0, false, parent, name ) { } @@ -451,14 +451,14 @@ void Kleo::EncryptionKeyRequester::setAllowedKeys( unsigned int proto, bool only } Kleo::SigningKeyRequester::SigningKeyRequester( bool multi, unsigned int proto, - QWidget * parent, const char * name, + TQWidget * parent, const char * name, bool onlyTrusted, bool onlyValid ) : KeyRequester( signingKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi, parent, name ) { } -Kleo::SigningKeyRequester::SigningKeyRequester( QWidget * parent, const char * name ) +Kleo::SigningKeyRequester::SigningKeyRequester( TQWidget * parent, const char * name ) : KeyRequester( 0, false, parent, name ) { } diff --git a/certmanager/lib/ui/keyrequester.h b/certmanager/lib/ui/keyrequester.h index 3de9c508b..6392f5c67 100644 --- a/certmanager/lib/ui/keyrequester.h +++ b/certmanager/lib/ui/keyrequester.h @@ -49,7 +49,7 @@ #ifndef __KLEO_UI_KEYREQUESTER_H__ #define __KLEO_UI_KEYREQUESTER_H__ -#include <qwidget.h> +#include <tqwidget.h> #include <kleo/cryptobackend.h> #include <vector> @@ -73,13 +73,13 @@ class QLabel; namespace Kleo { /// Base class for SigningKeyRequester and EncryptionKeyRequester - class KDE_EXPORT KeyRequester : public QWidget { + class KDE_EXPORT KeyRequester : public TQWidget { Q_OBJECT public: KeyRequester( unsigned int allowedKeys, bool multipleKeys=false, - QWidget * parent=0, const char * name=0 ); + TQWidget * parent=0, const char * name=0 ); // Constructor for Qt Designer - KeyRequester( QWidget * parent=0, const char * name=0 ); + KeyRequester( TQWidget * parent=0, const char * name=0 ); ~KeyRequester(); const GpgME::Key & key() const; @@ -95,24 +95,24 @@ namespace Kleo { */ void setKeys( const std::vector<GpgME::Key> & keys ); - QString fingerprint() const; + TQString fingerprint() const; /** Set the key by fingerprint. Starts a background KeyListJob to retrive the complete GpgME::Key object */ - void setFingerprint( const QString & fingerprint ); + void setFingerprint( const TQString & fingerprint ); - QStringList fingerprints() const; + TQStringList fingerprints() const; /** Set the keys by fingerprint. Starts a background KeyListJob to retrive the complete GpgME::Key objects */ - void setFingerprints( const QStringList & fingerprints ); + void setFingerprints( const TQStringList & fingerprints ); - QPushButton * eraseButton(); - QPushButton * dialogButton(); + TQPushButton * eraseButton(); + TQPushButton * dialogButton(); - void setDialogCaption( const QString & caption ); - void setDialogMessage( const QString & message ); + void setDialogCaption( const TQString & caption ); + void setDialogMessage( const TQString & message ); bool isMultipleKeysEnabled() const; void setMultipleKeysEnabled( bool enable ); @@ -120,15 +120,15 @@ namespace Kleo { unsigned int allowedKeys() const; void setAllowedKeys( unsigned int allowed ); - void setInitialQuery( const QString & s ) { mInitialQuery = s; } - const QString & initialQuery() const { return mInitialQuery; } + void setInitialQuery( const TQString & s ) { mInitialQuery = s; } + const TQString & initialQuery() const { return mInitialQuery; } signals: void changed(); private: void init(); - void startKeyListJob( const QStringList & fingerprints ); + void startKeyListJob( const TQStringList & fingerprints ); void updateKeys(); private slots: @@ -140,10 +140,10 @@ namespace Kleo { private: const CryptoBackend::Protocol * mOpenPGPBackend; const CryptoBackend::Protocol * mSMIMEBackend; - QLabel * mLabel; - QPushButton * mEraseButton; - QPushButton * mDialogButton; - QString mDialogCaption, mDialogMessage, mInitialQuery; + TQLabel * mLabel; + TQPushButton * mEraseButton; + TQPushButton * mDialogButton; + TQString mDialogCaption, mDialogMessage, mInitialQuery; bool mMulti; unsigned int mKeyUsage; int mJobs; @@ -167,12 +167,12 @@ namespace Kleo { * Preferred constructor */ EncryptionKeyRequester( bool multipleKeys=false, unsigned int proto=AllProtocols, - QWidget * parent=0, const char * name=0, + TQWidget * parent=0, const char * name=0, bool onlyTrusted=true, bool onlyValid=true ); /** * Constructor for Qt designer */ - EncryptionKeyRequester( QWidget * parent=0, const char * name=0 ); + EncryptionKeyRequester( TQWidget * parent=0, const char * name=0 ); ~EncryptionKeyRequester(); void setAllowedKeys( unsigned int proto, bool onlyTrusted=true, bool onlyValid=true ); @@ -199,12 +199,12 @@ namespace Kleo { * @param onlyValid only show valid keys */ SigningKeyRequester( bool multipleKeys=false, unsigned int proto=AllProtocols, - QWidget * parent=0, const char * name=0, + TQWidget * parent=0, const char * name=0, bool onlyTrusted=true, bool onlyValid=true ); /** * Constructor for Qt designer */ - SigningKeyRequester( QWidget * parent=0, const char * name=0 ); + SigningKeyRequester( TQWidget * parent=0, const char * name=0 ); ~SigningKeyRequester(); /* diff --git a/certmanager/lib/ui/keyselectiondialog.cpp b/certmanager/lib/ui/keyselectiondialog.cpp index e21cb39d4..fcb257514 100644 --- a/certmanager/lib/ui/keyselectiondialog.cpp +++ b/certmanager/lib/ui/keyselectiondialog.cpp @@ -63,17 +63,17 @@ #include <kprocess.h> // Qt -#include <qcheckbox.h> -#include <qtoolbutton.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qwhatsthis.h> -#include <qpopupmenu.h> -#include <qregexp.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqtoolbutton.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqwhatsthis.h> +#include <tqpopupmenu.h> +#include <tqregexp.h> +#include <tqpushbutton.h> #include <algorithm> #include <iterator> @@ -151,8 +151,8 @@ static bool checkKeyUsage( const std::vector<GpgME::Key> & keys, unsigned int ke return true; } -static inline QString time_t2string( time_t t ) { - QDateTime dt; +static inline TQString time_t2string( time_t t ) { + TQDateTime dt; dt.setTime_t( t ); return dt.toString(); } @@ -163,15 +163,15 @@ namespace { public: ColumnStrategy( unsigned int keyUsage ); - QString title( int col ) const; - int width( int col, const QFontMetrics & fm ) const; + TQString title( int col ) const; + int width( int col, const TQFontMetrics & fm ) const; - QString text( const GpgME::Key & key, int col ) const; - QString toolTip( const GpgME::Key & key, int col ) const; - const QPixmap * pixmap( const GpgME::Key & key, int col ) const; + TQString text( const GpgME::Key & key, int col ) const; + TQString toolTip( const GpgME::Key & key, int col ) const; + const TQPixmap * pixmap( const GpgME::Key & key, int col ) const; private: - const QPixmap mKeyGoodPix, mKeyBadPix, mKeyUnknownPix, mKeyValidPix; + const TQPixmap mKeyGoodPix, mKeyBadPix, mKeyUnknownPix, mKeyValidPix; const unsigned int mKeyUsage; }; @@ -187,31 +187,31 @@ namespace { << "KeySelectionDialog: keyUsage == 0. You want to use AllKeys instead." << endl; } - QString ColumnStrategy::title( int col ) const { + TQString ColumnStrategy::title( int col ) const { switch ( col ) { case 0: return i18n("Key ID"); case 1: return i18n("User ID"); - default: return QString::null; + default: return TQString::null; } } - int ColumnStrategy::width( int col, const QFontMetrics & fm ) const { + int ColumnStrategy::width( int col, const TQFontMetrics & fm ) const { if ( col == 0 ) { static const char hexchars[] = "0123456789ABCDEF"; int maxWidth = 0; for ( unsigned int i = 0 ; i < 16 ; ++i ) - maxWidth = kMax( fm.width( QChar( hexchars[i] ) ), maxWidth ); + maxWidth = kMax( fm.width( TQChar( hexchars[i] ) ), maxWidth ); return 8 * maxWidth + 2 * mKeyGoodPix.width(); } return Kleo::KeyListView::ColumnStrategy::width( col, fm ); } - QString ColumnStrategy::text( const GpgME::Key & key, int col ) const { + TQString ColumnStrategy::text( const GpgME::Key & key, int col ) const { switch ( col ) { case 0: { if ( key.shortKeyID() ) - return QString::fromUtf8( key.shortKeyID() ); + return TQString::fromUtf8( key.shortKeyID() ); else return i18n("<unknown>"); } @@ -220,30 +220,30 @@ namespace { { const char * uid = key.userID(0).id(); if ( key.protocol() == GpgME::Context::OpenPGP ) - return uid && *uid ? QString::fromUtf8( uid ) : QString::null ; + return uid && *uid ? TQString::fromUtf8( uid ) : TQString::null ; else // CMS return Kleo::DN( uid ).prettyDN(); } break; - default: return QString::null; + default: return TQString::null; } } - QString ColumnStrategy::toolTip( const GpgME::Key & key, int ) const { + TQString ColumnStrategy::toolTip( const GpgME::Key & key, int ) const { const char * uid = key.userID(0).id(); const char * fpr = key.primaryFingerprint(); const char * issuer = key.issuerName(); const GpgME::Subkey subkey = key.subkey(0); - const QString expiry = subkey.neverExpires() ? i18n("never") : time_t2string( subkey.expirationTime() ) ; - const QString creation = time_t2string( subkey.creationTime() ); + const TQString expiry = subkey.neverExpires() ? i18n("never") : time_t2string( subkey.expirationTime() ) ; + const TQString creation = time_t2string( subkey.creationTime() ); if ( key.protocol() == GpgME::Context::OpenPGP ) return i18n( "OpenPGP key for %1\n" "Created: %2\n" "Expiry: %3\n" "Fingerprint: %4" ) - .arg( uid ? QString::fromUtf8( uid ) : i18n("unknown"), + .arg( uid ? TQString::fromUtf8( uid ) : i18n("unknown"), creation, expiry, - fpr ? QString::fromLatin1( fpr ) : i18n("unknown") ); + fpr ? TQString::fromLatin1( fpr ) : i18n("unknown") ); else return i18n( "S/MIME key for %1\n" "Created: %2\n" @@ -252,11 +252,11 @@ namespace { "Issuer: %5" ) .arg( uid ? Kleo::DN( uid ).prettyDN() : i18n("unknown"), creation, expiry, - fpr ? QString::fromLatin1( fpr ) : i18n("unknown") ) + fpr ? TQString::fromLatin1( fpr ) : i18n("unknown") ) .arg( issuer ? Kleo::DN( issuer ).prettyDN() : i18n("unknown") ); } - const QPixmap * ColumnStrategy::pixmap( const GpgME::Key & key, int col ) const { + const TQPixmap * ColumnStrategy::pixmap( const GpgME::Key & key, int col ) const { if ( col != 0 ) return 0; // this key did not undergo a validating keylisting yet: @@ -288,13 +288,13 @@ namespace { static const int sCheckSelectionDelay = 250; -Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title, - const QString & text, +Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title, + const TQString & text, const std::vector<GpgME::Key> & selectedKeys, unsigned int keyUsage, bool extendedSelection, bool rememberChoice, - QWidget * parent, const char * name, + TQWidget * parent, const char * name, bool modal ) : KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ), mOpenPGPBackend( 0 ), @@ -304,16 +304,16 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title, mKeyUsage( keyUsage ), mCurrentContextMenuItem( 0 ) { - init( rememberChoice, extendedSelection, text, QString::null ); + init( rememberChoice, extendedSelection, text, TQString::null ); } -Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title, - const QString & text, - const QString & initialQuery, +Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title, + const TQString & text, + const TQString & initialQuery, unsigned int keyUsage, bool extendedSelection, bool rememberChoice, - QWidget * parent, const char * name, + TQWidget * parent, const char * name, bool modal ) : KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ), mOpenPGPBackend( 0 ), @@ -327,81 +327,81 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title, } void Kleo::KeySelectionDialog::init( bool rememberChoice, bool extendedSelection, - const QString & text, const QString & initialQuery ) { + const TQString & text, const TQString & initialQuery ) { if ( mKeyUsage & OpenPGPKeys ) mOpenPGPBackend = Kleo::CryptoBackendFactory::instance()->openpgp(); if ( mKeyUsage & SMIMEKeys ) mSMIMEBackend = Kleo::CryptoBackendFactory::instance()->smime(); - mCheckSelectionTimer = new QTimer( this ); - mStartSearchTimer = new QTimer( this ); + mCheckSelectionTimer = new TQTimer( this ); + mStartSearchTimer = new TQTimer( this ); - QFrame *page = makeMainWidget(); - mTopLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + mTopLayout = new TQVBoxLayout( page, 0, spacingHint() ); if ( !text.isEmpty() ) { - QLabel* textLabel = new QLabel( text, page ); + TQLabel* textLabel = new TQLabel( text, page ); textLabel->setAlignment( textLabel->alignment() | Qt::WordBreak ); mTopLayout->addWidget( textLabel ); } - QHBoxLayout * hlay = new QHBoxLayout( mTopLayout ); // inherits spacing - QLineEdit * le = new QLineEdit( page ); + TQHBoxLayout * hlay = new TQHBoxLayout( mTopLayout ); // inherits spacing + TQLineEdit * le = new TQLineEdit( page ); le->setText( initialQuery ); - QToolButton *clearButton = new QToolButton( page ); + TQToolButton *clearButton = new TQToolButton( page ); clearButton->setIconSet( KGlobal::iconLoader()->loadIconSet( KApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) ); hlay->addWidget( clearButton ); - hlay->addWidget( new QLabel( le, i18n("&Search for:"), page ) ); + hlay->addWidget( new TQLabel( le, i18n("&Search for:"), page ) ); hlay->addWidget( le, 1 ); le->setFocus(); - connect( clearButton, SIGNAL( clicked() ), le, SLOT( clear() ) ); - connect( le, SIGNAL(textChanged(const QString&)), - this, SLOT(slotSearch(const QString&)) ); - connect( mStartSearchTimer, SIGNAL(timeout()), SLOT(slotFilter()) ); + connect( clearButton, TQT_SIGNAL( clicked() ), le, TQT_SLOT( clear() ) ); + connect( le, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotSearch(const TQString&)) ); + connect( mStartSearchTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFilter()) ); mKeyListView = new KeyListView( new ColumnStrategy( mKeyUsage ), 0, page, "mKeyListView" ); - mKeyListView->setResizeMode( QListView::LastColumn ); + mKeyListView->setResizeMode( TQListView::LastColumn ); mKeyListView->setRootIsDecorated( true ); mKeyListView->setShowSortIndicator( true ); mKeyListView->setSorting( 1, true ); // sort by User ID mKeyListView->setShowToolTips( true ); if ( extendedSelection ) - mKeyListView->setSelectionMode( QListView::Extended ); + mKeyListView->setSelectionMode( TQListView::Extended ); mTopLayout->addWidget( mKeyListView, 10 ); if ( rememberChoice ) { - mRememberCB = new QCheckBox( i18n("&Remember choice"), page ); + mRememberCB = new TQCheckBox( i18n("&Remember choice"), page ); mTopLayout->addWidget( mRememberCB ); - QWhatsThis::add( mRememberCB, + TQWhatsThis::add( mRememberCB, i18n("<qt><p>If you check this box your choice will " "be stored and you will not be asked again." "</p></qt>") ); } - connect( mCheckSelectionTimer, SIGNAL(timeout()), - SLOT(slotCheckSelection()) ); + connect( mCheckSelectionTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotCheckSelection()) ); connectSignals(); connect( mKeyListView, - SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const QPoint&,int)), - SLOT(slotTryOk()) ); + TQT_SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const TQPoint&,int)), + TQT_SLOT(slotTryOk()) ); connect( mKeyListView, - SIGNAL(contextMenu(Kleo::KeyListViewItem*,const QPoint&)), - SLOT(slotRMB(Kleo::KeyListViewItem*,const QPoint&)) ); + TQT_SIGNAL(contextMenu(Kleo::KeyListViewItem*,const TQPoint&)), + TQT_SLOT(slotRMB(Kleo::KeyListViewItem*,const TQPoint&)) ); setButtonText( KDialogBase::Default, i18n("&Reread Keys") ); setButtonGuiItem( KDialogBase::Help, i18n("&Start Certificate Manager") ); - connect( this, SIGNAL(defaultClicked()), this, SLOT(slotRereadKeys()) ); - connect( this, SIGNAL(helpClicked()), this, SLOT(slotStartCertificateManager()) ); + connect( this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotRereadKeys()) ); + connect( this, TQT_SIGNAL(helpClicked()), this, TQT_SLOT(slotStartCertificateManager()) ); slotRereadKeys(); mTopLayout->activate(); if ( kapp ) { KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() ); - QSize dialogSize( 500, 400 ); + TQSize dialogSize( 500, 400 ); KConfigGroup dialogConfig( KGlobal::config(), "Key Selection Dialog" ); dialogSize = dialogConfig.readSizeEntry( "Dialog size", &dialogSize ); @@ -418,20 +418,20 @@ Kleo::KeySelectionDialog::~KeySelectionDialog() { void Kleo::KeySelectionDialog::connectSignals() { if ( mKeyListView->isMultiSelection() ) - connect( mKeyListView, SIGNAL(selectionChanged()), - SLOT(slotSelectionChanged()) ); + connect( mKeyListView, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotSelectionChanged()) ); else - connect( mKeyListView, SIGNAL(selectionChanged(Kleo::KeyListViewItem*)), - SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) ); + connect( mKeyListView, TQT_SIGNAL(selectionChanged(Kleo::KeyListViewItem*)), + TQT_SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) ); } void Kleo::KeySelectionDialog::disconnectSignals() { if ( mKeyListView->isMultiSelection() ) - disconnect( mKeyListView, SIGNAL(selectionChanged()), - this, SLOT(slotSelectionChanged()) ); + disconnect( mKeyListView, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectionChanged()) ); else - disconnect( mKeyListView, SIGNAL(selectionChanged(Kleo::KeyListViewItem*)), - this, SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) ); + disconnect( mKeyListView, TQT_SIGNAL(selectionChanged(Kleo::KeyListViewItem*)), + this, TQT_SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) ); } const GpgME::Key & Kleo::KeySelectionDialog::selectedKey() const { @@ -440,20 +440,20 @@ const GpgME::Key & Kleo::KeySelectionDialog::selectedKey() const { return mKeyListView->selectedItem()->key(); } -QString Kleo::KeySelectionDialog::fingerprint() const { +TQString Kleo::KeySelectionDialog::fingerprint() const { return selectedKey().primaryFingerprint(); } -QStringList Kleo::KeySelectionDialog::fingerprints() const { - QStringList result; +TQStringList Kleo::KeySelectionDialog::fingerprints() const { + TQStringList result; for ( std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it ) if ( const char * fpr = it->primaryFingerprint() ) result.push_back( fpr ); return result; } -QStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const { - QStringList result; +TQStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const { + TQStringList result; for ( std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it ) if ( it->protocol() == GpgME::Context::OpenPGP ) if ( const char * fpr = it->primaryFingerprint() ) @@ -461,8 +461,8 @@ QStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const { return result; } -QStringList Kleo::KeySelectionDialog::smimeFingerprints() const { - QStringList result; +TQStringList Kleo::KeySelectionDialog::smimeFingerprints() const { + TQStringList result; for ( std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it ) if ( it->protocol() == GpgME::Context::CMS ) if ( const char * fpr = it->primaryFingerprint() ) @@ -515,12 +515,12 @@ void Kleo::KeySelectionDialog::slotStartCertificateManager() #ifndef __KLEO_UI_SHOW_KEY_LIST_ERROR_H__ #define __KLEO_UI_SHOW_KEY_LIST_ERROR_H__ -static void showKeyListError( QWidget * parent, const GpgME::Error & err ) { +static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n( "<qt><p>An error occurred while fetching " + const TQString msg = i18n( "<qt><p>An error occurred while fetching " "the keys from the backend:</p>" "<p><b>%1</b></p></qt>" ) - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( parent, msg, i18n( "Key Listing Failed" ) ); } @@ -528,7 +528,7 @@ static void showKeyListError( QWidget * parent, const GpgME::Error & err ) { namespace { struct ExtractFingerprint { - QString operator()( const GpgME::Key & key ) { + TQString operator()( const GpgME::Key & key ) { return key.primaryFingerprint(); } }; @@ -540,14 +540,14 @@ void Kleo::KeySelectionDialog::startKeyListJobForBackend( const CryptoBackend::P if ( !job ) return; - connect( job, SIGNAL(result(const GpgME::KeyListResult&)), - SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); - connect( job, SIGNAL(nextKey(const GpgME::Key&)), + connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)), + TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) ); + connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)), mKeyListView, validate ? - SLOT(slotRefreshKey(const GpgME::Key&)) : - SLOT(slotAddKey(const GpgME::Key&)) ); + TQT_SLOT(slotRefreshKey(const GpgME::Key&)) : + TQT_SLOT(slotAddKey(const GpgME::Key&)) ); - QStringList fprs; + TQStringList fprs; std::transform( keys.begin(), keys.end(), std::back_inserter( fprs ), ExtractFingerprint() ); const GpgME::Error err = job->start( fprs, mKeyUsage & SecretKeys && !( mKeyUsage & PublicKeys ) ); @@ -685,13 +685,13 @@ bool Kleo::KeySelectionDialog::rememberSelection() const { return mRememberCB && mRememberCB->isChecked() ; } -void Kleo::KeySelectionDialog::slotRMB( Kleo::KeyListViewItem * item, const QPoint & p ) { +void Kleo::KeySelectionDialog::slotRMB( Kleo::KeyListViewItem * item, const TQPoint & p ) { if ( !item ) return; mCurrentContextMenuItem = item; - QPopupMenu menu; - menu.insertItem( i18n( "Recheck Key" ), this, SLOT(slotRecheckKey()) ); + TQPopupMenu menu; + menu.insertItem( i18n( "Recheck Key" ), this, TQT_SLOT(slotRecheckKey()) ); menu.exec( p ); } @@ -725,7 +725,7 @@ void Kleo::KeySelectionDialog::slotCancel() { reject(); } -void Kleo::KeySelectionDialog::slotSearch( const QString & text ) { +void Kleo::KeySelectionDialog::slotSearch( const TQString & text ) { mSearchText = text.stripWhiteSpace().upper(); slotSearch(); } @@ -741,7 +741,7 @@ void Kleo::KeySelectionDialog::slotFilter() { } // OK, so we need to filter: - QRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ ); + TQRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ ); if ( keyIdRegExp.exactMatch( mSearchText ) ) { if ( mSearchText.startsWith( "0X" ) ) // search for keyID only: @@ -755,7 +755,7 @@ void Kleo::KeySelectionDialog::slotFilter() { } } -void Kleo::KeySelectionDialog::filterByKeyID( const QString & keyID ) { +void Kleo::KeySelectionDialog::filterByKeyID( const TQString & keyID ) { assert( keyID.length() <= 8 ); assert( !keyID.isEmpty() ); // regexp in slotFilter should prevent these if ( keyID.isEmpty() ) @@ -765,33 +765,33 @@ void Kleo::KeySelectionDialog::filterByKeyID( const QString & keyID ) { item->setVisible( item->text( 0 ).upper().startsWith( keyID ) ); } -static bool anyUIDMatches( const Kleo::KeyListViewItem * item, QRegExp & rx ) { +static bool anyUIDMatches( const Kleo::KeyListViewItem * item, TQRegExp & rx ) { if ( !item ) return false; const std::vector<GpgME::UserID> uids = item->key().userIDs(); for ( std::vector<GpgME::UserID>::const_iterator it = uids.begin() ; it != uids.end() ; ++it ) - if ( it->id() && rx.search( QString::fromUtf8( it->id() ) ) >= 0 ) + if ( it->id() && rx.search( TQString::fromUtf8( it->id() ) ) >= 0 ) return true; return false; } -void Kleo::KeySelectionDialog::filterByKeyIDOrUID( const QString & str ) { +void Kleo::KeySelectionDialog::filterByKeyIDOrUID( const TQString & str ) { assert( !str.isEmpty() ); // match beginnings of words: - QRegExp rx( "\\b" + QRegExp::escape( str ), false ); + TQRegExp rx( "\\b" + TQRegExp::escape( str ), false ); for ( KeyListViewItem * item = mKeyListView->firstChild() ; item ; item = item->nextSibling() ) item->setVisible( item->text( 0 ).upper().startsWith( str ) || anyUIDMatches( item, rx ) ); } -void Kleo::KeySelectionDialog::filterByUID( const QString & str ) { +void Kleo::KeySelectionDialog::filterByUID( const TQString & str ) { assert( !str.isEmpty() ); // match beginnings of words: - QRegExp rx( "\\b" + QRegExp::escape( str ), false ); + TQRegExp rx( "\\b" + TQRegExp::escape( str ), false ); for ( KeyListViewItem * item = mKeyListView->firstChild() ; item ; item = item->nextSibling() ) item->setVisible( anyUIDMatches( item, rx ) ); diff --git a/certmanager/lib/ui/keyselectiondialog.h b/certmanager/lib/ui/keyselectiondialog.h index f274398b1..efb87d5e6 100644 --- a/certmanager/lib/ui/keyselectiondialog.h +++ b/certmanager/lib/ui/keyselectiondialog.h @@ -83,21 +83,21 @@ namespace Kleo { ValidTrustedEncryptionKeys = AllKeys | EncryptionKeys | ValidKeys | TrustedKeys }; - KeySelectionDialog( const QString & title, - const QString & text, + KeySelectionDialog( const TQString & title, + const TQString & text, const std::vector<GpgME::Key> & selectedKeys=std::vector<GpgME::Key>(), unsigned int keyUsage=AllKeys, bool extendedSelection=false, bool rememberChoice=false, - QWidget * parent=0, const char * name=0, + TQWidget * parent=0, const char * name=0, bool modal=true ); - KeySelectionDialog( const QString & title, - const QString & text, - const QString & initialPattern, + KeySelectionDialog( const TQString & title, + const TQString & text, + const TQString & initialPattern, unsigned int keyUsage=AllKeys, bool extendedSelection=false, bool rememberChoice=false, - QWidget * parent=0, const char * name=0, + TQWidget * parent=0, const char * name=0, bool modal=true ); ~KeySelectionDialog(); @@ -105,18 +105,18 @@ namespace Kleo { Otherwise it returns a null key. */ const GpgME::Key & selectedKey() const; - QString fingerprint() const; + TQString fingerprint() const; /** Returns a list of selected key IDs. */ const std::vector<GpgME::Key> & selectedKeys() const { return mSelectedKeys; } /// Return all the selected fingerprints - QStringList fingerprints() const; + TQStringList fingerprints() const; /// Return the selected openpgp fingerprints - QStringList pgpKeyFingerprints() const; + TQStringList pgpKeyFingerprints() const; /// Return the selected smime fingerprints - QStringList smimeFingerprints() const; + TQStringList smimeFingerprints() const; bool rememberSelection() const; protected slots: @@ -125,7 +125,7 @@ namespace Kleo { void slotHelp(); // Could be used by derived classes to insert their own widget - QVBoxLayout* topLayout() const { return mTopLayout; } + TQVBoxLayout* topLayout() const { return mTopLayout; } private slots: void slotRereadKeys(); @@ -134,21 +134,21 @@ namespace Kleo { void slotSelectionChanged(); void slotCheckSelection() { slotCheckSelection( 0 ); } void slotCheckSelection( Kleo::KeyListViewItem * ); - void slotRMB( Kleo::KeyListViewItem *, const QPoint & ); + void slotRMB( Kleo::KeyListViewItem *, const TQPoint & ); void slotRecheckKey(); void slotTryOk(); void slotOk(); void slotCancel(); - void slotSearch( const QString & text ); + void slotSearch( const TQString & text ); void slotSearch(); void slotFilter(); private: - void filterByKeyID( const QString & keyID ); - void filterByKeyIDOrUID( const QString & keyID ); - void filterByUID( const QString & uid ); + void filterByKeyID( const TQString & keyID ); + void filterByKeyIDOrUID( const TQString & keyID ); + void filterByUID( const TQString & uid ); void showAllItems(); - bool anyChildMatches( const Kleo::KeyListViewItem * item, QRegExp & rx ) const; + bool anyChildMatches( const Kleo::KeyListViewItem * item, TQRegExp & rx ) const; void connectSignals(); void disconnectSignals(); @@ -156,20 +156,20 @@ namespace Kleo { void startKeyListJobForBackend( const Kleo::CryptoBackend::Protocol *, const std::vector<GpgME::Key> &, bool ); void startValidatingKeyListing(); - void init( bool, bool, const QString &, const QString & ); + void init( bool, bool, const TQString &, const TQString & ); private: - QVBoxLayout* mTopLayout; + TQVBoxLayout* mTopLayout; Kleo::KeyListView * mKeyListView; const Kleo::CryptoBackend::Protocol * mOpenPGPBackend; const Kleo::CryptoBackend::Protocol * mSMIMEBackend; - QCheckBox * mRememberCB; + TQCheckBox * mRememberCB; std::vector<GpgME::Key> mSelectedKeys, mKeysToCheck; unsigned int mKeyUsage; - QTimer * mCheckSelectionTimer; - QTimer * mStartSearchTimer; + TQTimer * mCheckSelectionTimer; + TQTimer * mStartSearchTimer; // cross-eventloop temporaries: - QString mSearchText; + TQString mSearchText; Kleo::KeyListViewItem * mCurrentContextMenuItem; int mTruncated, mListJobCount, mSavedOffsetY; }; diff --git a/certmanager/lib/ui/messagebox.cpp b/certmanager/lib/ui/messagebox.cpp index 283d33108..ddce8f04d 100644 --- a/certmanager/lib/ui/messagebox.cpp +++ b/certmanager/lib/ui/messagebox.cpp @@ -47,9 +47,9 @@ #include <ksavefile.h> #include <kguiitem.h> -#include <qtextedit.h> -#include <qtextstream.h> -#include <qvbox.h> +#include <tqtextedit.h> +#include <tqtextstream.h> +#include <tqvbox.h> using namespace Kleo; using namespace GpgME; @@ -71,40 +71,40 @@ static KGuiItem KGuiItem_showAuditLog() { class AuditLogViewer : public KDialogBase { // Q_OBJECT public: - explicit AuditLogViewer( const QString & log, QWidget * parent=0, const char * name=0, WFlags f=0 ) + explicit AuditLogViewer( const TQString & log, TQWidget * parent=0, const char * name=0, WFlags f=0 ) : KDialogBase( parent, name, false, i18n("View GnuPG Audit Log"), Close|User1|User2, Close, false, KGuiItem_save(), KGuiItem_copy() ), - m_textEdit( new QTextEdit( this, "m_textEdit" ) ) + m_textEdit( new TQTextEdit( this, "m_textEdit" ) ) { setWFlags( f ); setMainWidget( m_textEdit ); - m_textEdit->setTextFormat( QTextEdit::RichText ); + m_textEdit->setTextFormat( TQTextEdit::RichText ); m_textEdit->setReadOnly( true ); setAuditLog( log ); } ~AuditLogViewer() {} - void setAuditLog( const QString & log ) { + void setAuditLog( const TQString & log ) { m_textEdit->setText( log ); } private: void slotUser1() { - const QString fileName = KFileDialog::getSaveFileName( QString(), QString(), + const TQString fileName = KFileDialog::getSaveFileName( TQString(), TQString(), this, i18n("Choose File to Save GnuPG Audit Log to") ); if ( fileName.isEmpty() ) return; KSaveFile file( fileName ); - if ( QTextStream * const s = file.textStream() ) { + if ( TQTextStream * const s = file.textStream() ) { *s << m_textEdit->text() << endl; file.close(); } if ( const int err = file.status() ) KMessageBox::error( this, i18n("Couldn't save to file \"%1\": %2") - .arg( file.name(), QString::fromLocal8Bit( strerror( err ) ) ), + .arg( file.name(), TQString::fromLocal8Bit( strerror( err ) ) ), i18n("File Save Error") ); } void slotUser2() { @@ -114,13 +114,13 @@ private: } private: - QTextEdit * m_textEdit; + TQTextEdit * m_textEdit; }; } // anon namespace // static -void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & caption ) { +void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & caption ) { if ( !job ) return; @@ -131,7 +131,7 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca return; } - const QString log = job->auditLogAsHtml(); + const TQString log = job->auditLogAsHtml(); if ( log.isEmpty() ) { KMessageBox::information( parent, i18n("No GnuPG Audit Log available for this operation."), i18n("No GnuPG Audit Log") ); @@ -142,112 +142,112 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca } // static -void MessageBox::auditLog( QWidget * parent, const QString & log, const QString & caption ) { +void MessageBox::auditLog( TQWidget * parent, const TQString & log, const TQString & caption ) { AuditLogViewer * const alv = new AuditLogViewer( "<qt>" + log + "</qt>", parent, "alv", Qt::WDestructiveClose ); alv->setCaption( caption ); alv->show(); } // static -void MessageBox::auditLog( QWidget * parent, const Job * job ) { +void MessageBox::auditLog( TQWidget * parent, const Job * job ) { auditLog( parent, job, i18n("GnuPG Audit Log Viewer") ); } // static -void MessageBox::auditLog( QWidget * parent, const QString & log ) { +void MessageBox::auditLog( TQWidget * parent, const TQString & log ) { auditLog( parent, log, i18n("GnuPG Audit Log Viewer") ); } -static QString to_information_string( const SigningResult & result ) { +static TQString to_information_string( const SigningResult & result ) { return result.error() - ? i18n("Signing failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) ) + ? i18n("Signing failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) ) : i18n("Signing successful") ; } -static QString to_error_string( const SigningResult & result ) { +static TQString to_error_string( const SigningResult & result ) { return to_information_string( result ); } -static QString to_information_string( const EncryptionResult & result ) { +static TQString to_information_string( const EncryptionResult & result ) { return result.error() - ? i18n("Encryption failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) ) + ? i18n("Encryption failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) ) : i18n("Encryption successful") ; } -static QString to_error_string( const EncryptionResult & result ) { +static TQString to_error_string( const EncryptionResult & result ) { return to_information_string( result ); } -static QString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) { +static TQString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) { return to_information_string( sresult ) + '\n' + to_information_string( eresult ); } -static QString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) { +static TQString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) { return to_information_string( sresult, eresult ); } // static -void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, int options ) { +void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, int options ) { information( parent, result, job, i18n("Signing Result"), options ); } // static -void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) { - make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options ); +void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) { + make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options ); } // static -void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, int options ) { +void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, int options ) { error( parent, result, job, i18n("Signing Error"), options ); } // static -void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) { - make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options ); +void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) { + make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options ); } // static -void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) { +void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) { information( parent, result, job, i18n("Encryption Result"), options ); } // static -void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) { - make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options ); +void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) { + make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options ); } // static -void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) { +void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) { error( parent, result, job, i18n("Encryption Error"), options ); } // static -void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) { - make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options ); +void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) { + make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options ); } // static -void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) { +void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) { information( parent, sresult, eresult, job, i18n("Encryption Result"), options ); } // static -void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) { - make( parent, QMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options ); +void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) { + make( parent, TQMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options ); } // static -void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) { +void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) { error( parent, sresult, eresult, job, i18n("Encryption Error"), options ); } // static -void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) { - make( parent, QMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options ); +void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) { + make( parent, TQMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options ); } // static -void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString & text, const Job * job, const QString & caption, int options ) { +void MessageBox::make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Job * job, const TQString & caption, int options ) { KDialogBase * dialog = GpgME::hasFeature( GpgME::AuditLogFeature ) ? new KDialogBase( caption, KDialogBase::Yes | KDialogBase::No, KDialogBase::Yes, KDialogBase::Yes, @@ -260,6 +260,6 @@ void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString & if ( options & KMessageBox::PlainCaption ) dialog->setPlainCaption( caption ); - if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, QStringList(), QString::null, 0, options ) ) + if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString::null, 0, options ) ) auditLog( 0, job ); } diff --git a/certmanager/lib/ui/messagebox.h b/certmanager/lib/ui/messagebox.h index a84f86e11..dad984d06 100644 --- a/certmanager/lib/ui/messagebox.h +++ b/certmanager/lib/ui/messagebox.h @@ -53,28 +53,28 @@ namespace Kleo { class MessageBox { public: - static void information( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify ); - static void information( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); - static void error( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify ); - static void error( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); - - static void information( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify ); - static void information( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); - static void error( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify ); - static void error( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); - - static void information( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify ); - static void information( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify ); - static void error( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify ); - static void error( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify ); - - static void auditLog( QWidget * parent, const Kleo::Job * job, const QString & caption ); - static void auditLog( QWidget * parent, const Kleo::Job * job ); - static void auditLog( QWidget * parent, const QString & log, const QString & caption ); - static void auditLog( QWidget * parent, const QString & log ); + static void information( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify ); + static void information( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); + static void error( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify ); + static void error( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); + + static void information( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify ); + static void information( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); + static void error( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify ); + static void error( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify ); + + static void information( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify ); + static void information( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify ); + static void error( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify ); + static void error( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify ); + + static void auditLog( TQWidget * parent, const Kleo::Job * job, const TQString & caption ); + static void auditLog( TQWidget * parent, const Kleo::Job * job ); + static void auditLog( TQWidget * parent, const TQString & log, const TQString & caption ); + static void auditLog( TQWidget * parent, const TQString & log ); private: - static void make( QWidget * parent, QMessageBox::Icon icon, const QString & text, const Kleo::Job * job, const QString & caption, int options ); + static void make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Kleo::Job * job, const TQString & caption, int options ); }; diff --git a/certmanager/lib/ui/passphrasedialog.cpp b/certmanager/lib/ui/passphrasedialog.cpp index 5915387f5..a0bc7295e 100644 --- a/certmanager/lib/ui/passphrasedialog.cpp +++ b/certmanager/lib/ui/passphrasedialog.cpp @@ -56,33 +56,33 @@ #include <kiconloader.h> #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qfontmetrics.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqfontmetrics.h> struct Kleo::PassphraseDialog::Private { KPasswordEdit * lineedit; }; -Kleo::PassphraseDialog::PassphraseDialog( const QString & msg, const QString & caption, - QWidget * parent, const char * name, bool modal ) +Kleo::PassphraseDialog::PassphraseDialog( const TQString & msg, const TQString & caption, + TQWidget * parent, const char * name, bool modal ) : KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok ), d( 0 ) { d = new Private(); - QWidget * w = new QWidget( this ); + TQWidget * w = new TQWidget( this ); setMainWidget( w ); - QHBoxLayout * hlay = new QHBoxLayout( w, 0, spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( w, 0, spacingHint() ); - QLabel * label = new QLabel( w ); + TQLabel * label = new TQLabel( w ); label->setPixmap( DesktopIcon( "pgp-keys", KIcon::SizeMedium ) ); hlay->addWidget( label, 0, AlignTop ); - QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing + TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing - vlay->addWidget( new QLabel( msg.isEmpty() ? i18n("Please enter your passphrase:") : msg, w ) ); + vlay->addWidget( new TQLabel( msg.isEmpty() ? i18n("Please enter your passphrase:") : msg, w ) ); d->lineedit = new KPasswordEdit( KPasswordEdit::OneStar, w, "d->lineedit" ); d->lineedit->setMinimumWidth( fontMetrics().width("*") * 20 ); @@ -90,7 +90,7 @@ Kleo::PassphraseDialog::PassphraseDialog( const QString & msg, const QString & c vlay->addWidget( d->lineedit ); - connect( d->lineedit, SIGNAL(returnPressed()), SLOT(slotOk()) ); + connect( d->lineedit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOk()) ); disableResize(); } diff --git a/certmanager/lib/ui/passphrasedialog.h b/certmanager/lib/ui/passphrasedialog.h index 12a434e13..43b540427 100644 --- a/certmanager/lib/ui/passphrasedialog.h +++ b/certmanager/lib/ui/passphrasedialog.h @@ -56,9 +56,9 @@ namespace Kleo { class PassphraseDialog : public KDialogBase { Q_OBJECT public: - PassphraseDialog( const QString & description, - const QString & caption=QString::null, - QWidget * parent=0, const char * name=0, + PassphraseDialog( const TQString & description, + const TQString & caption=TQString::null, + TQWidget * parent=0, const char * name=0, bool modal=true ); ~PassphraseDialog(); diff --git a/certmanager/lib/ui/progressbar.cpp b/certmanager/lib/ui/progressbar.cpp index 96f51fa8a..1b14868d6 100644 --- a/certmanager/lib/ui/progressbar.cpp +++ b/certmanager/lib/ui/progressbar.cpp @@ -33,26 +33,26 @@ #include "config.h" #include "progressbar.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> static const int busyTimerTickInterval = 100; static const int busyTimerTickIncrement = 5; -Kleo::ProgressBar::ProgressBar( QWidget * parent, const char * name, WFlags f ) - : QProgressBar( 0, parent, name, f ), +Kleo::ProgressBar::ProgressBar( TQWidget * parent, const char * name, WFlags f ) + : TQProgressBar( 0, parent, name, f ), mRealProgress( -1 ) { - mBusyTimer = new QTimer( this ); - connect( mBusyTimer, SIGNAL(timeout()), SLOT(slotBusyTimerTick()) ); + mBusyTimer = new TQTimer( this ); + connect( mBusyTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBusyTimerTick()) ); fixup( true ); } -void Kleo::ProgressBar::slotProgress( const QString &, int cur, int tot ) { +void Kleo::ProgressBar::slotProgress( const TQString &, int cur, int tot ) { setProgress( cur, tot ); } -void Kleo::ProgressBar::slotProgress( const QString &, int, int cur, int tot ) { +void Kleo::ProgressBar::slotProgress( const TQString &, int, int cur, int tot ) { setProgress( cur, tot ); } @@ -60,7 +60,7 @@ void Kleo::ProgressBar::setTotalSteps( int total ) { kdDebug() << "Kleo::ProgressBar::setTotalSteps( " << total << " )" << endl; if ( total == totalSteps() ) return; - QProgressBar::setTotalSteps( 0 ); + TQProgressBar::setTotalSteps( 0 ); fixup( false ); } @@ -78,12 +78,12 @@ void Kleo::ProgressBar::reset() { void Kleo::ProgressBar::slotBusyTimerTick() { fixup( false ); if ( mBusyTimer->isActive() ) - QProgressBar::setProgress( QProgressBar::progress() + busyTimerTickIncrement ); + TQProgressBar::setProgress( TQProgressBar::progress() + busyTimerTickIncrement ); } void Kleo::ProgressBar::fixup( bool newValue ) { - const int cur = QProgressBar::progress(); - const int tot = QProgressBar::totalSteps(); + const int cur = TQProgressBar::progress(); + const int tot = TQProgressBar::totalSteps(); kdDebug() << "Kleo::ProgressBar::startStopBusyTimer() cur = " << cur << "; tot = " << tot << "; real = " << mRealProgress << endl; @@ -91,20 +91,20 @@ void Kleo::ProgressBar::fixup( bool newValue ) { kdDebug() << "(new value) switch to reset" << endl; mBusyTimer->stop(); if ( newValue ) - QProgressBar::reset(); + TQProgressBar::reset(); mRealProgress = -1; } else if ( tot == 0 ) { kdDebug() << "(new value) switch or stay in busy" << endl; if ( !mBusyTimer->isActive() ) { mBusyTimer->start( busyTimerTickInterval ); if ( newValue ) - QProgressBar::setProgress( mRealProgress ); + TQProgressBar::setProgress( mRealProgress ); } } else { kdDebug() << "(new value) normal progress" << endl; mBusyTimer->stop(); - if ( QProgressBar::progress() != mRealProgress ) - QProgressBar::setProgress( mRealProgress ); + if ( TQProgressBar::progress() != mRealProgress ) + TQProgressBar::setProgress( mRealProgress ); } } diff --git a/certmanager/lib/ui/progressbar.h b/certmanager/lib/ui/progressbar.h index 41d96796d..1120a0dd4 100644 --- a/certmanager/lib/ui/progressbar.h +++ b/certmanager/lib/ui/progressbar.h @@ -33,23 +33,23 @@ #ifndef __KLEO_PROGRESSBAR_H__ #define __KLEO_PROGRESSBAR_H__ -#include <qprogressbar.h> +#include <tqprogressbar.h> #include <kdepimmacros.h> class QTimer; namespace Kleo { /** - @short A QProgressBar with self-powered busy indicator + @short A TQProgressBar with self-powered busy indicator */ - class KDE_EXPORT ProgressBar : public QProgressBar { + class KDE_EXPORT ProgressBar : public TQProgressBar { Q_OBJECT public: - ProgressBar( QWidget * parent=0, const char * name=0, WFlags f=0 ); + ProgressBar( TQWidget * parent=0, const char * name=0, WFlags f=0 ); public slots: - void slotProgress( const QString & message, int type, int current, int total ); - void slotProgress( const QString & message, int current, int total ); + void slotProgress( const TQString & message, int type, int current, int total ); + void slotProgress( const TQString & message, int current, int total ); /*! reimplementation to support self-powered busy indicator */ void setProgress( int progress ); /*! reimplementation to support self-powered busy indicator */ @@ -57,7 +57,7 @@ namespace Kleo { /*! reimplementation to support self-powered busy indicator */ void reset(); /*! reimplementation to preserve visibility */ - void setProgress( int cur, int tot ) { QProgressBar::setProgress( cur, tot ); } + void setProgress( int cur, int tot ) { TQProgressBar::setProgress( cur, tot ); } private slots: void slotBusyTimerTick(); @@ -66,7 +66,7 @@ namespace Kleo { void fixup( bool ); private: - QTimer * mBusyTimer; + TQTimer * mBusyTimer; int mRealProgress; }; } diff --git a/certmanager/lib/ui/progressdialog.cpp b/certmanager/lib/ui/progressdialog.cpp index bb66aca17..1418bb65a 100644 --- a/certmanager/lib/ui/progressdialog.cpp +++ b/certmanager/lib/ui/progressdialog.cpp @@ -39,13 +39,13 @@ #include <kdebug.h> #include <klocale.h> -#include <qtimer.h> +#include <tqtimer.h> #include <assert.h> -Kleo::ProgressDialog::ProgressDialog( Job * job, const QString & baseText, - QWidget * creator, const char * name, WFlags f ) - : QProgressDialog( creator, name, false, f ), mBaseText( baseText ) +Kleo::ProgressDialog::ProgressDialog( Job * job, const TQString & baseText, + TQWidget * creator, const char * name, WFlags f ) + : TQProgressDialog( creator, name, false, f ), mBaseText( baseText ) { assert( job ); setBar( new ProgressBar( this, "replacement progressbar in Kleo::ProgressDialog" ) ); @@ -56,13 +56,13 @@ Kleo::ProgressDialog::ProgressDialog( Job * job, const QString & baseText, setLabelText( baseText ); setProgress( 0, 0 ); // activate busy indicator - connect( job, SIGNAL(progress(const QString&,int,int)), - SLOT(slotProgress(const QString&,int,int)) ); - connect( job, SIGNAL(done()), SLOT(slotDone()) ); - connect( this, SIGNAL(canceled()), - job, SLOT(slotCancel()) ); + connect( job, TQT_SIGNAL(progress(const TQString&,int,int)), + TQT_SLOT(slotProgress(const TQString&,int,int)) ); + connect( job, TQT_SIGNAL(done()), TQT_SLOT(slotDone()) ); + connect( this, TQT_SIGNAL(canceled()), + job, TQT_SLOT(slotCancel()) ); - QTimer::singleShot( minimumDuration(), this, SLOT(forceShow()) ); + TQTimer::singleShot( minimumDuration(), this, TQT_SLOT(forceShow()) ); } Kleo::ProgressDialog::~ProgressDialog() { @@ -71,11 +71,11 @@ Kleo::ProgressDialog::~ProgressDialog() { void Kleo::ProgressDialog::setMinimumDuration( int ms ) { if ( 0 < ms && ms < minimumDuration() ) - QTimer::singleShot( ms, this, SLOT(forceShow()) ); - QProgressDialog::setMinimumDuration( ms ); + TQTimer::singleShot( ms, this, TQT_SLOT(forceShow()) ); + TQProgressDialog::setMinimumDuration( ms ); } -void Kleo::ProgressDialog::slotProgress( const QString & what, int current, int total ) { +void Kleo::ProgressDialog::slotProgress( const TQString & what, int current, int total ) { kdDebug(5150) << "Kleo::ProgressDialog::slotProgress( \"" << what << "\", " << current << ", " << total << " )" << endl; if ( mBaseText.isEmpty() ) diff --git a/certmanager/lib/ui/progressdialog.h b/certmanager/lib/ui/progressdialog.h index 0b419aabb..64f53f37b 100644 --- a/certmanager/lib/ui/progressdialog.h +++ b/certmanager/lib/ui/progressdialog.h @@ -33,8 +33,8 @@ #ifndef __KLEO_PROGRESSDIALOG_H__ #define __KLEO_PROGRESSDIALOG_H__ -#include <qprogressdialog.h> -#include <qstring.h> +#include <tqprogressdialog.h> +#include <tqstring.h> #include <kdepimmacros.h> namespace Kleo { @@ -43,11 +43,11 @@ namespace Kleo { /** @short A progress dialog for Kleo::Jobs */ - class KDE_EXPORT ProgressDialog : public QProgressDialog { + class KDE_EXPORT ProgressDialog : public TQProgressDialog { Q_OBJECT public: - ProgressDialog( Job * job, const QString & baseText, - QWidget * creator=0, const char * name=0, WFlags f=0 ); + ProgressDialog( Job * job, const TQString & baseText, + TQWidget * creator=0, const char * name=0, WFlags f=0 ); ~ProgressDialog(); public slots: @@ -55,10 +55,10 @@ namespace Kleo { void setMinimumDuration( int ms ); private slots: - void slotProgress( const QString & what, int current, int total ); + void slotProgress( const TQString & what, int current, int total ); void slotDone(); private: - QString mBaseText; + TQString mBaseText; }; } diff --git a/certmanager/main.cpp b/certmanager/main.cpp index 37545502d..a77788d58 100644 --- a/certmanager/main.cpp +++ b/certmanager/main.cpp @@ -74,8 +74,8 @@ int main( int argc, char** argv ) } CertManager* manager = new CertManager( args->isSet("external"), - QString::fromLocal8Bit(args->getOption("query")), - QString::fromLocal8Bit(args->getOption("import-certificate")) ); + TQString::fromLocal8Bit(args->getOption("query")), + TQString::fromLocal8Bit(args->getOption("import-certificate")) ); args->clear(); manager->show(); diff --git a/certmanager/storedtransferjob.cpp b/certmanager/storedtransferjob.cpp index 589acd702..1aa995e8f 100644 --- a/certmanager/storedtransferjob.cpp +++ b/certmanager/storedtransferjob.cpp @@ -21,39 +21,39 @@ using namespace KIOext; -#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream +#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream StoredTransferJob::StoredTransferJob(const KURL& url, int command, - const QByteArray &packedArgs, - const QByteArray &_staticData, + const TQByteArray &packedArgs, + const TQByteArray &_staticData, bool showProgressInfo) : KIO::TransferJob( url, command, packedArgs, _staticData, showProgressInfo ), m_uploadOffset( 0 ) { - connect( this, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - SLOT( slotData( KIO::Job *, const QByteArray & ) ) ); - connect( this, SIGNAL( dataReq( KIO::Job *, QByteArray & ) ), - SLOT( slotDataReq( KIO::Job *, QByteArray & ) ) ); + connect( this, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); + connect( this, TQT_SIGNAL( dataReq( KIO::Job *, TQByteArray & ) ), + TQT_SLOT( slotDataReq( KIO::Job *, TQByteArray & ) ) ); } -void StoredTransferJob::setData( const QByteArray& arr ) +void StoredTransferJob::setData( const TQByteArray& arr ) { Q_ASSERT( m_data.isNull() ); // check that we're only called once Q_ASSERT( m_uploadOffset == 0 ); // no upload started yet m_data = arr; } -void StoredTransferJob::slotData( KIO::Job *, const QByteArray &data ) +void StoredTransferJob::slotData( KIO::Job *, const TQByteArray &data ) { // check for end-of-data marker: if ( data.size() == 0 ) return; unsigned int oldSize = m_data.size(); - m_data.resize( oldSize + data.size(), QGArray::SpeedOptim ); + m_data.resize( oldSize + data.size(), TQGArray::SpeedOptim ); memcpy( m_data.data() + oldSize, data.data(), data.size() ); } -void StoredTransferJob::slotDataReq( KIO::Job *, QByteArray &data ) +void StoredTransferJob::slotDataReq( KIO::Job *, TQByteArray &data ) { // Inspired from kmail's KMKernel::byteArrayToRemoteFile // send the data in 64 KB chunks @@ -68,7 +68,7 @@ void StoredTransferJob::slotDataReq( KIO::Job *, QByteArray &data ) } else { // send the remaining bytes to the receiver (deep copy) data.duplicate( m_data.data() + m_uploadOffset, remainingBytes ); - m_data = QByteArray(); + m_data = TQByteArray(); m_uploadOffset = 0; //kdDebug() << "Sending " << remainingBytes << " bytes\n"; } @@ -80,17 +80,17 @@ StoredTransferJob *KIOext::storedGet( const KURL& url, bool reload, bool showPro { // Send decoded path and encoded query KIO_ARGS << url; - StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_GET, packedArgs, QByteArray(), showProgressInfo ); + StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_GET, packedArgs, TQByteArray(), showProgressInfo ); if (reload) job->addMetaData("cache", "reload"); return job; } -StoredTransferJob *KIOext::put( const QByteArray& arr, const KURL& url, int permissions, +StoredTransferJob *KIOext::put( const TQByteArray& arr, const KURL& url, int permissions, bool overwrite, bool resume, bool showProgressInfo ) { KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions; - StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_PUT, packedArgs, QByteArray(), showProgressInfo ); + StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_PUT, packedArgs, TQByteArray(), showProgressInfo ); job->setData( arr ); return job; } diff --git a/certmanager/storedtransferjob.h b/certmanager/storedtransferjob.h index 85b591c6b..acc976427 100644 --- a/certmanager/storedtransferjob.h +++ b/certmanager/storedtransferjob.h @@ -27,21 +27,21 @@ namespace KIOext { /** * StoredTransferJob is a TransferJob (for downloading or uploading data) that - * also stores a QByteArray with the data, making it simpler to use than the + * also stores a TQByteArray with the data, making it simpler to use than the * standard TransferJob. * - * For KIO::get it puts the data into the member QByteArray, so the user + * For KIO::get it puts the data into the member TQByteArray, so the user * of this class can get hold of the whole data at once by calling data() * when the result signal is emitted. * You should only use StoredTransferJob to download data if you cannot * process the data by chunks while it's being downloaded, since storing - * everything in a QByteArray can potentially require a lot of memory. + * everything in a TQByteArray can potentially require a lot of memory. * * For KIO::put the user of this class simply provides the bytearray from * the start, and the job takes care of uploading it. * You should only use StoredTransferJob to upload data if you cannot * provide the in chunks while it's being uploaded, since storing - * everything in a QByteArray can potentially require a lot of memory. + * everything in a TQByteArray can potentially require a lot of memory. * */ class StoredTransferJob : public KIO::TransferJob { @@ -58,32 +58,32 @@ public: * @param showProgressInfo true to show progress information to the user */ StoredTransferJob(const KURL& url, int command, - const QByteArray &packedArgs, - const QByteArray &_staticData, + const TQByteArray &packedArgs, + const TQByteArray &_staticData, bool showProgressInfo); /** * Set data to be uploaded. This is for put jobs. - * Automatically called by KIOext::put(const QByteArray &, ...), do not call this yourself. + * Automatically called by KIOext::put(const TQByteArray &, ...), do not call this yourself. */ - void setData( const QByteArray& arr ); + void setData( const TQByteArray& arr ); /** * Get hold of the downloaded data. This is for get jobs. * You're supposed to call this only from the slot connected to the result() signal. */ - QByteArray data() const { return m_data; } + TQByteArray data() const { return m_data; } private slots: - void slotData( KIO::Job *job, const QByteArray &data ); - void slotDataReq( KIO::Job *job, QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); + void slotDataReq( KIO::Job *job, TQByteArray &data ); private: - QByteArray m_data; + TQByteArray m_data; int m_uploadOffset; }; /** - * Get (a.k.a. read), into a single QByteArray. + * Get (a.k.a. read), into a single TQByteArray. * @see StoredTransferJob * * @param url the URL of the file @@ -94,7 +94,7 @@ private: StoredTransferJob *storedGet( const KURL& url, bool reload=false, bool showProgressInfo = true ); /** - * Put (a.k.a. write) data from a single QByteArray. + * Put (a.k.a. write) data from a single TQByteArray. * @see StoredTransferJob * * @param url Where to write data. @@ -105,7 +105,7 @@ private: * @return the job handling the operation. * @see multi_get() */ - StoredTransferJob *put( const QByteArray& arr, const KURL& url, int permissions, + StoredTransferJob *put( const TQByteArray& arr, const KURL& url, int permissions, bool overwrite, bool resume, bool showProgressInfo = true ); } // namespace |