From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- certmanager/lib/cryptplugwrapper.cpp | 68 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'certmanager/lib/cryptplugwrapper.cpp') 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 > reorder( const QValueList< QPair > & dn ) const + TQValueList< QPair > reorder( const TQValueList< QPair > & dn ) const { return reorder( dn, _attrOrder, _unknownAttrsHandling ); } - static QValueList< QPair > reorder( - const QValueList< QPair > & dn, - QStringList attrOrder, + static TQValueList< QPair > reorder( + const TQValueList< QPair > & dn, + TQStringList attrOrder, UnknownAttrsHandling unknownAttrsHandling ) { if( !attrOrder.isEmpty() ){ - QPtrList< QPair > unknownEntries; - QValueList< QPair > dnNew; + TQPtrList< QPair > unknownEntries; + TQValueList< QPair > dnNew; - QPair* unknownEntry; - QStringList::ConstIterator itOrder; - QValueList< QPair >::ConstIterator itDN; + QPair* unknownEntry; + TQStringList::ConstIterator itOrder; + TQValueList< QPair >::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; -- cgit v1.2.1