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 | 72aaee9802d447ee21340b011856b9b355a58f1a (patch) | |
tree | f97a68e4f75e6c25c8492e03fdfe6983fb0aa199 /src/kvilib/core | |
parent | 5d03948cd3558c613fae1fad109635f860babcbb (diff) | |
download | kvirc-72aaee9802d447ee21340b011856b9b355a58f1a.tar.gz kvirc-72aaee9802d447ee21340b011856b9b355a58f1a.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/core')
-rw-r--r-- | src/kvilib/core/kvi_pointerhashtable.h | 20 | ||||
-rw-r--r-- | src/kvilib/core/kvi_pointerlist.h | 20 | ||||
-rw-r--r-- | src/kvilib/core/kvi_qstring.cpp | 16 | ||||
-rw-r--r-- | src/kvilib/core/kvi_qstring.h | 40 | ||||
-rw-r--r-- | src/kvilib/core/kvi_string.cpp | 20 | ||||
-rw-r--r-- | src/kvilib/core/kvi_string.h | 12 |
6 files changed, 64 insertions, 64 deletions
diff --git a/src/kvilib/core/kvi_pointerhashtable.h b/src/kvilib/core/kvi_pointerhashtable.h index dceceeda..1c2bcab3 100644 --- a/src/kvilib/core/kvi_pointerhashtable.h +++ b/src/kvilib/core/kvi_pointerhashtable.h @@ -349,7 +349,7 @@ public: /// Places the hash table iterator at the position /// of the item found. /// - T * tqfind(const Key & hKey) + T * find(const Key & hKey) { m_uIteratorIdx = kvi_hash_hash(hKey,m_bCaseSensitive) % m_uSize; if(!m_pDataArray[m_uIteratorIdx])return 0; @@ -364,11 +364,11 @@ public: /// Returns the item associated to the key hKey /// or NULL if no such item exists in the hash table. /// Places the hash table iterator at the position - /// of the item found. This is an alias to tqfind(). + /// of the item found. This is an alias to find(). /// T * operator[](const Key & hKey) { - return tqfind(hKey); + return find(hKey); } /// @@ -427,7 +427,7 @@ public: /// The hash table iterator is placed at the newly inserted item. /// This is just an alias to insert() with a different name. /// - void tqreplace(const Key & hKey,T * pData) + void replace(const Key & hKey,T * pData) { insert(hKey,pData); } @@ -522,7 +522,7 @@ public: /// it's hash table entry, if found, and NULL otherwise. /// The hash table iterator is placed at the item found. /// - KviPointerHashTableEntry<Key,T> * tqfindRef(const T * pRef) + KviPointerHashTableEntry<Key,T> * findRef(const T * pRef) { for(m_uIteratorIdx = 0;m_uIteratorIdx<m_uSize;m_uIteratorIdx++) { @@ -540,7 +540,7 @@ public: /// /// Returns the entry pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or tqfindRef(). + /// or findRef(). /// KviPointerHashTableEntry<Key,T> * currentEntry() { @@ -568,7 +568,7 @@ public: /// Places the hash table iterator at the next entry /// and returns it. /// This function must be preceeded by a call to firstEntry(), first() - /// or tqfindRef(). + /// or findRef(). /// KviPointerHashTableEntry<Key,T> * nextEntry() { @@ -596,7 +596,7 @@ public: /// /// Returns the data value pointer pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or tqfindRef(). + /// or findRef(). /// T * current() { @@ -613,7 +613,7 @@ public: /// /// Returns the key pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or tqfindRef(). + /// or findRef(). /// const Key & currentKey() { @@ -648,7 +648,7 @@ public: /// Places the hash table iterator at the next entry /// and returns the associated data value pointer. /// This function must be preceeded by a call to firstEntry(), first() - /// or tqfindRef(). + /// or findRef(). /// T * next() { diff --git a/src/kvilib/core/kvi_pointerlist.h b/src/kvilib/core/kvi_pointerlist.h index 2051036c..50970005 100644 --- a/src/kvilib/core/kvi_pointerlist.h +++ b/src/kvilib/core/kvi_pointerlist.h @@ -288,7 +288,7 @@ public: /// Iterating over pointers is also very fast and this /// class contains an internal iterator that allows to /// write loops in a compact and clean way. -/// See the first(), next(), current() and tqfindRef() +/// See the first(), next(), current() and findRef() /// functions for the description of this feature. /// /// There is also a non-const external iterator @@ -618,7 +618,7 @@ public: /// /// Returns the current iteration item /// A call to this function MUST be preceded by a call to - /// first(),last(),at() or tqfindRef() + /// first(),last(),at() or findRef() /// T * current() { @@ -628,7 +628,7 @@ public: /// /// Returns the current iteration item /// A call to this function should be preceded by a call to - /// first(),last(),at() or tqfindRef(). + /// first(),last(),at() or findRef(). /// This function will return a NULL pointer if the current /// item has been invalidated due to a remove operation. /// @@ -641,7 +641,7 @@ public: /// /// Returns an iterator pointing to the current item in the list. /// A call to this function MUST be preceded by a call to - /// first(),last(),at() or tqfindRef() + /// first(),last(),at() or findRef() /// KviPointerListIterator<T> iteratorAtCurrent() { @@ -652,7 +652,7 @@ public: /// Sets the iteration pointer to the next item in the list /// and returns that item (or 0 if the end of the list has been reached) /// A call to this function MUST be preceded by a _succesfull_ call to - /// first(),last(),at() or tqfindRef(). + /// first(),last(),at() or findRef(). /// T * next() { @@ -666,7 +666,7 @@ public: /// Sets the iteration pointer to the previous item in the list /// and returns that item (or 0 if the beginning of the list has been reached) /// A call to this function MUST be preceded by a _succesfull_ call to - /// first(),last(),at() or tqfindRef() + /// first(),last(),at() or findRef() /// T * prev() { @@ -715,7 +715,7 @@ public: /// and returns its position (zero based index) in the list or -1 if the /// item cannot be found /// - int tqfindRef(const T * d) + int findRef(const T * d) { int ret = 0; for(T * t = first();t;t = next()) @@ -945,7 +945,7 @@ public: /// bool removeRef(const T * d) { - if(tqfindRef(d) == -1)return false; + if(findRef(d) == -1)return false; removeCurrentSafe(); return true; } @@ -957,7 +957,7 @@ public: /// void insertAfter(const T * ref,const T * d) { - if(tqfindRef(ref) == -1) + if(findRef(ref) == -1) { append(d); return; @@ -981,7 +981,7 @@ public: /// void insertBefore(const T * ref,const T * d) { - if(tqfindRef(ref) == -1) + if(findRef(ref) == -1) { prepend(d); return; diff --git a/src/kvilib/core/kvi_qstring.cpp b/src/kvilib/core/kvi_qstring.cpp index fd61aed4..f16ad0ad 100644 --- a/src/kvilib/core/kvi_qstring.cpp +++ b/src/kvilib/core/kvi_qstring.cpp @@ -934,7 +934,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.tqfind(c); + int idx = s.find(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + 1); @@ -945,7 +945,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.tqfindRev(c); + int idx = s.findRev(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + 1); @@ -956,7 +956,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.tqfind(c); + int idx = s.find(c); #endif if(idx == -1) { @@ -971,7 +971,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.tqfindRev(c); + int idx = s.findRev(c); #endif if(idx == -1) { @@ -986,7 +986,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.tqfind(c); + int idx = s.find(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + c.length()); @@ -997,7 +997,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.tqfindRev(c); + int idx = s.findRev(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + c.length()); @@ -1008,7 +1008,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.tqfind(c); + int idx = s.find(c); #endif if(idx == -1) { @@ -1023,7 +1023,7 @@ namespace KviTQString #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.tqfindRev(c); + int idx = s.findRev(c); #endif if(idx == -1) { diff --git a/src/kvilib/core/kvi_qstring.h b/src/kvilib/core/kvi_qstring.h index dc75deb0..7f9f7e73 100644 --- a/src/kvilib/core/kvi_qstring.h +++ b/src/kvilib/core/kvi_qstring.h @@ -148,93 +148,93 @@ namespace KviTQString #endif } - inline int tqfind(const TQString &s,TQChar c,int index = 0,bool cs = true) + inline int find(const TQString &s,TQChar c,int index = 0,bool cs = true) { #ifdef COMPILE_USE_QT4 return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.tqfind(c,index,cs); + return s.find(c,index,cs); #endif } - inline int tqfind(const TQString &s,char c,int index = 0,bool cs = true) + inline int find(const TQString &s,char c,int index = 0,bool cs = true) { #ifdef COMPILE_USE_QT4 return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.tqfind(c,index,cs); + return s.find(c,index,cs); #endif } - inline int tqfind(const TQString &s,const TQString & str,int index = 0,bool cs = true) + inline int find(const TQString &s,const TQString & str,int index = 0,bool cs = true) { #ifdef COMPILE_USE_QT4 return s.indexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.tqfind(str,index,cs); + return s.find(str,index,cs); #endif } - inline int tqfind(const TQString &s,const TQRegExp & rx,int index = 0) + inline int find(const TQString &s,const TQRegExp & rx,int index = 0) { #ifdef COMPILE_USE_QT4 return s.indexOf(rx,index); #else - return s.tqfind(rx,index); + return s.find(rx,index); #endif } - inline int tqfind(const TQString &s,const char * str,int index = 0) + inline int find(const TQString &s,const char * str,int index = 0) { #ifdef COMPILE_USE_QT4 return s.indexOf(TQString(str),index); #else - return s.tqfind(str,index); + return s.find(str,index); #endif } - inline int tqfindRev(const TQString &s,TQChar c,int index = -1,bool cs = true) + inline int findRev(const TQString &s,TQChar c,int index = -1,bool cs = true) { #ifdef COMPILE_USE_QT4 return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.tqfindRev(c,index,cs); + return s.findRev(c,index,cs); #endif } - inline int tqfindRev(const TQString &s,char c,int index = -1,bool cs = true) + inline int findRev(const TQString &s,char c,int index = -1,bool cs = true) { #ifdef COMPILE_USE_QT4 return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.tqfindRev(c,index,cs); + return s.findRev(c,index,cs); #endif } - inline int tqfindRev(const TQString &s,const TQString & str,int index = -1,bool cs = true) + inline int findRev(const TQString &s,const TQString & str,int index = -1,bool cs = true) { #ifdef COMPILE_USE_QT4 return s.lastIndexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.tqfindRev(str,index,cs); + return s.findRev(str,index,cs); #endif } - inline int tqfindRev(const TQString &s,const TQRegExp & rx,int index = -1) + inline int findRev(const TQString &s,const TQRegExp & rx,int index = -1) { #ifdef COMPILE_USE_QT4 return s.lastIndexOf(rx,index); #else - return s.tqfindRev(rx,index); + return s.findRev(rx,index); #endif } - inline int tqfindRev(const TQString &s,const char * str,int index = -1) + inline int findRev(const TQString &s,const char * str,int index = -1) { #ifdef COMPILE_USE_QT4 return s.lastIndexOf(TQString(str),index); #else - return s.tqfindRev(str,index); + return s.findRev(str,index); #endif } diff --git a/src/kvilib/core/kvi_string.cpp b/src/kvilib/core/kvi_string.cpp index df89122a..3eb7fa67 100644 --- a/src/kvilib/core/kvi_string.cpp +++ b/src/kvilib/core/kvi_string.cpp @@ -2203,7 +2203,7 @@ int KviStr::occurences(const char *str,bool caseS) const return cnt; } -bool KviStr::tqcontains(char c,bool caseS) const +bool KviStr::contains(char c,bool caseS) const { register char *p = m_ptr; if(caseS) @@ -2224,7 +2224,7 @@ bool KviStr::tqcontains(char c,bool caseS) const return false; } -bool KviStr::tqcontains(const char *str,bool caseS) const +bool KviStr::contains(const char *str,bool caseS) const { __range_valid(str); register char *p = m_ptr; @@ -2657,7 +2657,7 @@ KviStr & KviStr::sprintf(const char *fmt,...) return (*this); } -int KviStr::tqfind(const char *str,int idx,bool caseS) const +int KviStr::find(const char *str,int idx,bool caseS) const { if(idx >= m_len)return -1; register char *p=m_ptr + idx; @@ -2682,7 +2682,7 @@ int KviStr::tqfind(const char *str,int idx,bool caseS) const } } -int KviStr::tqfind(char c,int idx) const +int KviStr::find(char c,int idx) const { if(idx >= m_len)return -1; register char *p=m_ptr + idx; @@ -2691,7 +2691,7 @@ int KviStr::tqfind(char c,int idx) const } -int KviStr::tqfindRev(const char *str,int idx,bool caseS) const +int KviStr::findRev(const char *str,int idx,bool caseS) const { if((m_len + idx) < 0)return -1; register char *p=m_ptr + m_len + idx; @@ -2729,10 +2729,10 @@ int KviStr::findFirstIdx(const char *str,bool caseS) const { // This function can't be used to search inside // multibyte encoded strings... convert your - // code to TQString and use TQString::tqfindRev(). + // code to TQString and use TQString::findRev(). // We must throw away KviStr at all in this case... - // return TQString(m_ptr).tqfind(TQString(str),0,caseS);; + // return TQString(m_ptr).find(TQString(str),0,caseS);; // Both this KviStr and the const char * str are assumed // to be in the proper (and same) encoding. @@ -2782,10 +2782,10 @@ int KviStr::findLastIdx(const char *str,bool caseS) const { // This function can't be used to search inside // multibyte encoded strings... convert your - // code to TQString and use TQString::tqfindRev(). + // code to TQString and use TQString::findRev(). // We must throw away KviStr at all in this case... - // return TQString(m_ptr).tqfindRev(TQString(str),-1,caseS); + // return TQString(m_ptr).findRev(TQString(str),-1,caseS); __range_valid(str); //Calc the len of the searched string @@ -2948,7 +2948,7 @@ KviStr & KviStr::emptyString() } -bool KviStr::ext_tqcontains(register const char * data,const char * item,bool caseS) +bool KviStr::ext_contains(register const char * data,const char * item,bool caseS) { if(item && data) { diff --git a/src/kvilib/core/kvi_string.h b/src/kvilib/core/kvi_string.h index 4a7991bb..4e9a3acb 100644 --- a/src/kvilib/core/kvi_string.h +++ b/src/kvilib/core/kvi_string.h @@ -376,9 +376,9 @@ public: //============================================================================= // Returns true if at least one occurence of str is found - bool tqcontains(const char *str,bool caseS=true) const; + bool contains(const char *str,bool caseS=true) const; // Returns true if at least one occurence of character c is found in this string - bool tqcontains(char c,bool caseS=true) const; + bool contains(char c,bool caseS=true) const; // Returns the number of occurences of string str in this string.<br> // Overlapped matches are counted. int occurences(const char *str,bool caseS=true) const; @@ -405,9 +405,9 @@ public: // str can NOT be 0 here. int findLastIdx(const char *str,bool caseS = true) const; - int tqfind(char c,int startIdx) const; - int tqfind(const char * str,int startIdx,bool caseS = true) const; - int tqfindRev(const char * str,int startIdx,bool caseS = true) const; + int find(char c,int startIdx) const; + int find(const char * str,int startIdx,bool caseS = true) const; + int findRev(const char * str,int startIdx,bool caseS = true) const; //============================================================================= // Numbers @@ -462,7 +462,7 @@ public: //============================================================================= // FIXME: Should it be KviStrExt::contains namespace ? - static bool ext_tqcontains(register const char * data,const char * item,bool caseS = true); + static bool ext_contains(register const char * data,const char * item,bool caseS = true); }; // FIXME: the functions below should end in the KviStr namespace ??? |