From 4c6f8d69e2d1501837affb472c4eb8fec4462240 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp | 4 ++-- certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp | 12 ++++++------ certmanager/lib/cryptplugwrapper.cpp | 12 ++++++------ certmanager/lib/cryptplugwrapperlist.cpp | 2 +- certmanager/lib/kleo/dn.cpp | 2 +- certmanager/lib/kleo/downloadjob.h | 2 +- certmanager/lib/tests/test.data | 4 ++-- certmanager/lib/tests/test_gnupgprocessbase.cpp | 2 +- certmanager/lib/ui/cryptoconfigmodule.cpp | 2 +- certmanager/lib/ui/dnattributeorderconfigwidget.cpp | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'certmanager/lib') diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index d179aa95..b1d55ac9 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -158,7 +158,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { static const int startTokenLen = sizeof startToken / sizeof *startToken - 1; int lineStart = 0; - for ( int lineEnd = d->statusBuffer.tqfind( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.tqfind( '\n', lineStart = lineEnd+1 ) ) { + for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) { // get next line: const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); if ( line.isEmpty() ) @@ -179,7 +179,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { TQString cmd; TQStringList args; int tagStart = 0; - for ( int tagEnd = command.tqfind( ' ' ) ; tagEnd >= 0 ; tagEnd = command.tqfind( ' ', tagStart = tagEnd+1 ) ) { + for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) { const TQCString tag = command.mid( tagStart, tagEnd - tagStart ); if ( cmd.isNull() ) cmd = fromHexEscapedUtf8( tag ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp index 31224685..51f8f68c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp @@ -131,7 +131,7 @@ Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const TQString& name { if ( !mParsed ) const_cast( this )->runGpgConf( false ); - return mComponents.tqfind( name ); + return mComponents.find( name ); } void QGpgMECryptoConfig::sync( bool runtime ) @@ -240,7 +240,7 @@ TQStringList QGpgMECryptoConfigComponent::groupList() const Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const TQString& name ) const { - return mGroups.tqfind( name ); + return mGroups.find( name ); } void QGpgMECryptoConfigComponent::sync( bool runtime ) @@ -341,7 +341,7 @@ TQStringList QGpgMECryptoConfigGroup::entryList() const Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const TQString& name ) const { - return mEntries.tqfind( name ); + return mEntries.find( name ); } //// @@ -357,15 +357,15 @@ static TQString gpgconf_escape( const TQString& str ) // Escape special chars (including ':' and '%') 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.tqreplace( ',', "%2c" ); + enc.replace( ',', "%2c" ); return enc; } static TQString urlpart_encode( const TQString& str ) { TQString enc( str ); - enc.tqreplace( '%', "%25" ); // first! - enc.tqreplace( ':', "%3a" ); + enc.replace( '%', "%25" ); // first! + enc.replace( ':', "%3a" ); //kdDebug() << " urlpart_encode: " << str << " -> " << enc << endl; return enc; } diff --git a/certmanager/lib/cryptplugwrapper.cpp b/certmanager/lib/cryptplugwrapper.cpp index 1d35f1c1..4ffc59c9 100644 --- a/certmanager/lib/cryptplugwrapper.cpp +++ b/certmanager/lib/cryptplugwrapper.cpp @@ -468,9 +468,9 @@ TQString CryptPlugWrapper::libName() const TQString CryptPlugWrapper::protocol() const { - if ( _libName.tqcontains( "smime" ) ) + if ( _libName.contains( "smime" ) ) return "SMIME"; - if ( _libName.tqcontains( "openpgp" ) ) + if ( _libName.contains( "openpgp" ) ) return "OpenPGP"; return TQString(); } @@ -485,9 +485,9 @@ TQString CryptPlugWrapper::displayName() const { if ( !_name.isEmpty() ) return _name; - if ( _libName.tqcontains( "smime" ) ) + if ( _libName.contains( "smime" ) ) return "gpgsm"; - if ( _libName.tqcontains( "openpgp" ) ) + if ( _libName.contains( "openpgp" ) ) return "gpg"; return i18n("(Unknown Protocol)"); } @@ -503,10 +503,10 @@ bool CryptPlugWrapper::initialize( InitqStatus* initqStatus, TQString* errorMsg _initqStatus = IniStatus_NoLibName; kdDebug(5150) << "No library name was given.\n" << endl; } else { - if ( _libName.tqcontains( "smime" ) ) { + if ( _libName.contains( "smime" ) ) { _cp = new SMIMECryptPlug(); _config = new Config( GPGME_PROTOCOL_CMS ); - } else if ( _libName.tqcontains( "openpgp" ) ) { + } else if ( _libName.contains( "openpgp" ) ) { _cp = new OpenPGPCryptPlug(); _config = new Config( GPGME_PROTOCOL_OpenPGP ); } else { diff --git a/certmanager/lib/cryptplugwrapperlist.cpp b/certmanager/lib/cryptplugwrapperlist.cpp index 7b1c7572..43f88670 100644 --- a/certmanager/lib/cryptplugwrapperlist.cpp +++ b/certmanager/lib/cryptplugwrapperlist.cpp @@ -28,7 +28,7 @@ CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const TQString & libName ) const { for ( TQPtrListIterator it( *this ) ; it.current() ; ++it ) - if ( (*it)->libName().tqfind( libName, 0, false ) >= 0 ) + if ( (*it)->libName().find( libName, 0, false ) >= 0 ) return *it; return 0; } diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp index 0f0c357d..7e39185c 100644 --- a/certmanager/lib/kleo/dn.cpp +++ b/certmanager/lib/kleo/dn.cpp @@ -309,7 +309,7 @@ reorder_dn( const Kleo::DN::Attribute::List & dn ) { // find all unknown entries in their order of appearance for ( Kleo::DN::const_iterator it = dn.begin(); it != dn.end(); ++it ) - if ( attrOrder.tqfind( (*it).name() ) == attrOrder.end() ) + if ( attrOrder.find( (*it).name() ) == attrOrder.end() ) unknownEntries.push_back( *it ); // process the known attrs in the desired order diff --git a/certmanager/lib/kleo/downloadjob.h b/certmanager/lib/kleo/downloadjob.h index d7f83f24..1583c486 100644 --- a/certmanager/lib/kleo/downloadjob.h +++ b/certmanager/lib/kleo/downloadjob.h @@ -69,7 +69,7 @@ namespace Kleo { /** Starts the download operation. \a fingerprints is a list of fingerprints used to specify the list of keys downloaded. Empty - patterns are ignored. If \a fingerprints is empty, tqcontains + patterns are ignored. If \a fingerprints is empty, contains only empty strings or anything other than fingerprints, the result is undefined. */ diff --git a/certmanager/lib/tests/test.data b/certmanager/lib/tests/test.data index f09481ba..b4bce1a9 100644 --- a/certmanager/lib/tests/test.data +++ b/certmanager/lib/tests/test.data @@ -116,7 +116,7 @@ static int status( void * void_ctx, const char * line ) { static int inquire( void * void_ctx, const char * keyword ) { assuan_context_t ctx = (assuan_context_t)void_ctx; assert( ctx ); - const std::map::const_iterator it = inquireData.tqfind( keyword ); + const std::map::const_iterator it = inquireData.find( keyword ); if ( it == inquireData.end() ) return gpg_error( GPG_ERR_UNKNOWN_COMMAND ); @@ -179,7 +179,7 @@ int main( int argc, char * argv[] ) { options.push_back( argv[++optind] ); } else if ( qstrcmp( arg, "--inquire" ) == 0 ) { const std::string inqval = argv[++optind]; - const size_t pos = inqval.tqfind( '=' ); + const size_t pos = inqval.find( '=' ); // ### implement indirection with "@file"... inquireData[inqval.substr( 0, pos )] = inqval.substr( pos+1 ); } else { diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp index c3ec0c33..c3aba82d 100644 --- a/certmanager/lib/tests/test_gnupgprocessbase.cpp +++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp @@ -88,7 +88,7 @@ static TQStringList split( char * buffer, int buflen, TQString & old ) { } static TQString escape( TQString str ) { - return str.tqreplace( '&', "&" ).tqreplace( '<', "<" ).tqreplace( '>', ">" ); + return str.replace( '&', "&" ).replace( '<', "<" ).replace( '>', ">" ); } void GnuPGViewer::slotStdout( KProcess *, char * buffer, int buflen ) { diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp index cd486a86..9fa55e96 100644 --- a/certmanager/lib/ui/cryptoconfigmodule.cpp +++ b/certmanager/lib/ui/cryptoconfigmodule.cpp @@ -59,7 +59,7 @@ using namespace Kleo; static inline TQPixmap loadIcon( TQString s ) { return KGlobal::instance()->iconLoader() - ->loadIcon( s.tqreplace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); } static unsigned int num_components_with_options( const Kleo::CryptoConfig * config ) { diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp index 6f42393f..46adfe3b 100644 --- a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp +++ b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp @@ -173,7 +173,7 @@ void Kleo::DNAttributeOrderConfigWidget::load() { const TQStringList all = Kleo::DNAttributeMapper::instance()->names(); for ( TQStringList::const_iterator it = all.begin() ; it != all.end() ; ++it ) - if ( order.tqfind( *it ) == order.end() ) + if ( order.find( *it ) == order.end() ) (void)new TQListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) ); if ( !d->placeHolderItem->listView() ) -- cgit v1.2.3