diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /lib/store | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/store')
-rw-r--r-- | lib/store/KoDirectoryStore.cpp | 4 | ||||
-rw-r--r-- | lib/store/KoStore.cpp | 8 | ||||
-rw-r--r-- | lib/store/KoXmlWriter.cpp | 2 | ||||
-rw-r--r-- | lib/store/tests/xmlwritertest.h | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp index 8cf30788..76e5aa72 100644 --- a/lib/store/KoDirectoryStore.cpp +++ b/lib/store/KoDirectoryStore.cpp @@ -27,7 +27,7 @@ KoDirectoryStore::KoDirectoryStore( const TQString& path, Mode _mode ) : m_basePath( path ) { - const int pos = path.tqfindRev( '/' ); + const int pos = path.findRev( '/' ); // The parameter must include "maindoc.xml" or "content.xml" if ( pos != -1 && pos != (int)m_basePath.length()-1 ) m_basePath = m_basePath.left( pos ); @@ -60,7 +60,7 @@ bool KoDirectoryStore::init( Mode _mode ) bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode ) { //kdDebug(s_area) << "KoDirectoryStore::openReadOrWrite m_currentPath=" << m_currentPath << " name=" << name << endl; - int pos = name.tqfindRev('/'); + int pos = name.findRev('/'); if ( pos != -1 ) // there are subdirs in the name -> maybe need to create them, when writing { pushDirectory(); // remember where we were diff --git a/lib/store/KoStore.cpp b/lib/store/KoStore.cpp index a027bf7e..4a98aa11 100644 --- a/lib/store/KoStore.cpp +++ b/lib/store/KoStore.cpp @@ -208,7 +208,7 @@ bool KoStore::open( const TQString & _name ) if ( m_mode == Write ) { kdDebug(s_area) << "KoStore: opening for writing '" << m_sName << "'" << endl; - if ( m_strFiles.tqfindIndex( m_sName ) != -1 ) // just check if it's there + if ( m_strFiles.findIndex( m_sName ) != -1 ) // just check if it's there { kdWarning(s_area) << "KoStore: Duplicate filename " << m_sName << endl; //return KIO::ERR_FILE_ALREADY_EXIST; @@ -379,7 +379,7 @@ bool KoStore::enterDirectory( const TQString& directory ) bool success = true; TQString tmp( directory ); - while ( ( pos = tmp.tqfind( '/' ) ) != -1 && + while ( ( pos = tmp.find( '/' ) ) != -1 && ( success = enterDirectoryInternal( tmp.left( pos ) ) ) ) tmp = tmp.mid( pos + 1 ); @@ -562,7 +562,7 @@ TQString KoStore::expandEncodedPath( TQString intern ) const TQString result; int pos; - if ( ( pos = intern.tqfindRev( '/', -1 ) ) != -1 ) { + if ( ( pos = intern.findRev( '/', -1 ) ) != -1 ) { result = expandEncodedDirectory( intern.left( pos ) ) + '/'; intern = intern.mid( pos + 1 ); } @@ -595,7 +595,7 @@ TQString KoStore::expandEncodedDirectory( TQString intern ) const TQString result; int pos; - while ( ( pos = intern.tqfind( '/' ) ) != -1 ) { + while ( ( pos = intern.find( '/' ) ) != -1 ) { if ( TQChar(intern.at(0)).isDigit() ) result += "part"; result += intern.left( pos + 1 ); // copy numbers (or "pictures") + "/" diff --git a/lib/store/KoXmlWriter.cpp b/lib/store/KoXmlWriter.cpp index 4260f76f..dca95d8a 100644 --- a/lib/store/KoXmlWriter.cpp +++ b/lib/store/KoXmlWriter.cpp @@ -393,7 +393,7 @@ void KoXmlWriter::addTextSpan( const TQString& text, const TQMap<int, int>& tabC addTextNode( str ); str = TQString(); startElement( "text:tab" ); - if ( tabCache.tqcontains( i ) ) + if ( tabCache.contains( i ) ) addAttribute( "text:tab-ref", tabCache[i] + 1 ); endElement(); break; diff --git a/lib/store/tests/xmlwritertest.h b/lib/store/tests/xmlwritertest.h index b3d305ea..cdafe8a5 100644 --- a/lib/store/tests/xmlwritertest.h +++ b/lib/store/tests/xmlwritertest.h @@ -34,8 +34,8 @@ TQCString s2 = expectedFull; \ if ( s1.length() != s2.length() ) \ qDebug( "got length %d, expected %d", s1.length(), s2.length() ); \ - s1.tqreplace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ - s2.tqreplace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ + s1.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ + s2.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ qDebug( "%s", s1.data() ); \ qDebug( "Expected:\n%s", s2.data() ); \ return 1; /*exit*/ \ |