From 627b091fad9df13695f249588e8a58f524eda0fa 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/kdeaddons@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kate/filetemplates/plugin/filetemplates.cpp | 32 +++++++++++----------- kate/filetemplates/plugin/filetemplates.h | 2 +- kate/filetemplates/plugin/katetemplate.xml | 2 +- .../templates/language.xml.katetemplate | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'kate/filetemplates') diff --git a/kate/filetemplates/plugin/filetemplates.cpp b/kate/filetemplates/plugin/filetemplates.cpp index 33639ce..2bae5f8 100644 --- a/kate/filetemplates/plugin/filetemplates.cpp +++ b/kate/filetemplates/plugin/filetemplates.cpp @@ -192,7 +192,7 @@ void KateFileTemplates::updateTemplateDirs(const TQString &d) TQString fname = (*it).section( '/', -1 ); // skip if hidden - if ( hidden.tqcontains( fname ) ) + if ( hidden.contains( fname ) ) continue; // Read the first line of the file, to get the group/name @@ -284,7 +284,7 @@ TQStringList KateFileTemplates::groups() for ( uint i = 0; i < m_templates.count(); i++ ) { s = m_templates.at( i )->group; - if ( ! l.tqcontains( s ) ) + if ( ! l.contains( s ) ) l.append( s ); } @@ -332,7 +332,7 @@ void KateFileTemplates::refreshMenu( PluginView *v ) w.prepend( "

" ); if ( ! w.isEmpty() ) - submenus[m_templates.at( i )->group]->tqfindItem( i )->setWhatsThis( w ); + submenus[m_templates.at( i )->group]->findItem( i )->setWhatsThis( w ); } } @@ -412,7 +412,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) if ( reName.search( tmp ) > -1 ) { docname = reName.cap( 1 ); - docname = docname.tqreplace( "%N", "%1" ); + docname = docname.replace( "%N", "%1" ); doneheader |= 1; } } @@ -458,7 +458,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) if ( ! isTemplate ) { - int d = filename.tqfindRev('.'); + int d = filename.findRev('.'); docname = i18n("Untitled %1"); if ( d > 0 ) docname += filename.mid( d ); } else if ( docname.isEmpty() ) @@ -467,8 +467,8 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) // check for other documents matching this naming scheme, // and do a count before chosing a name for this one TQString p = docname; - p.tqreplace( "%1", "\\d+" ); - p.tqreplace( ".", "\\." ); + p.replace( "%1", "\\d+" ); + p.replace( ".", "\\." ); p.prepend( "^" ); p.append( "$" ); TQRegExp reName( p ); @@ -478,7 +478,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) if ( ( reName.search ( application()->documentManager()->document( i )->docName() ) > -1 ) ) count++; - if ( docname.tqcontains( "%1" ) ) + if ( docname.contains( "%1" ) ) docname = docname.tqarg( count ); doc->setDocName( docname ); @@ -578,7 +578,7 @@ KateTemplateInfoWidget::KateTemplateInfoWidget( TQWidget *tqparent, TemplateInfo l->setBuddy( leDocumentName ); TQWhatsThis::add( leDocumentName, i18n("

This string will be used to set a name " "for the new document, to display in the title bar and file list.

" - "

If the string tqcontains '%N', that will be replaced with a number " + "

If the string contains '%N', that will be replaced with a number " "increasing with each similarly named file.

For example, if the " "Document Name is 'New shellscript (%N).sh', the first document will be " "named 'New shellscript (1).sh', the second 'New shellscipt (2).sh', and " @@ -908,7 +908,7 @@ void KateTemplateWizard::accept() else suggestion = kti->leTemplate->text(); - suggestion.tqreplace(" ", ""); + suggestion.replace(" ", ""); if ( ! suggestion.endsWith(".katetemplate") ) suggestion.append(".katetemplate"); @@ -1005,16 +1005,16 @@ void KateTemplateWizard::accept() { // 3) if the file is not already a template, escape any "%" and "^" in it, // and try do do some replacement of the authors username, name and email. - tmp.tqreplace( TQRegExp("%(?=\\{[^}]+\\})"), "\\%" ); - tmp.tqreplace( TQRegExp("\\$(?=\\{[^}]+\\})"), "\\$" ); - //tmp.tqreplace( "^", "\\^" ); + tmp.replace( TQRegExp("%(?=\\{[^}]+\\})"), "\\%" ); + tmp.replace( TQRegExp("\\$(?=\\{[^}]+\\})"), "\\$" ); + //tmp.replace( "^", "\\^" ); if ( cbRRealname->isChecked() && ! sFullname.isEmpty() ) - tmp.tqreplace( sFullname, "%{realname}" ); + tmp.replace( sFullname, "%{realname}" ); if ( cbREmail->isChecked() && ! sEmail.isEmpty() ) - tmp.tqreplace( sEmail, "%{email}" ); + tmp.replace( sEmail, "%{email}" ); } str += tmp; @@ -1249,6 +1249,6 @@ void KateTemplateManager::slotDownload() //END KateTemplateManager -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; #include "filetemplates.moc" diff --git a/kate/filetemplates/plugin/filetemplates.h b/kate/filetemplates/plugin/filetemplates.h index e6fef30..ec3134c 100644 --- a/kate/filetemplates/plugin/filetemplates.h +++ b/kate/filetemplates/plugin/filetemplates.h @@ -260,4 +260,4 @@ class KateTemplateManager : public TQWidget }; #endif // _PLUGIN_KATE_FILETEMPLATES_H_ -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/filetemplates/plugin/katetemplate.xml b/kate/filetemplates/plugin/katetemplate.xml index 78647d4..0748481 100644 --- a/kate/filetemplates/plugin/katetemplate.xml +++ b/kate/filetemplates/plugin/katetemplate.xml @@ -84,4 +84,4 @@ - + diff --git a/kate/filetemplates/templates/language.xml.katetemplate b/kate/filetemplates/templates/language.xml.katetemplate index 65d677a..420ba84 100644 --- a/kate/filetemplates/templates/language.xml.katetemplate +++ b/kate/filetemplates/templates/language.xml.katetemplate @@ -57,4 +57,4 @@ katetemplate: Description=This template will create the basics of a kate highlig --> - + -- cgit v1.2.1