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 | 6335dc55802871b5a43492f217b6edbb420204c4 (patch) | |
tree | 50c6c8672a52687568edea475614dfe3d98e62e5 /khexedit/lib | |
parent | 9b8c9f1f9e974ff0176108cfbd8852cd99ea68c8 (diff) | |
download | tdeutils-6335dc55802871b5a43492f217b6edbb420204c4.tar.gz tdeutils-6335dc55802871b5a43492f217b6edbb420204c4.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khexedit/lib')
-rw-r--r-- | khexedit/lib/codecs/kcharcodec.cpp | 2 | ||||
-rw-r--r-- | khexedit/lib/controller/kvalueeditor.cpp | 2 | ||||
-rw-r--r-- | khexedit/lib/kbigbuffer.cpp | 6 | ||||
-rw-r--r-- | khexedit/lib/kbigbuffer.h | 8 | ||||
-rw-r--r-- | khexedit/lib/kbufferdrag.cpp | 6 | ||||
-rw-r--r-- | khexedit/lib/kdatabuffer.cpp | 4 | ||||
-rw-r--r-- | khexedit/lib/kdatabuffer.h | 14 | ||||
-rw-r--r-- | khexedit/lib/kfixedsizebuffer.cpp | 4 | ||||
-rw-r--r-- | khexedit/lib/kfixedsizebuffer.h | 6 | ||||
-rw-r--r-- | khexedit/lib/khexedit.cpp | 8 | ||||
-rw-r--r-- | khexedit/lib/kplainbuffer.cpp | 4 | ||||
-rw-r--r-- | khexedit/lib/kplainbuffer.h | 8 | ||||
-rw-r--r-- | khexedit/lib/kwrappingrobuffer.cpp | 2 | ||||
-rw-r--r-- | khexedit/lib/kwrappingrobuffer.h | 6 |
14 files changed, 40 insertions, 40 deletions
diff --git a/khexedit/lib/codecs/kcharcodec.cpp b/khexedit/lib/codecs/kcharcodec.cpp index dea28c1..1aab79b 100644 --- a/khexedit/lib/codecs/kcharcodec.cpp +++ b/khexedit/lib/codecs/kcharcodec.cpp @@ -42,7 +42,7 @@ KCharCodec *KCharCodec::createCodec( const TQString &Name ) { KCharCodec *Codec = 0; - if( KTextCharCodec::codecNames().tqfindIndex(Name) != -1 ) + if( KTextCharCodec::codecNames().findIndex(Name) != -1 ) Codec = KTextCharCodec::createCodec( Name ); else if( KEBCDIC1047CharCodec::codecName() == Name ) Codec = KEBCDIC1047CharCodec::create(); diff --git a/khexedit/lib/controller/kvalueeditor.cpp b/khexedit/lib/controller/kvalueeditor.cpp index 9baff80..70b9c41 100644 --- a/khexedit/lib/controller/kvalueeditor.cpp +++ b/khexedit/lib/controller/kvalueeditor.cpp @@ -207,7 +207,7 @@ void KValueEditor::doValueEditAction( KValueEditAction Action, int Input ) EditValue = NewValue; ByteCodec->encode( ByteBuffer, 0, EditValue ); - HexEdit->DataBuffer->tqreplace( Index, 1, (char*)&EditValue, 1 ); + HexEdit->DataBuffer->replace( Index, 1, (char*)&EditValue, 1 ); } HexEdit->updateCursor(); diff --git a/khexedit/lib/kbigbuffer.cpp b/khexedit/lib/kbigbuffer.cpp index 08be888..99925da 100644 --- a/khexedit/lib/kbigbuffer.cpp +++ b/khexedit/lib/kbigbuffer.cpp @@ -83,7 +83,7 @@ int KBigBuffer::remove( KSection /*Section*/ ) return 0; } -unsigned int KBigBuffer::tqreplace( KSection /*Section*/, const char*, unsigned int /*Length*/ ) +unsigned int KBigBuffer::replace( KSection /*Section*/, const char*, unsigned int /*Length*/ ) { return 0; } @@ -95,8 +95,8 @@ int KBigBuffer::fill( char /*FillChar*/, int /*Length*/, unsigned int /*Pos*/ ) int KBigBuffer::move( int /*DestPos*/, KSection /*SourceSection*/ ) { return 0; } -//int KBigBuffer::tqfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } -int KBigBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } +//int KBigBuffer::find( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } +int KBigBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } int KBigBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } diff --git a/khexedit/lib/kbigbuffer.h b/khexedit/lib/kbigbuffer.h index b4461ab..63e6ec4 100644 --- a/khexedit/lib/kbigbuffer.h +++ b/khexedit/lib/kbigbuffer.h @@ -52,18 +52,18 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection S ); - virtual unsigned int tqreplace( KSection S, const char*, unsigned int InputLength ); + virtual unsigned int replace( KSection S, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - //virtual int tqfind( const char*, int Length, int Pos = 0 ) const; - virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; + //virtual int find( const char*, int Length, int Pos = 0 ) const; + virtual int find( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/kbufferdrag.cpp b/khexedit/lib/kbufferdrag.cpp index 8fa1973..c9cc54a 100644 --- a/khexedit/lib/kbufferdrag.cpp +++ b/khexedit/lib/kbufferdrag.cpp @@ -50,7 +50,7 @@ static const char *localTextPlain() TextPlainLocal = TQCString(KGlobal::locale()->encoding()).lower(); // remove the whitespaces int s; - while( (s=TextPlainLocal.tqfind(' ')) >= 0 ) + while( (s=TextPlainLocal.find(' ')) >= 0 ) TextPlainLocal.remove( s, 1 ); TextPlainLocal.prepend( TextPlainLocalStub ); @@ -62,12 +62,12 @@ static const char *localTextPlain() // tries to create a codec by the given charset description static TQTextCodec* codecForCharset( const TQCString& Desc ) { - int i = Desc.tqfind( "charset=" ); + int i = Desc.find( "charset=" ); if( i >= 0 ) { TQCString CharSetName = Desc.mid( i+8 ); // remove any further attributes - if( (i=CharSetName.tqfind( ';' )) >= 0 ) + if( (i=CharSetName.find( ';' )) >= 0 ) CharSetName = CharSetName.left( i ); // try to find codec diff --git a/khexedit/lib/kdatabuffer.cpp b/khexedit/lib/kdatabuffer.cpp index 4c4f365..054d792 100644 --- a/khexedit/lib/kdatabuffer.cpp +++ b/khexedit/lib/kdatabuffer.cpp @@ -25,13 +25,13 @@ using namespace KHE; int KDataBuffer::insert( int Pos, const char* D, int Length ) { - return tqreplace( Pos,0,D,Length ); + return replace( Pos,0,D,Length ); } int KDataBuffer::remove( KSection Remove ) { - tqreplace( Remove, 0, 0 ); + replace( Remove, 0, 0 ); return Remove.width(); // TODO: check if this is true } diff --git a/khexedit/lib/kdatabuffer.h b/khexedit/lib/kdatabuffer.h index 796ccd6..e7cc3bc 100644 --- a/khexedit/lib/kdatabuffer.h +++ b/khexedit/lib/kdatabuffer.h @@ -146,9 +146,9 @@ class KHEXEDIT_EXPORT KDataBuffer * @param SourceLength * @return length of replacced data */ - virtual unsigned int tqreplace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0; + virtual unsigned int replace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0; /** convenience function, behaves as above */ - unsigned int tqreplace( unsigned int Pos, unsigned int RemoveLength, + unsigned int replace( unsigned int Pos, unsigned int RemoveLength, const char* Source, unsigned int SourceLength ); /** moves a part of the data to a new position, while floating the other data around @@ -201,7 +201,7 @@ class KHEXEDIT_EXPORT KDataBuffer * @param Pos the position to start the search * @return index of the first or -1 */ - //virtual int tqfind( const char*, int Length, int Pos = 0 ) const = 0; + //virtual int find( const char*, int Length, int Pos = 0 ) const = 0; /** searches for a given data string * The section limits the data within which the key has to be found * If the end of the section is lower then the start the search continues at the start??? @@ -210,7 +210,7 @@ class KHEXEDIT_EXPORT KDataBuffer * @param Section section within the keydata is to be found * @return index of the first occurence or -1 */ - virtual int tqfind( const char*KeyData, int Length, KSection Section ) const = 0; + virtual int find( const char*KeyData, int Length, KSection Section ) const = 0; /** searches backward beginning with byte at Pos. * @param * @param Length length of search string @@ -219,7 +219,7 @@ class KHEXEDIT_EXPORT KDataBuffer */ virtual int rfind( const char*, int Length, int Pos = -1 ) const = 0; -/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ }; @@ -235,9 +235,9 @@ inline const char *KDataBuffer::dataSet( int Offset, int Length ) const inline int KDataBuffer::remove( int Pos, int Length ) { return remove( KSection(Pos,Pos+Length-1) ); } -inline unsigned int KDataBuffer::tqreplace( unsigned int Pos, unsigned int RemoveLength, +inline unsigned int KDataBuffer::replace( unsigned int Pos, unsigned int RemoveLength, const char* D, unsigned int InputLength ) -{ return tqreplace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); } +{ return replace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); } inline bool KDataBuffer::isReadOnly() const { return false; } diff --git a/khexedit/lib/kfixedsizebuffer.cpp b/khexedit/lib/kfixedsizebuffer.cpp index 0c13e94..83fd134 100644 --- a/khexedit/lib/kfixedsizebuffer.cpp +++ b/khexedit/lib/kfixedsizebuffer.cpp @@ -89,7 +89,7 @@ int KFixedSizeBuffer::remove( KSection Remove ) } -unsigned int KFixedSizeBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength ) +unsigned int KFixedSizeBuffer::replace( KSection Remove, const char* D, unsigned int InputLength ) { // check all parameters if( Remove.startsBehind( Size-1 ) || (Remove.width()==0 && InputLength==0) ) @@ -262,7 +262,7 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un } -int KFixedSizeBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } +int KFixedSizeBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } int KFixedSizeBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } diff --git a/khexedit/lib/kfixedsizebuffer.h b/khexedit/lib/kfixedsizebuffer.h index e5997c3..90060f0 100644 --- a/khexedit/lib/kfixedsizebuffer.h +++ b/khexedit/lib/kfixedsizebuffer.h @@ -48,17 +48,17 @@ class KFixedSizeBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection Remove ); - virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength ); + virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; + virtual int find( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/khexedit.cpp b/khexedit/lib/khexedit.cpp index 0a52090..01d7602 100644 --- a/khexedit/lib/khexedit.cpp +++ b/khexedit/lib/khexedit.cpp @@ -904,7 +904,7 @@ void KHexEdit::insert( const TQByteArray &D ) // we restrict the replacement to the minimum length of selection and input ChangedRange = BufferRanges->selection(); ChangedRange.restrictEndTo( ChangedRange.start()+D.size()-1 ); - int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() ); + int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() ); BufferCursor->gotoCIndex( ChangedRange.start()+W ); BufferRanges->removeSelection(); } @@ -917,7 +917,7 @@ void KHexEdit::insert( const TQByteArray &D ) ChangedRange.restrictEndTo( BufferLayout->length()-1 ); if( ChangedRange.isValid() ) { - int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() ); + int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() ); BufferCursor->gotoNextByte( W ); } } @@ -930,7 +930,7 @@ void KHexEdit::insert( const TQByteArray &D ) // replacing the selection KSection Selection = BufferRanges->selection(); int OldLastIndex = BufferLayout->length() - 1; - int W = DataBuffer->tqreplace( Selection, D.data(), D.size() ); + int W = DataBuffer->replace( Selection, D.data(), D.size() ); updateLength(); BufferCursor->gotoIndex( Selection.start() + W ); if( W > 0 ) @@ -1933,7 +1933,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) ChangedRange.restrictEndTo( BufferLayout->length()-1 ); if( ChangedRange.isValid() ) { - int NoOfReplaced = DataBuffer->tqreplace( ChangedRange, Data.data(), ChangedRange.width() ); + int NoOfReplaced = DataBuffer->replace( ChangedRange, Data.data(), ChangedRange.width() ); BufferCursor->gotoNextByte( NoOfReplaced ); } } diff --git a/khexedit/lib/kplainbuffer.cpp b/khexedit/lib/kplainbuffer.cpp index 1d79756..08874ba 100644 --- a/khexedit/lib/kplainbuffer.cpp +++ b/khexedit/lib/kplainbuffer.cpp @@ -108,7 +108,7 @@ int KPlainBuffer::remove( KSection Remove ) } -unsigned int KPlainBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength ) +unsigned int KPlainBuffer::replace( KSection Remove, const char* D, unsigned int InputLength ) { // check all parameters if( Remove.start() >= (int)Size || (Remove.width()==0 && InputLength==0) ) @@ -259,7 +259,7 @@ int KPlainBuffer::fill( const char FChar, int FillLength, unsigned int Pos ) } -int KPlainBuffer::tqfind( const char* SearchString, int Length, KSection Section ) const +int KPlainBuffer::find( const char* SearchString, int Length, KSection Section ) const { Section.restrictEndTo( Size-1 ); diff --git a/khexedit/lib/kplainbuffer.h b/khexedit/lib/kplainbuffer.h index c0d8846..31851ae 100644 --- a/khexedit/lib/kplainbuffer.h +++ b/khexedit/lib/kplainbuffer.h @@ -54,18 +54,18 @@ class KPlainBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection Remove ); - virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength ); + virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - //virtual int tqfind( const char*, int Length, int Pos = 0 ) const; - virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; + //virtual int find( const char*, int Length, int Pos = 0 ) const; + virtual int find( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/kwrappingrobuffer.cpp b/khexedit/lib/kwrappingrobuffer.cpp index a47745c..b913c1a 100644 --- a/khexedit/lib/kwrappingrobuffer.cpp +++ b/khexedit/lib/kwrappingrobuffer.cpp @@ -50,7 +50,7 @@ void KWrappingROBuffer::set( const char* D, int L ) } -int KWrappingROBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const +int KWrappingROBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } diff --git a/khexedit/lib/kwrappingrobuffer.h b/khexedit/lib/kwrappingrobuffer.h index 97ae33c..51ee7b8 100644 --- a/khexedit/lib/kwrappingrobuffer.h +++ b/khexedit/lib/kwrappingrobuffer.h @@ -47,13 +47,13 @@ class KWrappingROBuffer : public KReadOnlyBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection S ); - virtual unsigned int tqreplace( KSection S, const char*, unsigned int Length ); + virtual unsigned int replace( KSection S, const char*, unsigned int Length ); virtual int fill( const char FillChar, int, int ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M ); - virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; + virtual int find( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; @@ -75,7 +75,7 @@ inline char KWrappingROBuffer::datum( unsigned int Offset ) const { return Data[ inline int KWrappingROBuffer::insert( int, const char*, int ) { return 0; } inline int KWrappingROBuffer::remove( KSection ) { return 0; } -inline unsigned int KWrappingROBuffer::tqreplace( KSection, const char*, unsigned int ) { return 0; } +inline unsigned int KWrappingROBuffer::replace( KSection, const char*, unsigned int ) { return 0; } inline int KWrappingROBuffer::fill( const char , int, int ) { return 0; } inline void KWrappingROBuffer::setDatum( unsigned int, const char ) {} |