summaryrefslogtreecommitdiffstats
path: root/diff_ext_for_kdiff3
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
commitf636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch)
tree5365045e6bce685a7cbaeb81b4797a719e86089f /diff_ext_for_kdiff3
parent63862fdfcb61f302ef69e86d40772bb1318d3763 (diff)
downloadkdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz
kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'diff_ext_for_kdiff3')
-rwxr-xr-xdiff_ext_for_kdiff3/diff_ext.cpp14
-rw-r--r--diff_ext_for_kdiff3/diffextstring.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/diff_ext_for_kdiff3/diff_ext.cpp b/diff_ext_for_kdiff3/diff_ext.cpp
index f83f068..af877e7 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.find( fallback );
+ std::map< std::wstring, std::wstring >::iterator i = s_translationMap.tqfind( 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.find( arg1 );
+ size_t pos1 = s.tqfind( arg1 );
tstring arg2 = TEXT("%2");
- size_t pos2 = s.find( arg2 );
+ size_t pos2 = s.tqfind( arg2 );
tstring arg3 = TEXT("%3");
- size_t pos3 = s.find( arg3 );
+ size_t pos3 = s.tqfind( arg3 );
if ( pos1 != size_t(-1) )
{
- s.replace( pos1, arg1.length(), r1 );
+ s.tqreplace( 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.replace( pos2, arg2.length(), r2 );
+ s.tqreplace( pos2, arg2.length(), r2 );
if ( pos3 != size_t(-1) && pos2<pos3 )
pos3 += r2.length() - arg2.length();
}
if ( pos3 != size_t(-1) )
{
- s.replace( pos3, arg3.length(), r3 );
+ s.tqreplace( pos3, arg3.length(), r3 );
}
}
diff --git a/diff_ext_for_kdiff3/diffextstring.h b/diff_ext_for_kdiff3/diffextstring.h
index 132512e..0df947e 100644
--- a/diff_ext_for_kdiff3/diffextstring.h
+++ b/diff_ext_for_kdiff3/diffextstring.h
@@ -108,7 +108,7 @@ class STRING {
return tmp;
}
- STRING& replace( size_t pos, size_t num, const STRING& s )
+ STRING& tqreplace( 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 find(const STRING& s) const
+ size_t tqfind(const STRING& s) const
{
const TCHAR* p = _tcsstr( _str, s._str );
if (p)