From 330c33ab6f97b279737bf9527c9add7bb1475450 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/kdevelop@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/antlr/antlr/TokenStreamRewriteEngine.hpp | 28 ++++++------- lib/catalog/catalog.cpp | 4 +- lib/catalog/tag.h | 6 +-- lib/cppparser/ast.h | 2 +- lib/cppparser/driver.h | 4 +- lib/cppparser/lexer.cpp | 4 +- lib/interfaces/codemodel.cpp | 50 +++++++++++------------ lib/interfaces/codemodel_utils.cpp | 2 +- lib/interfaces/codemodel_utils.h | 4 +- lib/interfaces/kdevproject.cpp | 2 +- lib/util/configwidgetproxy.cpp | 4 +- lib/util/configwidgetproxy.h | 2 +- lib/util/filetemplate.cpp | 22 +++++----- lib/util/rurl.cpp | 10 ++--- lib/util/settings.cpp | 4 +- lib/util/urlutil.cpp | 14 +++---- lib/widgets/fancylistviewitem.h | 4 +- lib/widgets/flagboxes.cpp | 18 ++++---- lib/widgets/kdevhtmlpart.cpp | 12 +++--- lib/widgets/ksavealldialog.cpp | 2 +- lib/widgets/processlinemaker.cpp | 4 +- lib/widgets/processlinemaker.h | 2 +- lib/widgets/processwidget.cpp | 6 +-- lib/widgets/propeditor/Mainpage.dox | 2 +- lib/widgets/propeditor/pcombobox.cpp | 2 +- lib/widgets/propeditor/propertyeditor.cpp | 6 +-- lib/widgets/propeditor/propertylist.cpp | 26 ++++++------ lib/widgets/propeditor/propertylist.h | 2 +- lib/widgets/propeditor/propertymachinefactory.cpp | 2 +- lib/widgets/propeditor/qeditlistbox.cpp | 4 +- lib/widgets/qcomboview.cpp | 16 ++++---- 31 files changed, 135 insertions(+), 135 deletions(-) (limited to 'lib') diff --git a/lib/antlr/antlr/TokenStreamRewriteEngine.hpp b/lib/antlr/antlr/TokenStreamRewriteEngine.hpp index 6aa948fe..9fab08c2 100644 --- a/lib/antlr/antlr/TokenStreamRewriteEngine.hpp +++ b/lib/antlr/antlr/TokenStreamRewriteEngine.hpp @@ -34,7 +34,7 @@ namespace antlr { * Useful for dumping out the input stream exactly after doing some * augmentation or other manipulations. Tokens are index from 0..n-1 * - * You can insert stuff, tqreplace, and delete chunks. Note that the + * You can insert stuff, replace, and delete chunks. Note that the * operations are done lazily--only if you convert the buffer to a * String. This is very efficient because you are not moving data around * all the time. As the buffer of tokens is converted to strings, the @@ -262,43 +262,43 @@ public: addToSortedRewriteList(programName, new InsertBeforeOp(index,text)); } - void tqreplace(size_t index, const ANTLR_USE_NAMESPACE(std)string& text) + void replace(size_t index, const ANTLR_USE_NAMESPACE(std)string& text) { - tqreplace(DEFAULT_PROGRAM_NAME, index, index, text); + replace(DEFAULT_PROGRAM_NAME, index, index, text); } - void tqreplace( size_t from, size_t to, + void replace( size_t from, size_t to, const ANTLR_USE_NAMESPACE(std)string& text) { - tqreplace(DEFAULT_PROGRAM_NAME, from, to, text); + replace(DEFAULT_PROGRAM_NAME, from, to, text); } - void tqreplace( RefTokenWithIndex indexT, + void replace( RefTokenWithIndex indexT, const ANTLR_USE_NAMESPACE(std)string& text ) { - tqreplace(DEFAULT_PROGRAM_NAME, indexT->getIndex(), indexT->getIndex(), text); + replace(DEFAULT_PROGRAM_NAME, indexT->getIndex(), indexT->getIndex(), text); } - void tqreplace( RefTokenWithIndex from, + void replace( RefTokenWithIndex from, RefTokenWithIndex to, const ANTLR_USE_NAMESPACE(std)string& text ) { - tqreplace(DEFAULT_PROGRAM_NAME, from, to, text); + replace(DEFAULT_PROGRAM_NAME, from, to, text); } - void tqreplace(const ANTLR_USE_NAMESPACE(std)string& programName, + void replace(const ANTLR_USE_NAMESPACE(std)string& programName, size_t from, size_t to, const ANTLR_USE_NAMESPACE(std)string& text ) { addToSortedRewriteList(programName,new ReplaceOp(from, to, text)); } - void tqreplace( const ANTLR_USE_NAMESPACE(std)string& programName, + void replace( const ANTLR_USE_NAMESPACE(std)string& programName, RefTokenWithIndex from, RefTokenWithIndex to, const ANTLR_USE_NAMESPACE(std)string& text ) { - tqreplace(programName, + replace(programName, from->getIndex(), to->getIndex(), text); @@ -323,13 +323,13 @@ public: void remove( const ANTLR_USE_NAMESPACE(std)string& programName, size_t from, size_t to) { - tqreplace(programName,from,to,""); + replace(programName,from,to,""); } void remove( const ANTLR_USE_NAMESPACE(std)string& programName, RefTokenWithIndex from, RefTokenWithIndex to ) { - tqreplace(programName,from,to,""); + replace(programName,from,to,""); } void discard(int ttype) { diff --git a/lib/catalog/catalog.cpp b/lib/catalog/catalog.cpp index 5ece8b2b..d8bff1bc 100644 --- a/lib/catalog/catalog.cpp +++ b/lib/catalog/catalog.cpp @@ -48,7 +48,7 @@ struct _Catalog_Private bool hasIndex( const TQCString& name ) const { - return indexList.tqcontains( name ); + return indexList.contains( name ); } DB* index( const TQCString& name ) @@ -172,7 +172,7 @@ void Catalog::setEnabled( bool isEnabled ) { Q_ASSERT( d->dbp != 0 ); - TQMap::Iterator it = d->indexList.tqfind( name ); + TQMap::Iterator it = d->indexList.find( name ); if( it == d->indexList.end() ){ DB* dbp = 0; diff --git a/lib/catalog/tag.h b/lib/catalog/tag.h index 426358f4..23b2efef 100644 --- a/lib/catalog/tag.h +++ b/lib/catalog/tag.h @@ -198,7 +198,7 @@ public: } bool hasSpecializationDeclaration() const { - return data->attributes.tqcontains( "spc" ); + return data->attributes.contains( "spc" ); } void setSpecializationDeclaration( const TQString& str ) { @@ -216,7 +216,7 @@ public: name == "endLine" || name == "endColumn" ) return true; - return data->attributes.tqcontains( name ); + return data->attributes.contains( name ); } TQVariant attribute( const TQCString& name ) const @@ -270,7 +270,7 @@ public: } void addTemplateParam( const TQString& param , const TQString& def = "" ) { - TQMap::iterator it = data->attributes.tqfind( "tpl" ); + TQMap::iterator it = data->attributes.find( "tpl" ); if( it != data->attributes.end() && (*it).type() == TQVariant::StringList ) { }else{ it = data->attributes.insert( "tpl", TQVariant( TQStringList() ) ); diff --git a/lib/cppparser/ast.h b/lib/cppparser/ast.h index 58704df9..ccea98e2 100644 --- a/lib/cppparser/ast.h +++ b/lib/cppparser/ast.h @@ -854,7 +854,7 @@ public: class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); } void setParameterDeclarationClause( AUTO_PTR& parameterDeclarationClause ); - // ### tqreplace 'constant' with cvQualify + // ### replace 'constant' with cvQualify AST* constant() { return m_constant.get(); } void setConstant( AST::Node& constant ); diff --git a/lib/cppparser/driver.h b/lib/cppparser/driver.h index 078c420f..01ff0754 100644 --- a/lib/cppparser/driver.h +++ b/lib/cppparser/driver.h @@ -297,7 +297,7 @@ class Driver { */ TQMap dependences( const TQString& fileName ) const; /** - * Get all the macros the driver tqcontains + * Get all the macros the driver contains * @return The macros */ const MacroMap& macros() const; @@ -306,7 +306,7 @@ class Driver { * Take all macros from the given map(forgetting own macros) */ void insertMacros( const MacroSet& macros ); /** - * Get the list of problem areas the driver tqcontains + * Get the list of problem areas the driver contains * @param fileName The filename to get problems for * @return The list of problems for @p fileName */ diff --git a/lib/cppparser/lexer.cpp b/lib/cppparser/lexer.cpp index b62cce32..1b98708f 100644 --- a/lib/cppparser/lexer.cpp +++ b/lib/cppparser/lexer.cpp @@ -82,7 +82,7 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.tqcontains(name) ) + if( scope.contains(name) ) return true; } @@ -96,7 +96,7 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.tqcontains(name) ) + if( scope.contains(name) ) return scope[ name ]; } diff --git a/lib/interfaces/codemodel.cpp b/lib/interfaces/codemodel.cpp index 3d4bbe63..e2e211ad 100644 --- a/lib/interfaces/codemodel.cpp +++ b/lib/interfaces/codemodel.cpp @@ -380,12 +380,12 @@ const FileList CodeModel::fileList( ) const bool CodeModel::hasFile( const TQString & name ) const { - return m_files.tqcontains( name ); + return m_files.contains( name ); } FileDom CodeModel::fileByName( const TQString & name ) { - TQMap::const_iterator it = m_files.tqfind( name ); + TQMap::const_iterator it = m_files.find( name ); if( it != m_files.end() ) { return *it; } else { @@ -395,7 +395,7 @@ FileDom CodeModel::fileByName( const TQString & name ) const FileDom CodeModel::fileByName( const TQString & name ) const { - TQMap::const_iterator it = m_files.tqfind( name ); + TQMap::const_iterator it = m_files.find( name ); if( it != m_files.end() ) { return *it; } else { @@ -502,7 +502,7 @@ bool CodeModel::addFile( FileDom file ) if( file->name().isEmpty() ) return false; - if( m_files.tqfind( file->name() ) != m_files.end() ) { + if( m_files.find( file->name() ) != m_files.end() ) { ///the error-channel is set to 9007 because this problem appears with the cpp-support, so it is needed while debugging it kdDebug(9007) << "file " << file->name() << " was added to code-model without removing it before! \n" << kdBacktrace() << endl; removeFile( fileByName( file->name() ) ); @@ -679,17 +679,17 @@ const NamespaceList NamespaceModel::namespaceList( ) const NamespaceDom NamespaceModel::namespaceByName( const TQString & name ) { - return m_namespaces.tqcontains( name ) ? m_namespaces[ name ] : NamespaceDom(); + return m_namespaces.contains( name ) ? m_namespaces[ name ] : NamespaceDom(); } const NamespaceDom NamespaceModel::namespaceByName( const TQString & name ) const { - return m_namespaces.tqcontains( name ) ? m_namespaces[ name ] : NamespaceDom(); + return m_namespaces.contains( name ) ? m_namespaces[ name ] : NamespaceDom(); } bool NamespaceModel::hasNamespace( const TQString & name ) const { - return m_namespaces.tqcontains( name ); + return m_namespaces.contains( name ); } bool NamespaceModel::addNamespace( NamespaceDom ns ) @@ -760,17 +760,17 @@ const ClassList ClassModel::classList( ) const bool ClassModel::hasClass( const TQString & name ) const { - return m_classes.tqcontains( name ); + return m_classes.contains( name ); } ClassList ClassModel::classByName( const TQString & name ) { - return m_classes.tqcontains( name ) ? m_classes[ name ] : ClassList(); + return m_classes.contains( name ) ? m_classes[ name ] : ClassList(); } const ClassList ClassModel::classByName( const TQString & name ) const { - return m_classes.tqcontains( name ) ? m_classes[ name ] : ClassList(); + return m_classes.contains( name ) ? m_classes[ name ] : ClassList(); } bool ClassModel::addClass( ClassDom klass ) @@ -816,17 +816,17 @@ const FunctionList ClassModel::functionList( ) const bool ClassModel::hasFunction( const TQString & name ) const { - return m_functions.tqcontains( name ); + return m_functions.contains( name ); } FunctionList ClassModel::functionByName( const TQString & name ) { - return m_functions.tqcontains( name ) ? m_functions[ name ] : FunctionList(); + return m_functions.contains( name ) ? m_functions[ name ] : FunctionList(); } const FunctionList ClassModel::functionByName( const TQString & name ) const { - return m_functions.tqcontains( name ) ? m_functions[ name ] : FunctionList(); + return m_functions.contains( name ) ? m_functions[ name ] : FunctionList(); } bool ClassModel::addFunction( FunctionDom fun ) @@ -872,17 +872,17 @@ const FunctionDefinitionList ClassModel::functionDefinitionList( ) const bool ClassModel::hasFunctionDefinition( const TQString & name ) const { - return m_functionDefinitions.tqcontains( name ); + return m_functionDefinitions.contains( name ); } FunctionDefinitionList ClassModel::functionDefinitionByName( const TQString & name ) { - return m_functionDefinitions.tqcontains( name ) ? m_functionDefinitions[ name ] : FunctionDefinitionList(); + return m_functionDefinitions.contains( name ) ? m_functionDefinitions[ name ] : FunctionDefinitionList(); } const FunctionDefinitionList ClassModel::functionDefinitionByName( const TQString & name ) const { - return m_functionDefinitions.tqcontains( name ) ? m_functionDefinitions[ name ] : FunctionDefinitionList(); + return m_functionDefinitions.contains( name ) ? m_functionDefinitions[ name ] : FunctionDefinitionList(); } bool ClassModel::addFunctionDefinition( FunctionDefinitionDom fun ) @@ -914,17 +914,17 @@ const VariableList ClassModel::variableList( ) const VariableDom ClassModel::variableByName( const TQString & name ) { - return m_variables.tqcontains( name ) ? m_variables[ name ] : VariableDom(); + return m_variables.contains( name ) ? m_variables[ name ] : VariableDom(); } const VariableDom ClassModel::variableByName( const TQString & name ) const { - return m_variables.tqcontains( name ) ? m_variables[ name ] : VariableDom(); + return m_variables.contains( name ) ? m_variables[ name ] : VariableDom(); } bool ClassModel::hasVariable( const TQString & name ) const { - return m_variables.tqcontains( name ); + return m_variables.contains( name ); } bool ClassModel::addVariable( VariableDom var ) @@ -953,17 +953,17 @@ const EnumList ClassModel::enumList( ) const EnumDom ClassModel::enumByName( const TQString & name ) { - return m_enumerators.tqcontains( name ) ? m_enumerators[ name ] : EnumDom(); + return m_enumerators.contains( name ) ? m_enumerators[ name ] : EnumDom(); } const EnumDom ClassModel::enumByName( const TQString & name ) const { - return m_enumerators.tqcontains( name ) ? m_enumerators[ name ] : EnumDom(); + return m_enumerators.contains( name ) ? m_enumerators[ name ] : EnumDom(); } bool ClassModel::hasEnum( const TQString & name ) const { - return m_enumerators.tqcontains( name ); + return m_enumerators.contains( name ); } bool ClassModel::addEnum( EnumDom e ) @@ -1028,17 +1028,17 @@ const TypeAliasList ClassModel::typeAliasList( ) const bool ClassModel::hasTypeAlias( const TQString & name ) const { - return m_typeAliases.tqcontains( name ); + return m_typeAliases.contains( name ); } TypeAliasList ClassModel::typeAliasByName( const TQString & name ) { - return m_typeAliases.tqcontains( name ) ? m_typeAliases[ name ] : TypeAliasList(); + return m_typeAliases.contains( name ) ? m_typeAliases[ name ] : TypeAliasList(); } const TypeAliasList ClassModel::typeAliasByName( const TQString & name ) const { - return m_typeAliases.tqcontains( name ) ? m_typeAliases[ name ] : TypeAliasList(); + return m_typeAliases.contains( name ) ? m_typeAliases[ name ] : TypeAliasList(); } bool ClassModel::addTypeAlias( TypeAliasDom typeAlias ) diff --git a/lib/interfaces/codemodel_utils.cpp b/lib/interfaces/codemodel_utils.cpp index 5c9c71e9..afb946bd 100644 --- a/lib/interfaces/codemodel_utils.cpp +++ b/lib/interfaces/codemodel_utils.cpp @@ -296,7 +296,7 @@ AllFunctionDefinitions allFunctionDefinitionsDetailed( const FileDom & dom ) bool resultTypesFit( const FunctionDom & dec, const FunctionDefinitionDom & def ) { - if( !def->resultType().tqcontains("::") ) return dec->resultType() == def->resultType(); + if( !def->resultType().contains("::") ) return dec->resultType() == def->resultType(); TQStringList l1 = dec->scope() + TQStringList::split("::", dec->resultType() ); TQStringList l2 = TQStringList::split("::", def->resultType() ); diff --git a/lib/interfaces/codemodel_utils.h b/lib/interfaces/codemodel_utils.h index 14e97656..2879a424 100644 --- a/lib/interfaces/codemodel_utils.h +++ b/lib/interfaces/codemodel_utils.h @@ -462,11 +462,11 @@ class PredAmOwner{ /**@return A list of all functions in the file. @param dom File Dom to look for functions in.*/ FunctionList allFunctions(const FileDom &dom); -/**@return A detailed list of all functions in the file (detailed list tqcontains +/**@return A detailed list of all functions in the file (detailed list contains the information about a scope of each FunctionDom found). @param dom File Dom to look for functions in.*/ AllFunctions allFunctionsDetailed(const FileDom &dom); -/**@return A detailed list of all function definitions in the file (detailed list tqcontains +/**@return A detailed list of all function definitions in the file (detailed list contains the information about a scope of each FunctionDefinitionDom found). @param dom File Dom to look for functions in.*/ AllFunctionDefinitions allFunctionDefinitionsDetailed(const FileDom &dom); diff --git a/lib/interfaces/kdevproject.cpp b/lib/interfaces/kdevproject.cpp index 1c334a8d..fe495ea1 100644 --- a/lib/interfaces/kdevproject.cpp +++ b/lib/interfaces/kdevproject.cpp @@ -80,7 +80,7 @@ KDevProject::Options KDevProject::options() const bool KDevProject::isProjectFile( const TQString & absFileName ) { - return d->m_absToRel.tqcontains( absFileName ); + return d->m_absToRel.contains( absFileName ); } TQString KDevProject::relativeProjectFile( const TQString & absFileName ) diff --git a/lib/util/configwidgetproxy.cpp b/lib/util/configwidgetproxy.cpp index 5ce6becf..3396adfd 100644 --- a/lib/util/configwidgetproxy.cpp +++ b/lib/util/configwidgetproxy.cpp @@ -92,7 +92,7 @@ void ConfigWidgetProxy::slotAboutToShowPage( TQWidget * page ) { if ( !page ) return; - PageMap::Iterator it = _pageMap.tqfind( page ); + PageMap::Iterator it = _pageMap.find( page ); if ( it != _pageMap.end() ) { emit insertConfigWidget( static_cast(TQT_TQWIDGET(const_cast(sender()))), page, it.data() ); @@ -102,4 +102,4 @@ void ConfigWidgetProxy::slotAboutToShowPage( TQWidget * page ) #include "configwidgetproxy.moc" -// kate: space-indent off; indent-width 4; tqreplace-tabs off; tab-width 4; +// kate: space-indent off; indent-width 4; replace-tabs off; tab-width 4; diff --git a/lib/util/configwidgetproxy.h b/lib/util/configwidgetproxy.h index c35c09c9..b91bf3f7 100644 --- a/lib/util/configwidgetproxy.h +++ b/lib/util/configwidgetproxy.h @@ -127,4 +127,4 @@ private: #endif -// kate: space-indent off; indent-width 4; tqreplace-tabs off; tab-width 4; +// kate: space-indent off; indent-width 4; replace-tabs off; tab-width 4; diff --git a/lib/util/filetemplate.cpp b/lib/util/filetemplate.cpp index f153642f..c3538040 100644 --- a/lib/util/filetemplate.cpp +++ b/lib/util/filetemplate.cpp @@ -73,15 +73,15 @@ TQString FileTemplate::makeSubstitutions( TQDomDocument & dom, const TQString & TQString year = TQString::number(TQDate::tqcurrentDate().year()); TQString str = text; - str.tqreplace(TQRegExp("\\$EMAIL\\$"),email); - str.tqreplace(TQRegExp("\\$AUTHOR\\$"),author); - str.tqreplace(TQRegExp("\\$VERSION\\$"),version); - str.tqreplace(TQRegExp("\\$DATE\\$"),date); - str.tqreplace(TQRegExp("\\$YEAR\\$"),year); - str.tqreplace(TQRegExp("\\$APPNAME\\$"),appname); - str.tqreplace(TQRegExp("\\$APPNAME\\$"),appname); - str.tqreplace(TQRegExp("\\$APPNAMEUC\\$"),appname.upper()); - str.tqreplace(TQRegExp("\\$APPNAMELC\\$"),appname.lower()); + str.replace(TQRegExp("\\$EMAIL\\$"),email); + str.replace(TQRegExp("\\$AUTHOR\\$"),author); + str.replace(TQRegExp("\\$VERSION\\$"),version); + str.replace(TQRegExp("\\$DATE\\$"),date); + str.replace(TQRegExp("\\$YEAR\\$"),year); + str.replace(TQRegExp("\\$APPNAME\\$"),appname); + str.replace(TQRegExp("\\$APPNAME\\$"),appname); + str.replace(TQRegExp("\\$APPNAMEUC\\$"),appname.upper()); + str.replace(TQRegExp("\\$APPNAMELC\\$"),appname.lower()); return str; } @@ -99,8 +99,8 @@ bool FileTemplate::copy(KDevPlugin *part, const TQString &name, TQFileInfo fi(f); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - text.tqreplace(TQRegExp("\\$MODULE\\$"),module); - text.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); + text.replace(TQRegExp("\\$MODULE\\$"),module); + text.replace(TQRegExp("\\$FILENAME\\$"),basefilename); TQTextStream stream(&f); stream << text; diff --git a/lib/util/rurl.cpp b/lib/util/rurl.cpp index 86ca920a..05dac07d 100644 --- a/lib/util/rurl.cpp +++ b/lib/util/rurl.cpp @@ -113,9 +113,9 @@ TQString Name::extension( bool complete ) const { TQString temp = fileName(); if (complete) - return temp.mid(temp.tqfind('.')+1); + return temp.mid(temp.find('.')+1); else - return temp.mid(temp.tqfindRev('.')+1); + return temp.mid(temp.findRev('.')+1); } return TQString(); } @@ -129,10 +129,10 @@ TQString Name::fileName( ) const TQString Name::directory( ) const { - if ( (m_type == File) && (m_rurl.tqfindRev('/') == -1) ) + if ( (m_type == File) && (m_rurl.findRev('/') == -1) ) return TQString(); - return m_rurl.mid(0, m_rurl.tqfindRev('/')+1); + return m_rurl.mid(0, m_rurl.findRev('/')+1); } bool Name::isFile( ) const @@ -159,7 +159,7 @@ bool Name::isValid( ) const { if (m_rurl.startsWith("/")) return false; - if (m_rurl.tqcontains("//")) + if (m_rurl.contains("//")) return false; if ( (m_rurl.endsWith("/")) && (m_type == File) ) return false; diff --git a/lib/util/settings.cpp b/lib/util/settings.cpp index 9855b06b..908df54e 100644 --- a/lib/util/settings.cpp +++ b/lib/util/settings.cpp @@ -46,9 +46,9 @@ TQString Settings::profileByAttributes(const TQString &language, const TQStringL for (TQStringList::const_iterator it = profileKeywords.constBegin(); it != profileKeywords.constEnd(); ++it) { - if (keywords.tqcontains(*it)) + if (keywords.contains(*it)) { - idx = profileKeywords.tqfindIndex(*it); + idx = profileKeywords.findIndex(*it); break; } } diff --git a/lib/util/urlutil.cpp b/lib/util/urlutil.cpp index 5f4d2dcd..d3cbc5e3 100644 --- a/lib/util/urlutil.cpp +++ b/lib/util/urlutil.cpp @@ -37,14 +37,14 @@ /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::filename(const TQString & name) { - int slashPos = name.tqfindRev("/"); + int slashPos = name.findRev("/"); return slashPos<0 ? name : name.mid(slashPos+1); } /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::directory(const TQString & name) { - int slashPos = name.tqfindRev("/"); + int slashPos = name.findRev("/"); return slashPos<0 ? TQString("") : name.left(slashPos); } @@ -103,7 +103,7 @@ TQString URLUtil::relativePath(const TQString & tqparent, const TQString & child /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::upDir(const TQString & path, bool slashSuffix) { - int slashPos = path.tqfindRev("/"); + int slashPos = path.findRev("/"); if (slashPos<1) return TQString(); return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) ); } @@ -132,7 +132,7 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::getExtension(const TQString & path) { - int dotPos = path.tqfindRev('.'); + int dotPos = path.findRev('.'); if (dotPos<0) return TQString(""); return path.mid(dotPos+1); } @@ -143,7 +143,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur { TQString absBase = extractPathNameAbsolute( baseDirUrl ), absRef = extractPathNameAbsolute( url ); - int i = absRef.tqfind( absBase, 0, true ); + int i = absRef.find( absBase, 0, true ); if (i == -1) return TQString(); @@ -151,7 +151,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur if (absRef == absBase) return TQString( "." ); else - return absRef.tqreplace( 0, absBase.length(), TQString() ); + return absRef.replace( 0, absBase.length(), TQString() ); } /////////////////////////////////////////////////////////////////////////////// @@ -298,7 +298,7 @@ TQString URLUtil::envExpand ( const TQString& str ) if (len > 1 && str[0] == '$') { - int pos = str.tqfind ('/'); + int pos = str.find ('/'); if (pos < 0) pos = len; diff --git a/lib/widgets/fancylistviewitem.h b/lib/widgets/fancylistviewitem.h index 9673d8cc..e61beed2 100644 --- a/lib/widgets/fancylistviewitem.h +++ b/lib/widgets/fancylistviewitem.h @@ -53,7 +53,7 @@ class TextPaintStyleStore { } Item& getStyle( int num ) { - Store::Iterator it = m_styles.tqfind( num ); + Store::Iterator it = m_styles.find( num ); if( it != m_styles.end() ) return *it; return m_styles[0]; } @@ -67,7 +67,7 @@ class TextPaintStyleStore { } bool hasStyle( int num ) { - Store::Iterator it = m_styles.tqfind( num ); + Store::Iterator it = m_styles.find( num ); return ( it != m_styles.end() ); } diff --git a/lib/widgets/flagboxes.cpp b/lib/widgets/flagboxes.cpp index 47659fc4..a12c5092 100644 --- a/lib/widgets/flagboxes.cpp +++ b/lib/widgets/flagboxes.cpp @@ -105,12 +105,12 @@ void FlagListBox::readFlags(TQStringList *list) TQListViewItem *item = firstChild(); for (; item; item = item->nextSibling()) { FlagListItem *flitem = static_cast(item); - TQStringList::Iterator sli = list->tqfind(flitem->flag); + TQStringList::Iterator sli = list->find(flitem->flag); if (sli != list->end()) { flitem->setOn(true); list->remove(sli); } - sli = list->tqfind(flitem->off); + sli = list->find(flitem->off); if (sli != list->end()) { flitem->setOn(false); list->remove(sli); @@ -205,13 +205,13 @@ void FlagCheckBoxController::readFlags(TQStringList *list) TQPtrListIterator it(cblist); for (; it.current(); ++it) { FlagCheckBox *fitem = it.current(); - TQStringList::Iterator sli = list->tqfind(fitem->flag); + TQStringList::Iterator sli = list->find(fitem->flag); if (sli != list->end()) { fitem->setChecked(true); fitem->useDef = false; list->remove(sli); } - sli = list->tqfind(fitem->off); + sli = list->find(fitem->off); if (sli != list->end()) { fitem->setChecked(false); fitem->includeOff = true; @@ -270,13 +270,13 @@ void FlagPathEditController::readFlags( TQStringList * list ) if ((*sli).startsWith(peitem->flag)) { // kdDebug() << "Processing.." << endl; - peitem->setText((*sli).tqreplace(TQRegExp(TQRegExp_escape(peitem->flag)),"")); + peitem->setText((*sli).replace(TQRegExp(TQRegExp_escape(peitem->flag)),"")); sli = list->remove(sli); continue; } ++sli; } -/* TQStringList::Iterator sli = list->tqfind(peitem->flag); +/* TQStringList::Iterator sli = list->find(peitem->flag); if (sli != list->end()) { peitem->setText((*sli).remove(peitem->flag)); list->remove(sli); @@ -433,7 +433,7 @@ void FlagRadioButtonController::readFlags(TQStringList *list) TQPtrListIterator it(cblist); for (; it.current(); ++it) { FlagRadioButton *fitem = it.current(); - TQStringList::Iterator sli = list->tqfind(fitem->flag); + TQStringList::Iterator sli = list->find(fitem->flag); if (sli != list->end()) { fitem->setChecked(true); list->remove(sli); @@ -471,7 +471,7 @@ void FlagEditController::readFlags( TQStringList * list ) { if ((*sli).startsWith(peitem->flag)) { - peitem->appendText((*sli).tqreplace(TQRegExp(TQRegExp_escape(peitem->flag)),"")); + peitem->appendText((*sli).replace(TQRegExp(TQRegExp_escape(peitem->flag)),"")); sli = list->remove(sli); continue; } @@ -489,7 +489,7 @@ void FlagEditController::readFlags( TQStringList * list ) { if ((*sli).startsWith(sitem->flag)) { - sitem->setText((*sli).tqreplace(TQRegExp(TQRegExp_escape(sitem->flag)),"")); + sitem->setText((*sli).replace(TQRegExp(TQRegExp_escape(sitem->flag)),"")); sli = list->remove(sli); continue; } diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp index 5bda3bed..220b846a 100644 --- a/lib/widgets/kdevhtmlpart.cpp +++ b/lib/widgets/kdevhtmlpart.cpp @@ -254,7 +254,7 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) { // check for environment variables and make necessary translations TQString path = url; - int nDollarPos = path.tqfind( '$' ); + int nDollarPos = path.find( '$' ); // Note: the while loop below is a copy of code in kdecore/kconfigbase.cpp ;) while( nDollarPos != -1 && nDollarPos+1 < static_cast(path.length())) { @@ -275,7 +275,7 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) result = ts.read().stripWhiteSpace(); pclose(fs); } - path.tqreplace( nDollarPos, nEndPos-nDollarPos, result ); + path.replace( nDollarPos, nEndPos-nDollarPos, result ); } else if( (path)[nDollarPos+1] != '$' ) { uint nEndPos = nDollarPos+1; // the next character is no $ @@ -302,9 +302,9 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) // A environment variables may contain values in 8bit // locale cpecified encoding or in UTF8 encoding. if (isUtf8( pEnv )) - path.tqreplace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); else - path.tqreplace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); } else path.remove( nDollarPos, nEndPos-nDollarPos ); } else { @@ -312,7 +312,7 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) path.remove( nDollarPos, 1 ); nDollarPos++; } - nDollarPos = path.tqfind( '$', nDollarPos ); + nDollarPos = path.find( '$', nDollarPos ); } return path; @@ -494,7 +494,7 @@ void KDevHTMLPart::addHistoryEntry() void KDevHTMLPart::slotCopy( ) { TQString text = selectedText(); - text.tqreplace( TQChar( 0xa0 ), ' ' ); + text.replace( TQChar( 0xa0 ), ' ' ); TQClipboard *cb = TQApplication::tqclipboard(); disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); cb->setText(text); diff --git a/lib/widgets/ksavealldialog.cpp b/lib/widgets/ksavealldialog.cpp index ab267ff2..a2c2d87c 100644 --- a/lib/widgets/ksavealldialog.cpp +++ b/lib/widgets/ksavealldialog.cpp @@ -71,7 +71,7 @@ KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List co KURL::List::ConstIterator it = filelist.begin(); while ( it != filelist.end() ) { - if ( !ignorelist.tqcontains( *it ) ) + if ( !ignorelist.contains( *it ) ) { TQCheckListItem * x = new CheckURL( _listview, *it ); x->setOn( true ); diff --git a/lib/widgets/processlinemaker.cpp b/lib/widgets/processlinemaker.cpp index ad5f307c..8fdbc5d2 100644 --- a/lib/widgets/processlinemaker.cpp +++ b/lib/widgets/processlinemaker.cpp @@ -39,7 +39,7 @@ void ProcessLineMaker::slotReceivedStdout( const char *buffer ) { stdoutbuf += buffer; int pos; - while ( (pos = stdoutbuf.tqfind('\n')) != -1) { + while ( (pos = stdoutbuf.find('\n')) != -1) { TQCString line = stdoutbuf.left( pos ); emit receivedStdoutLine(line); stdoutbuf.remove(0, pos+1); @@ -60,7 +60,7 @@ void ProcessLineMaker::slotReceivedStderr( const char *buffer ) { stderrbuf += buffer; int pos; - while ( (pos = stderrbuf.tqfind('\n')) != -1) { + while ( (pos = stderrbuf.find('\n')) != -1) { TQCString line = stderrbuf.left( pos ); emit receivedStderrLine(line); stderrbuf.remove(0, pos+1); diff --git a/lib/widgets/processlinemaker.h b/lib/widgets/processlinemaker.h index cf5e78e4..f304cdd8 100644 --- a/lib/widgets/processlinemaker.h +++ b/lib/widgets/processlinemaker.h @@ -65,4 +65,4 @@ private: #endif -//kate: tqreplace-tabs off; indent-spaces off; +//kate: replace-tabs off; indent-spaces off; diff --git a/lib/widgets/processwidget.cpp b/lib/widgets/processwidget.cpp index 66796266..cf13248c 100644 --- a/lib/widgets/processwidget.cpp +++ b/lib/widgets/processwidget.cpp @@ -33,9 +33,9 @@ ProcessListBoxItem::ProcessListBoxItem(const TQString &s, Type type) : TQListBoxText(s), t(type) { TQString clean = s; - clean.tqreplace( TQChar('\t'), TQString(" ") ); - clean.tqreplace( TQChar('\n'), TQString() ); - clean.tqreplace( TQChar('\r'), TQString() ); + clean.replace( TQChar('\t'), TQString(" ") ); + clean.replace( TQChar('\n'), TQString() ); + clean.replace( TQChar('\r'), TQString() ); setText( clean ); setCustomHighlighting(true); diff --git a/lib/widgets/propeditor/Mainpage.dox b/lib/widgets/propeditor/Mainpage.dox index 1f98b4ac..6bc81be0 100644 --- a/lib/widgets/propeditor/Mainpage.dox +++ b/lib/widgets/propeditor/Mainpage.dox @@ -56,7 +56,7 @@ called @ref PropertyLib::PropertyMachineFactory. Static function @ref PropertyLi can be used to obtain the reference to the factory instance. Factory creates and returns so-called @ref PropertyLib::Machine for each registered property type (either predefined or user defined). -@ref PropertyLib::Machine tqcontains @ref PropertyLib::PropertyWidget and a list of "detailed" machines. +@ref PropertyLib::Machine contains @ref PropertyLib::PropertyWidget and a list of "detailed" machines. Usually only property widget is necessary for a property but there are complex properties like "Font" for example. We would like to see separate editors for font family, size, etc. and a button to choose all of these in the dialog. diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp index 18cad9b6..7732866c 100644 --- a/lib/widgets/propeditor/pcombobox.cpp +++ b/lib/widgets/propeditor/pcombobox.cpp @@ -58,7 +58,7 @@ void PComboBox::fillBox() TQVariant PComboBox::value() const { - TQMap::const_iterator it = m_valueList.tqfind(m_edit->currentText()); + TQMap::const_iterator it = m_valueList.find(m_edit->currentText()); if (it == m_valueList.end()) return TQVariant(""); return TQVariant(it.data()); diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp index b51ff4fc..c7e5523c 100644 --- a/lib/widgets/propeditor/propertyeditor.cpp +++ b/lib/widgets/propeditor/propertyeditor.cpp @@ -263,7 +263,7 @@ void PropertyEditor::addChildProperties(PropertyItem *tqparent) { MultiProperty *prop = tqparent->property(); //force machine creation to get detailed properties appended to current multiproperty - if ( !m_registeredForType.tqcontains(prop->name()) + if ( !m_registeredForType.contains(prop->name()) && (PropertyMachineFactory::getInstance()->hasDetailedEditors(prop->type())) ) { //FIXME: find better solution @@ -328,10 +328,10 @@ void PropertyEditor::propertyChanged(MultiProperty *property, const TQVariant &v emit changed(); -/* if (m_list->tqcontains(name)) +/* if (m_list->contains(name)) { (*m_list)[name]->setValue(value, false); -// else if (m_detailedList->tqcontains(*/ +// else if (m_detailedList->contains(*/ } void PropertyEditor::hideEditor() diff --git a/lib/widgets/propeditor/propertylist.cpp b/lib/widgets/propeditor/propertylist.cpp index 20feeb43..b831e6d2 100644 --- a/lib/widgets/propeditor/propertylist.cpp +++ b/lib/widgets/propeditor/propertylist.cpp @@ -41,7 +41,7 @@ PropertyList::~PropertyList() MultiProperty *PropertyList::operator[](const TQString &name) { - if (m_list.tqcontains(name)) + if (m_list.contains(name)) return m_list[name]; else return new MultiProperty(this); @@ -49,7 +49,7 @@ MultiProperty *PropertyList::operator[](const TQString &name) MultiProperty *PropertyList::property( const TQString &name ) { - if (m_list.tqcontains(name)) + if (m_list.contains(name)) return m_list[name]; else return new MultiProperty(this); @@ -60,7 +60,7 @@ void PropertyList::addProperty(Property *property) if (property == 0) return; MultiProperty *mp = 0; - if ( m_list.tqcontains(property->name()) ) + if ( m_list.contains(property->name()) ) { mp = m_list[property->name()]; mp->addProperty(property); @@ -79,7 +79,7 @@ void PropertyList::addProperty(const TQString &group, Property *property) return; MultiProperty *mp = 0; - if (m_list.tqcontains(property->name())) + if (m_list.contains(property->name())) { mp = m_list[property->name()]; mp->addProperty(property); @@ -119,7 +119,7 @@ void PropertyList::removeProperty(Property *property) void PropertyList::removeProperty(const TQString &name) { - if (m_list.tqcontains(name)) + if (m_list.contains(name)) { TQString group = m_groupOfProperty[m_list[name]]; removeFromGroup(m_list[name]); @@ -162,7 +162,7 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property) return; //do not add same property to the group twice - if (m_groupOfProperty.tqcontains(property) && (m_groupOfProperty[property] == group)) + if (m_groupOfProperty.contains(property) && (m_groupOfProperty[property] == group)) return; TQPair > *groupPair = 0; @@ -185,7 +185,7 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property) return; } //check if group already contains property with the same name - if (!groupPair->second.tqcontains(property->name())) + if (!groupPair->second.contains(property->name())) groupPair->second.append(property->name()); m_groupOfProperty[property] = group; @@ -217,16 +217,16 @@ void PropertyList::clear( ) removeProperty(it.key()); } -bool PropertyList::tqcontains( const TQString & name ) +bool PropertyList::contains( const TQString & name ) { - if (m_list.tqcontains(name)) + if (m_list.contains(name)) return true; return false; } TQPtrList PropertyList::properties(const TQString &name) { - if (m_list.tqcontains(name)) + if (m_list.contains(name)) return m_list[name]->list; return TQPtrList(); } @@ -309,9 +309,9 @@ void PropertyBuffer::intersect(const PropertyList *list) for (TQMap::iterator it = m_list.begin(); it != m_list.end(); ++it) { // qWarning("intersect:: for mp = %s", it.data()->name().ascii()); - if (list->m_list.tqcontains(it.key())) + if (list->m_list.contains(it.key())) { -/* qWarning("intersect:: list tqcontains %s", it.key().ascii()); +/* qWarning("intersect:: list contains %s", it.key().ascii()); if ( (*(it.data()) == *(list->m_list[it.key()]))) qWarning("intersect:: equal properties"); else @@ -334,7 +334,7 @@ void PropertyBuffer::intersectedValueChanged(Property *property) { // qWarning("PropertyBuffer::intersectedValueChanged"); TQString propertyName = property->name(); - if (!tqcontains(propertyName)) + if (!contains(propertyName)) return; MultiProperty mp(property); diff --git a/lib/widgets/propeditor/propertylist.h b/lib/widgets/propeditor/propertylist.h index c549048b..94baf50d 100644 --- a/lib/widgets/propeditor/propertylist.h +++ b/lib/widgets/propeditor/propertylist.h @@ -118,7 +118,7 @@ public: /**Clears the list of properties.*/ virtual void clear(); /**Returns true if the list of properties contains property with given name.*/ - virtual bool tqcontains(const TQString &name); + virtual bool contains(const TQString &name); /**The list of properties with given name.*/ TQPtrList properties(const TQString &name); diff --git a/lib/widgets/propeditor/propertymachinefactory.cpp b/lib/widgets/propeditor/propertymachinefactory.cpp index cccc3a37..e8390e18 100644 --- a/lib/widgets/propeditor/propertymachinefactory.cpp +++ b/lib/widgets/propeditor/propertymachinefactory.cpp @@ -76,7 +76,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property) TQString propertyName = property->name(); TQMap valueList = property->valueList(); - if (m_registeredForType.tqcontains(propertyName)) + if (m_registeredForType.contains(propertyName)) return (*m_registeredForType[propertyName])(); switch (type) diff --git a/lib/widgets/propeditor/qeditlistbox.cpp b/lib/widgets/propeditor/qeditlistbox.cpp index 565786f0..0c3119da 100644 --- a/lib/widgets/propeditor/qeditlistbox.cpp +++ b/lib/widgets/propeditor/qeditlistbox.cpp @@ -185,7 +185,7 @@ void QEditListBox::typedSomething(const TQString& text) else { StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); - bool enable = (m_listBox->tqfindItem( text, mode ) == 0L); + bool enable = (m_listBox->findItem( text, mode ) == 0L); servNewButton->setEnabled( enable ); } } @@ -256,7 +256,7 @@ void QEditListBox::addItem() else { StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); - alreadyInList =(m_listBox->tqfindItem(currentTextLE, mode) != 0); + alreadyInList =(m_listBox->findItem(currentTextLE, mode) != 0); } } diff --git a/lib/widgets/qcomboview.cpp b/lib/widgets/qcomboview.cpp index 6a53f92b..793c52d2 100644 --- a/lib/widgets/qcomboview.cpp +++ b/lib/widgets/qcomboview.cpp @@ -480,13 +480,13 @@ void QComboView::mousePressEvent( TQMouseEvent *e ) // and thus has a rect that doesn't fit the button. arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); - if ( childCount() && ( !editable() || arrowRect.tqcontains( e->pos() ) ) ) { + if ( childCount() && ( !editable() || arrowRect.contains( e->pos() ) ) ) { d->arrowPressed = FALSE; listView()->blockSignals( TRUE ); tqApp->sendEvent( listView(), e ); // trigger the listbox's autoscroll listView()->blockSignals( FALSE ); popup(); - if ( arrowRect.tqcontains( e->pos() ) ) { + if ( arrowRect.contains( e->pos() ) ) { d->arrowPressed = TRUE; d->arrowDown = TRUE; tqrepaint( FALSE ); @@ -895,7 +895,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) if ( !d->mouseWasInsidePopup ) { // qWarning("!d->mouseWasInsidePopup"); TQPoint pos = e->pos(); - if ( TQT_TQRECT_OBJECT(d->listView()->rect()).tqcontains( pos ) ) + if ( TQT_TQRECT_OBJECT(d->listView()->rect()).contains( pos ) ) d->mouseWasInsidePopup = TRUE; // Check if arrow button should toggle if ( d->arrowPressed ) { @@ -905,7 +905,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, TQStyle::SC_ComboBoxArrow); arrowRect = TQStyle::tqvisualRect(arrowRect, this); - if ( arrowRect.tqcontains( comboPos ) ) { + if ( arrowRect.contains( comboPos ) ) { if ( !d->arrowDown ) { d->arrowDown = TRUE; tqrepaint( FALSE ); @@ -935,7 +935,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) break; case TQEvent::MouseButtonRelease: - if ( TQT_TQRECT_OBJECT(d->listView()->rect()).tqcontains( e->pos() ) ) { + if ( TQT_TQRECT_OBJECT(d->listView()->rect()).contains( e->pos() ) ) { TQMouseEvent tmp( TQEvent::MouseButtonDblClick, e->pos(), e->button(), e->state() ) ; // will hide popup @@ -955,7 +955,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) break; case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonPress: - if ( !TQT_TQRECT_OBJECT(d->listView()->rect()).tqcontains( e->pos() ) ) { + if ( !TQT_TQRECT_OBJECT(d->listView()->rect()).contains( e->pos() ) ) { TQPoint globalPos = d->listView()->mapToGlobal(e->pos()); if ( TQApplication::widgetAt( globalPos, TRUE ) == this ) { d->discardNextMousePress = TRUE; @@ -1085,7 +1085,7 @@ void QComboView::returnPressed() TQListViewItem *c = 0; bool doInsert = TRUE; if ( !d->duplicatesEnabled ) { - c = listView()->tqfindItem(s, 0); + c = listView()->findItem(s, 0); if ( c ) doInsert = FALSE; } @@ -1457,7 +1457,7 @@ void QComboView::setLineEdit( TQLineEdit *edit ) void QComboView::setCurrentText( const TQString& txt ) { TQListViewItem *i; - i = listView()->tqfindItem(txt, 0); + i = listView()->findItem(txt, 0); if ( i ) setCurrentItem( i ); else if ( d->ed ) -- cgit v1.2.1