summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit5173e6fcb16310e130fba4143e334563b4f8460e (patch)
tree52333f9eb0c94f760d4dddc8714671fb50f7b625
parent7b4db4f16d44d4e9aeee241211827558acd64f17 (diff)
downloadkdiff3-5173e6fcb16310e130fba4143e334563b4f8460e.tar.gz
kdiff3-5173e6fcb16310e130fba4143e334563b4f8460e.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rwxr-xr-xdiff_ext_for_kdiff3/diff_ext.cpp14
-rw-r--r--diff_ext_for_kdiff3/diffextstring.h4
-rw-r--r--src/ccInstHelper.cpp2
-rw-r--r--src/common.cpp14
-rw-r--r--src/diff.cpp2
-rw-r--r--src/difftextwindow.cpp4
-rw-r--r--src/directorymergewindow.cpp8
-rw-r--r--src/fileaccess.cpp8
-rw-r--r--src/gnudiff_analyze.cpp2
-rw-r--r--src/gnudiff_diff.h2
-rw-r--r--src/kdiff3_part.cpp2
-rw-r--r--src/kreplacements/kreplacements.cpp6
-rw-r--r--src/kreplacements/kreplacements.h2
-rw-r--r--src/main.cpp4
-rw-r--r--src/mergeresultwindow.cpp8
-rw-r--r--src/optiondialog.cpp6
-rw-r--r--src/pdiff.cpp6
-rw-r--r--src/smalldialogs.cpp4
18 files changed, 49 insertions, 49 deletions
diff --git a/diff_ext_for_kdiff3/diff_ext.cpp b/diff_ext_for_kdiff3/diff_ext.cpp
index af877e7..f83f068 100755
--- a/diff_ext_for_kdiff3/diff_ext.cpp
+++ b/diff_ext_for_kdiff3/diff_ext.cpp
@@ -135,7 +135,7 @@ void readTranslationFile()
static tstring getTranslation( const tstring& fallback )
{
- std::map< std::wstring, std::wstring >::iterator i = s_translationMap.tqfind( fallback );
+ std::map< std::wstring, std::wstring >::iterator i = s_translationMap.find( fallback );
if (i!=s_translationMap.end())
return i->second;
return fallback;
@@ -153,14 +153,14 @@ static tstring getTranslation( const tstring& fallback )
static void replaceArgs( tstring& s, const tstring& r1, const tstring& r2=TEXT(""), const tstring& r3=TEXT("") )
{
tstring arg1 = TEXT("%1");
- size_t pos1 = s.tqfind( arg1 );
+ size_t pos1 = s.find( arg1 );
tstring arg2 = TEXT("%2");
- size_t pos2 = s.tqfind( arg2 );
+ size_t pos2 = s.find( arg2 );
tstring arg3 = TEXT("%3");
- size_t pos3 = s.tqfind( arg3 );
+ size_t pos3 = s.find( arg3 );
if ( pos1 != size_t(-1) )
{
- s.tqreplace( pos1, arg1.length(), r1 );
+ s.replace( pos1, arg1.length(), r1 );
if ( pos2 != size_t(-1) && pos1<pos2 )
pos2 += r1.length() - arg1.length();
if ( pos3 != size_t(-1) && pos1<pos3 )
@@ -168,13 +168,13 @@ static void replaceArgs( tstring& s, const tstring& r1, const tstring& r2=TEXT("
}
if ( pos2 != size_t(-1) )
{
- s.tqreplace( pos2, arg2.length(), r2 );
+ s.replace( pos2, arg2.length(), r2 );
if ( pos3 != size_t(-1) && pos2<pos3 )
pos3 += r2.length() - arg2.length();
}
if ( pos3 != size_t(-1) )
{
- s.tqreplace( pos3, arg3.length(), r3 );
+ s.replace( pos3, arg3.length(), r3 );
}
}
diff --git a/diff_ext_for_kdiff3/diffextstring.h b/diff_ext_for_kdiff3/diffextstring.h
index 0df947e..132512e 100644
--- a/diff_ext_for_kdiff3/diffextstring.h
+++ b/diff_ext_for_kdiff3/diffextstring.h
@@ -108,7 +108,7 @@ class STRING {
return tmp;
}
- STRING& tqreplace( size_t pos, size_t num, const STRING& s )
+ STRING& replace( size_t pos, size_t num, const STRING& s )
{
*this = substr( 0, pos ) + s + substr( pos+num );
return *this;
@@ -118,7 +118,7 @@ class STRING {
return (lstrcmp(_str, s) == 0);
}
- size_t tqfind(const STRING& s) const
+ size_t find(const STRING& s) const
{
const TCHAR* p = _tcsstr( _str, s._str );
if (p)
diff --git a/src/ccInstHelper.cpp b/src/ccInstHelper.cpp
index 643f8f6..055e2d6 100644
--- a/src/ccInstHelper.cpp
+++ b/src/ccInstHelper.cpp
@@ -260,7 +260,7 @@ int integrateWithClearCase( const char* subCommand, const char* kdiff3CommandPat
for( ; i!=lineItemList.end(); ++i )
{
LineItem& li = *i;
- if ((int)toUpper(li.command).tqfind("KDIFF3")>=0)
+ if ((int)toUpper(li.command).find("KDIFF3")>=0)
{
std::list<LineItem>::const_iterator j = lineItemListBak.begin();
for (;j!=lineItemListBak.end();++j)
diff --git a/src/common.cpp b/src/common.cpp
index 4249daf..0a1952e 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -64,7 +64,7 @@ void ValueMap::load( TQTextStream& ts )
while ( !ts.eof() )
{ // until end of file...
TQString s = ts.readLine(); // line of text excluding '\n'
- int pos = s.tqfind('=');
+ int pos = s.find('=');
if( pos > 0 ) // seems not to have a tag
{
TQString key = s.left(pos);
@@ -79,8 +79,8 @@ void ValueMap::load( const TQString& s )
int pos=0;
while ( pos<(int)s.length() )
{ // until end of file...
- int pos2 = s.tqfind('=', pos);
- int pos3 = s.tqfind('\n', pos2 );
+ int pos2 = s.find('=', pos);
+ int pos3 = s.find('\n', pos2 );
if (pos3<0)
pos3=s.length();
if( pos2 > 0 ) // seems not to have a tag
@@ -115,8 +115,8 @@ TQString safeStringJoin(const TQStringList& sl, char sepChar, char metaChar )
for (i=sl.begin(); i!=sl.end(); ++i)
{
TQString s = *i;
- s.tqreplace(meta, meta+meta); // "\" -> "\\"
- s.tqreplace(sep, meta+sep); // "," -> "\,"
+ s.replace(meta, meta+meta); // "\" -> "\\"
+ s.replace(sep, meta+sep); // "," -> "\,"
if ( i==sl.begin() )
safeString = s;
else
@@ -165,14 +165,14 @@ static TQString subSection( const TQString& s, int idx, char sep )
int pos=0;
while( idx>0 )
{
- pos = s.tqfind( sep, pos );
+ pos = s.find( sep, pos );
--idx;
if (pos<0) break;
++pos;
}
if ( pos>=0 )
{
- int pos2 = s.tqfind( sep, pos );
+ int pos2 = s.find( sep, pos );
if ( pos2>0 )
return s.mid(pos, pos2-pos);
else
diff --git a/src/diff.cpp b/src/diff.cpp
index 9ead57f..136275c 100644
--- a/src/diff.cpp
+++ b/src/diff.cpp
@@ -459,7 +459,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic
#ifdef _WIN32
TQString catCmd = "type";
- fileNameIn1.tqreplace( '/', "\\" );
+ fileNameIn1.replace( '/', "\\" );
#else
TQString catCmd = "cat";
#endif
diff --git a/src/difftextwindow.cpp b/src/difftextwindow.cpp
index 93a3770..3c570e4 100644
--- a/src/difftextwindow.cpp
+++ b/src/difftextwindow.cpp
@@ -1250,7 +1250,7 @@ bool DiffTextWindow::findString( const TQString& s, int& d3vLine, int& posInLine
TQString line = d->getString( it );
if ( !line.isEmpty() )
{
- int pos = line.tqfind( s, startPos, bCaseSensitive );
+ int pos = line.find( s, startPos, bCaseSensitive );
if ( pos != -1 )
{
d3vLine = it;
@@ -1427,7 +1427,7 @@ int wordWrap( const TQString& origLine, int nofColumns, Diff3WrapLine* pDiff3Wra
}
else
{
- int wsPos = max2( origLine.tqfindRev( ' ', wrapPos ), origLine.tqfindRev( '\t', wrapPos ) );
+ int wsPos = max2( origLine.findRev( ' ', wrapPos ), origLine.findRev( '\t', wrapPos ) );
if ( wsPos > pos )
{
diff --git a/src/directorymergewindow.cpp b/src/directorymergewindow.cpp
index 4d2481d..ada2eb4 100644
--- a/src/directorymergewindow.cpp
+++ b/src/directorymergewindow.cpp
@@ -1249,7 +1249,7 @@ void DirectoryMergeWindow::prepareListView( ProgressProxy& pp )
// continue;
// Get dirname from fileName: Search for "/" from end:
- int pos = fileName.tqfindRev('/');
+ int pos = fileName.findRev('/');
TQString dirPart;
TQString filePart;
if (pos==-1)
@@ -2481,7 +2481,7 @@ bool DirectoryMergeWindow::mergeFLD( const TQString& nameA,const TQString& nameB
}
// Make sure that the dir exists, into which we will save the file later.
- int pos=nameDest.tqfindRev('/');
+ int pos=nameDest.findRev('/');
if ( pos>0 )
{
TQString parentName = nameDest.left(pos);
@@ -2554,7 +2554,7 @@ bool DirectoryMergeWindow::copyFLD( const TQString& srcName, const TQString& des
return bSuccess;
}
- int pos=destName.tqfindRev('/');
+ int pos=destName.findRev('/');
if ( pos>0 )
{
TQString parentName = destName.left(pos);
@@ -2628,7 +2628,7 @@ bool DirectoryMergeWindow::makeDir( const TQString& name, bool bQuiet )
}
}
- int pos=name.tqfindRev('/');
+ int pos=name.findRev('/');
if ( pos>0 )
{
TQString parentName = name.left(pos);
diff --git a/src/fileaccess.cpp b/src/fileaccess.cpp
index 70855c0..b2457a9 100644
--- a/src/fileaccess.cpp
+++ b/src/fileaccess.cpp
@@ -151,7 +151,7 @@ void FileAccess::setFile( const TQString& name, bool bWantToWrite )
m_url.setPath( m_absFilePath );
}
- if ( !m_bExists && m_absFilePath.tqcontains("@@") )
+ if ( !m_bExists && m_absFilePath.contains("@@") )
{
// Try reading a clearcase file
m_localCopy = FileAccess::tempFileName();
@@ -294,7 +294,7 @@ void FileAccess::setUdsEntry( const KIO::UDSEntry& e )
m_bSymLink = !m_linkTarget.isEmpty();
if ( m_name.isEmpty() )
{
- int pos = m_path.tqfindRev('/') + 1;
+ int pos = m_path.findRev('/') + 1;
m_name = m_path.mid( pos );
}
m_bHidden = m_name[0]=='.';
@@ -1048,7 +1048,7 @@ void CvsIgnoreList::addEntriesFromString(const TQString& str)
{
int posLast(0);
int pos;
- while ((pos = str.tqfind(' ', posLast)) >= 0)
+ while ((pos = str.find(' ', posLast)) >= 0)
{
if (pos > posLast)
addEntry(str.mid(posLast, pos - posLast));
@@ -1132,7 +1132,7 @@ void CvsIgnoreList::addEntry(const TQString& pattern)
bool CvsIgnoreList::matches(const TQString& text, bool bCaseSensitive ) const
{
- if (m_exactPatterns.tqfind(text) != m_exactPatterns.end())
+ if (m_exactPatterns.find(text) != m_exactPatterns.end())
{
return true;
}
diff --git a/src/gnudiff_analyze.cpp b/src/gnudiff_analyze.cpp
index 565cf32..ea49b4e 100644
--- a/src/gnudiff_analyze.cpp
+++ b/src/gnudiff_analyze.cpp
@@ -535,7 +535,7 @@ void GnuDiff::discard_confusing_lines (struct file_data filevec[])
discards[i + j] = 0;
/* Scan from beginning of run
- until we tqfind 3 or more nonprovisionals in a row
+ until we find 3 or more nonprovisionals in a row
or until the first nonprovisional at least 8 lines in.
Until that point, cancel any provisionals. */
for (j = 0, consec = 0; j < length; j++)
diff --git a/src/gnudiff_diff.h b/src/gnudiff_diff.h
index 1d54b7d..8299368 100644
--- a/src/gnudiff_diff.h
+++ b/src/gnudiff_diff.h
@@ -34,7 +34,7 @@
class GnuDiff
{
public:
-/* What kind of changes a hunk tqcontains. */
+/* What kind of changes a hunk contains. */
enum changes
{
/* No changes: lines common to both files. */
diff --git a/src/kdiff3_part.cpp b/src/kdiff3_part.cpp
index f512dae..6790ba4 100644
--- a/src/kdiff3_part.cpp
+++ b/src/kdiff3_part.cpp
@@ -114,7 +114,7 @@ static void getNameAndVersion( const TQString& str, const TQString& lineStart, T
--pos2;
}
- int vpos = str.tqfindRev("\t", -1);
+ int vpos = str.findRev("\t", -1);
if ( vpos>0 && vpos>(int)pos2 )
{
version = str.mid( vpos+1 );
diff --git a/src/kreplacements/kreplacements.cpp b/src/kreplacements/kreplacements.cpp
index a9df56a..eb27f86 100644
--- a/src/kreplacements/kreplacements.cpp
+++ b/src/kreplacements/kreplacements.cpp
@@ -708,10 +708,10 @@ KAction* KStdAction::help( TQWidget* tqparent, const char* slot, KActionCollecti
if(p) a->addTo( p->helpMenu );
return a;
}
-KAction* KStdAction::tqfind( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection)
+KAction* KStdAction::find( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection)
{
KMainWindow* p = actionCollection->m_pMainWindow;
- KAction* a = new KAction( i18n("Find"), TQt::CTRL+TQt::Key_F, tqparent, slot, actionCollection, "tqfind", false, false );
+ KAction* a = new KAction( i18n("Find"), TQt::CTRL+TQt::Key_F, tqparent, slot, actionCollection, "find", false, false );
if(p) a->addTo( p->editMenu );
return a;
}
@@ -1021,7 +1021,7 @@ KApplication::KApplication()
{
if ( s_argv[i][0]=='-' ) // An option
{
- if ( ignorableCmdLineOptions.tqcontains(TQString(s_argv[i])+";") )
+ if ( ignorableCmdLineOptions.contains(TQString(s_argv[i])+";") )
continue;
// Find the option
int j=0;
diff --git a/src/kreplacements/kreplacements.h b/src/kreplacements/kreplacements.h
index be7f126..3b807d8 100644
--- a/src/kreplacements/kreplacements.h
+++ b/src/kreplacements/kreplacements.h
@@ -259,7 +259,7 @@ public:
static KAction* about( TQWidget* tqparent, const char* slot, KActionCollection* );
static KAction* aboutTQt( KActionCollection* );
static KAction* help( TQWidget* tqparent, const char* slot, KActionCollection* );
- static KAction* tqfind( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* find( TQWidget* tqparent, const char* slot, KActionCollection* );
static KAction* findNext( TQWidget* tqparent, const char* slot, KActionCollection* );
static KAction* keyBindings( TQWidget* tqparent, const char* slot, KActionCollection* );
};
diff --git a/src/main.cpp b/src/main.cpp
index 218740e..2556c0e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -75,7 +75,7 @@ void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList&
TQString line = ts.readLine();
if ( line.startsWith("IgnorableCmdLineOptions=") )
{
- int pos = line.tqfind('=');
+ int pos = line.find('=');
if (pos>=0)
{
TQString s = line.mid(pos+1);
@@ -201,7 +201,7 @@ int main(int argc, char *argv[])
TQString locale;
locale = app.config()->readEntry("Language", "Auto");
- int spacePos = locale.tqfind(' ');
+ int spacePos = locale.find(' ');
if (spacePos>0) locale = locale.left(spacePos);
TQTranslator kdiff3Translator( 0 );
TQTranslator qtTranslator( 0 );
diff --git a/src/mergeresultwindow.cpp b/src/mergeresultwindow.cpp
index ac377d6..119294f 100644
--- a/src/mergeresultwindow.cpp
+++ b/src/mergeresultwindow.cpp
@@ -1090,7 +1090,7 @@ TQString calcHistorySortKey( const TQString& keyOrder, TQRegExp& matchedRegExpr,
}
TQString groupRegExp = parenthesesGroupList[groupIdx-1];
- if( groupRegExp.tqfind('|')<0 || groupRegExp.tqfind('(')>=0 )
+ if( groupRegExp.find('|')<0 || groupRegExp.find('(')>=0 )
{
bool bOk = false;
int i = s.toInt( &bOk );
@@ -1104,7 +1104,7 @@ TQString calcHistorySortKey( const TQString& keyOrder, TQRegExp& matchedRegExpr,
// s is the string that managed to match.
// Now we want to know at which position it occurred. e.g. Jan=0, Feb=1, Mar=2, etc.
TQStringList sl = TQStringList::split( '|', groupRegExp );
- int idx = sl.tqfindIndex( s );
+ int idx = sl.findIndex( s );
if (idx<0)
{
// Didn't match
@@ -2337,7 +2337,7 @@ void MergeResultWindow::keyPressEvent( TQKeyEvent* e )
if ( m_bInsertMode )
s.insert( x, t );
else
- s.tqreplace( x, t.length(), t );
+ s.replace( x, t.length(), t );
melIt->setString( s );
x += t.length();
@@ -2758,7 +2758,7 @@ bool MergeResultWindow::findString( const TQString& s, int& d3vLine, int& posInL
TQString line = getString( it );
if ( !line.isEmpty() )
{
- int pos = line.tqfind( s, startPos, bCaseSensitive );
+ int pos = line.find( s, startPos, bCaseSensitive );
if ( pos != -1 )
{
d3vLine = it;
diff --git a/src/optiondialog.cpp b/src/optiondialog.cpp
index 9fc20ff..ac6b03e 100644
--- a/src/optiondialog.cpp
+++ b/src/optiondialog.cpp
@@ -918,7 +918,7 @@ void OptionDialog::setupMergePage( void )
++line;
//TQString branch = newHistoryEntry.cap(1);
//int day = newHistoryEntry.cap(2).toInt();
- //int month = TQString("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec").tqfind(newHistoryEntry.cap(3))/4 + 1;
+ //int month = TQString("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec").find(newHistoryEntry.cap(3))/4 + 1;
//int year = newHistoryEntry.cap(4).toInt();
//TQString time = newHistoryEntry.cap(5);
//TQString name = newHistoryEntry.cap(6);
@@ -1584,7 +1584,7 @@ void OptionDialog::slotApply( void )
TQString locale = m_language;
if ( locale == "Auto" || locale.isEmpty() )
locale = locale = TQTextCodec::locale();
- int spacePos = locale.tqfind(' ');
+ int spacePos = locale.find(' ');
if (spacePos>0) locale = locale.left(spacePos);
TQSettings settings;
settings.setPath("KDiff3", "diff-ext", TQSettings::User );
@@ -1694,7 +1694,7 @@ TQString OptionDialog::parseOptions( const QCStringList& optionList )
{
TQString s = *i;
- int pos = s.tqfind('=');
+ int pos = s.find('=');
if( pos > 0 ) // seems not to have a tag
{
TQString key = s.left(pos);
diff --git a/src/pdiff.cpp b/src/pdiff.cpp
index bf9be72..b481cd6 100644
--- a/src/pdiff.cpp
+++ b/src/pdiff.cpp
@@ -465,11 +465,11 @@ void KDiff3App::init( bool bAuto, TotalDifftqStatus* pTotalDifftqStatus, bool bL
TQString a3 = m_sd3.getAliasName();
TQString f1, f2, f3;
int p1,p2,p3;
- if ( !a1.isEmpty() && (p1=a1.tqfindRev('/'))>=0 )
+ if ( !a1.isEmpty() && (p1=a1.findRev('/'))>=0 )
f1 = a1.mid( p1+1 );
- if ( !a2.isEmpty() && (p2=a2.tqfindRev('/'))>=0 )
+ if ( !a2.isEmpty() && (p2=a2.findRev('/'))>=0 )
f2 = a2.mid( p2+1 );
- if ( !a3.isEmpty() && (p3=a3.tqfindRev('/'))>=0 )
+ if ( !a3.isEmpty() && (p3=a3.findRev('/'))>=0 )
f3 = a3.mid( p3+1 );
if ( !f1.isEmpty() )
{
diff --git a/src/smalldialogs.cpp b/src/smalldialogs.cpp
index b4436ae..7dc6340 100644
--- a/src/smalldialogs.cpp
+++ b/src/smalldialogs.cpp
@@ -256,10 +256,10 @@ static void fixCurrentText( TQComboBox* pCB )
{
TQString s = pCB->currentText();
- int pos = s.tqfind( '\n' );
+ int pos = s.find( '\n' );
if ( pos>=0 )
s=s.left(pos);
- pos = s.tqfind( '\r' );
+ pos = s.find( '\r' );
if ( pos>=0 )
s=s.left(pos);