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
v3.5.13-sru
tpearson 14 years ago
parent 5d03948cd3
commit 72aaee9802

@ -71,7 +71,7 @@ class(installer,object)
@$mkdir($2)
foreach(%file,%files)
{
$this->%lFiles <+ $str.tqreplace($file.fixpath("$2/%file"),"\\\\","\\")
$this->%lFiles <+ $str.replace($file.fixpath("$2/%file"),"\\\\","\\")
file.copy -o $file.fixpath($0/%file) $file.fixpath($2/%file)
}
}
@ -117,7 +117,7 @@ class(installer,object)
{
foreach(%file,%files)
{
$this->%lSources <+ $str.tqreplace($file.fixpath("$0/%file"),"\\\\","\\")
$this->%lSources <+ $str.replace($file.fixpath("$0/%file"),"\\\\","\\")
include $file.fixpath("$0/%file")
}
}
@ -150,7 +150,7 @@ class(installer,object)
else if($str.match("toolbar.create * *",%line,e))
%c .= " toolbar.destroy -q "$str.word(1,%line)"$lf"
else if($str.match("action.create* (*)",%line,e))
%c .= " action.destroy -q "$str.tqreplace($str.token(1,"(,)",%line),,\")"$lf"
%c .= " action.destroy -q "$str.replace($str.token(1,"(,)",%line),,\")"$lf"
else if($str.match("class(*)*",%line,e))
%c .= " objects.killclass -q "$str.token(1,"(,)",%line)"$lf"
}

@ -1159,7 +1159,7 @@ defpopup(logging)
# If this window is being logged actually , $log.file will be non empty
# and pointing to the log file actually open.
%:logfile = $str.tqreplace($log.file,,$file.localdir)
%:logfile = $str.replace($log.file,,$file.localdir)
}
label($tr("Logging to"):<br><b>%:logfile</b>) ("%:logfile" != "")

@ -2914,7 +2914,7 @@ to 399.
432 ERR_ERRONEUSNICKNAME
"<nick> :Erroneous nickname"
- Returned after receiving a NICK message which tqcontains
- Returned after receiving a NICK message which contains
characters which do not fall in the defined set. See
section 2.3.1 for details on valid nicknames.

@ -26,7 +26,7 @@
//=============================================================================
//=============================================================================
// This file tqcontains (more or less) freely customizable compile time defaults
// This file contains (more or less) freely customizable compile time defaults
//
// You can safely play with the ones you understand the meaning of
//=============================================================================

@ -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()
{

@ -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;

@ -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)
{

@ -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
}

@ -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)
{

@ -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 ???

@ -80,7 +80,7 @@ void KviConfig::clearGroup(const TQString & szGroup)
{
m_bDirty = true;
m_pDict->remove(szGroup);
if(!m_pDict->tqfind(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one
if(!m_pDict->find(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one
}
void KviConfig::clearKey(const TQString & szKey)
@ -282,7 +282,7 @@ bool KviConfig::load()
TQString szGroup = m_bLocal8Bit ?
TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
TQString::fromUtf8(tmp.ptr(),tmp.len());
p_group = m_pDict->tqfind(szGroup);
p_group = m_pDict->find(szGroup);
if(!p_group)
{
p_group = new KviConfigGroup(17,false);
@ -324,13 +324,13 @@ bool KviConfig::load()
p_group->setAutoDelete(true);
m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group);
}
p_group->tqreplace(szKey,pVal);
p_group->replace(szKey,pVal);
} else {
// we in fact need this (mercy :D)
// otherwise the empty options will be treated as non-existing ones
// and will get the defaults (which is bad)
TQString * pVal = new TQString(TQString());
p_group->tqreplace(szKey,pVal);
p_group->replace(szKey,pVal);
}
}
}
@ -390,7 +390,7 @@ bool KviConfig::load()
if(dataLine.hasData())
{
TQString szUtf8 = TQString::fromUtf8(dataLine.ptr());
p_group = m_pDict->tqfind(szUtf8);
p_group = m_pDict->find(szUtf8);
if(!p_group)
{
@ -422,7 +422,7 @@ bool KviConfig::load()
m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group);
}
TQString szName = TQString::fromUtf8(name.ptr());
p_group->tqreplace(szName,p_data);
p_group->replace(szName,p_data);
}
}
break;
@ -550,18 +550,18 @@ void KviConfig::setGroup(const TQString & szGroup)
bool KviConfig::hasKey(const TQString & szKey)
{
KviConfigGroup * p_group = getCurrentGroup();
return (p_group->tqfind(szKey) != 0);
return (p_group->find(szKey) != 0);
}
bool KviConfig::hasGroup(const TQString & szGroup)
{
return (m_pDict->tqfind(szGroup) != 0);
return (m_pDict->find(szGroup) != 0);
}
KviConfigGroup * KviConfig::getCurrentGroup()
{
if(m_szGroup.isEmpty())m_szGroup = KVI_CONFIG_DEFAULT_GROUP;
KviConfigGroup * p_group = m_pDict->tqfind(m_szGroup);
KviConfigGroup * p_group = m_pDict->find(m_szGroup);
if(!p_group)
{
//create the group
@ -579,7 +579,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data=new TQString(szValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
// FIXME: #warning "We have probs here ?"
@ -587,7 +587,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue)
TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)
{
m_szStrBuffer = szDefault;
@ -603,7 +603,7 @@ TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault)
TQString KviConfig::readTQStringEntry(const char *szKey,const TQString &szDefault)
{
KviStrDict * p_group = getCurrentGroup();
KviStr * p_str = p_group->tqfind(szKey);
KviStr * p_str = p_group->find(szKey);
if(!p_str)return szDefault;
return TQString::fromUtf8(p_str->ptr());
}
@ -614,7 +614,7 @@ void KviConfig::writeEntry(const char *szKey,const TQString &szValue)
{
m_bDirty = true;
KviStrDict * p_group = getCurrentGroup();
p_group->tqreplace(szKey,new KviStr(szValue.utf8().data()));
p_group->replace(szKey,new KviStr(szValue.utf8().data()));
}
*/
@ -625,7 +625,7 @@ static TQString g_szConfigStringListSeparator(",\\[ITEM],");
TQStringList KviConfig::readStringListEntry(const TQString & szKey,const TQStringList &list)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return list;
#ifdef COMPILE_USE_QT4
return p_str->split(g_szConfigStringListSeparator);
@ -639,7 +639,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data=new TQString(list.join(g_szConfigStringListSeparator));
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
////////////////////////////////// KviValueList<int>
@ -647,7 +647,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list)
KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviValueList<int> &list)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)
{
//debug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1());
@ -685,7 +685,7 @@ void KviConfig::writeEntry(const TQString & szKey,const KviValueList<int> &list)
}
//debug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr());
p_group->tqreplace(szKey,new TQString(szData.ptr()));
p_group->replace(szKey,new TQString(szData.ptr()));
}
////////////////////////////////// KviPixmap
@ -698,13 +698,13 @@ void KviConfig::writeEntry(const TQString & szKey,const KviPixmap &pixmap)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data=new TQString();
KviStringConversion::toString(pixmap,*p_data);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
KviPixmap KviConfig::readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(p_str)
{
KviPixmap ret("");
@ -722,13 +722,13 @@ void KviConfig::writeEntry(const TQString & szKey,const KviMsgType &msg)
KviConfigGroup * p_group = getCurrentGroup();
TQString szData;
KviStringConversion::toString(msg,szData);
p_group->tqreplace(szKey,new TQString(szData));
p_group->replace(szKey,new TQString(szData));
}
KviMsgType KviConfig::readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return msgDef;
KviMsgType ret = msgDef;
KviStringConversion::fromString(*p_str,ret);
@ -742,14 +742,14 @@ void KviConfig::writeEntry(const TQString & szKey,const TQColor &clr)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
KviStr szData(KviStr::Format,"%d,%d,%d",clr.red(),clr.green(),clr.blue());
p_group->tqreplace(szKey,new TQString(szData.ptr()));
p_group->replace(szKey,new TQString(szData.ptr()));
}
TQColor KviConfig::readColorEntry(const TQString & szKey,const TQColor &clr)
{
KviConfigGroup * p_group = getCurrentGroup();
TQColor color(clr);
TQString * pointer_that_IS_initialized = p_group->tqfind(szKey);
TQString * pointer_that_IS_initialized = p_group->find(szKey);
if(pointer_that_IS_initialized)
@ -793,7 +793,7 @@ void KviConfig::writeEntry(const TQString & szKey,TQFont &fnt)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
KviStringConversion::toString(fnt,*p_data);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
@ -806,7 +806,7 @@ TQFont KviConfig::readFontEntry(const TQString & szKey,const TQFont &fnt)
{
TQFont font(fnt);
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(p_str)
{
//FontEntry=Arial,12,9,0,100,italic,underline,strikeout,
@ -824,13 +824,13 @@ void KviConfig::writeEntry(const TQString & szKey,bool bTrue)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString(bTrue ? "true" : "false");
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
bool KviConfig::readBoolEntry(const TQString & szKey,bool bTrue)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return bTrue;
static TQString szTrue = "true";
return (KviTQString::toLower(*p_str) == szTrue);
@ -844,13 +844,13 @@ void KviConfig::writeEntry(const TQString & szKey,const TQRect &rct)
KviConfigGroup * p_group = getCurrentGroup();
TQString szBuf;
KviStringConversion::toString(rct,szBuf);
p_group->tqreplace(szKey,new TQString(szBuf));
p_group->replace(szKey,new TQString(szBuf));
}
TQRect KviConfig::readRectEntry(const TQString & szKey,const TQRect &rct)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * str = p_group->tqfind(szKey);
TQString * str = p_group->find(szKey);
if(!str)return rct;
TQRect ret;
return KviStringConversion::fromString(*str,ret) ? ret : rct;
@ -864,13 +864,13 @@ void KviConfig::writeEntry(const TQString & szKey,unsigned short usValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(usValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
unsigned short int KviConfig::readUShortEntry(const TQString & szKey,unsigned short int usDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return usDefault;
bool bOk;
unsigned short int usVal=p_str->toUShort(&bOk);
@ -887,13 +887,13 @@ void KviConfig::writeEntry(const char *szKey,unsigned long lValue)
KviStrDict * p_group = getCurrentGroup();
KviStr *p_data = new KviStr();
p_data->setNum(lValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault)
{
KviStrDict * p_group = getCurrentGroup();
KviStr * p_str = p_group->tqfind(szKey);
KviStr * p_str = p_group->find(szKey);
if(!p_str)return lDefault;
bool bOk;
unsigned long lVal=p_str->toULong(&bOk);
@ -909,13 +909,13 @@ void KviConfig::writeEntry(const TQString & szKey,int iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(iValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
int KviConfig::readIntEntry(const TQString & szKey,int iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
int iVal=p_str->toInt(&bOk);
@ -930,13 +930,13 @@ void KviConfig::writeEntry(const TQString & szKey,unsigned int iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(iValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
unsigned int KviConfig::readUIntEntry(const TQString & szKey,unsigned int iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
unsigned int iVal=p_str->toUInt(&bOk);
@ -951,13 +951,13 @@ void KviConfig::writeEntry(const TQString & szKey,char iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_data = new TQString();
p_data->setNum(iValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
char KviConfig::readCharEntry(const TQString & szKey,char iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
char iVal=(char)p_str->toInt(&bOk);
@ -972,13 +972,13 @@ void KviConfig::writeEntry(const TQString & szKey,unsigned char iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(iValue);
p_group->tqreplace(szKey,p_data);
p_group->replace(szKey,p_data);
}
unsigned char KviConfig::readUCharEntry(const TQString & szKey,unsigned char iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->tqfind(szKey);
TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
unsigned char iVal=(unsigned char)p_str->toUInt(&bOk);

@ -200,7 +200,7 @@
void KviCryptEngineManager::registerEngine(KviCryptEngineDescription * d)
{
m_pEngineDict->tqreplace(d->szName,d);
m_pEngineDict->replace(d->szName,d);
}
void KviCryptEngineManager::unregisterEngine(const TQString &szName)
@ -222,7 +222,7 @@
KviCryptEngine * KviCryptEngineManager::allocateEngine(const TQString &szName)
{
KviCryptEngineDescription * d = m_pEngineDict->tqfind(szName);
KviCryptEngineDescription * d = m_pEngineDict->find(szName);
if(!d)return 0;
KviCryptEngine * e = d->allocFunc();
if(!e)return 0;

@ -56,7 +56,7 @@ KviDataBuffer::~KviDataBuffer()
}
}
int KviDataBuffer::tqfind(const unsigned char * block,int uSize)
int KviDataBuffer::find(const unsigned char * block,int uSize)
{
if(uSize < 1)return -1;
if(uSize > m_uSize)return -1;
@ -85,7 +85,7 @@ int KviDataBuffer::tqfind(const unsigned char * block,int uSize)
return -1;
}
int KviDataBuffer::tqfind(unsigned char c)
int KviDataBuffer::find(unsigned char c)
{
const unsigned char * p = m_pData;
const unsigned char * e = p + m_uSize;

@ -49,8 +49,8 @@ public:
void addSize(int uSize){ resize(m_uSize + uSize); };
void append(const unsigned char * data,int uSize);
void append(const KviDataBuffer &b){ append(b.data(),b.size()); };
int tqfind(unsigned char c);
int tqfind(const unsigned char * block,int uSize);
int find(unsigned char c);
int find(const unsigned char * block,int uSize);
};
#endif //_KVI_DATABUFFER_H_

@ -62,7 +62,7 @@ void KviGarbageCollector::garbageSuicide()
debug("Ops... garbage suicide while no garbage list");
return;
}
int idx = m_pGarbageList->tqfindRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
int idx = m_pGarbageList->findRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
if(idx == -1)
{
debug("Ops... unregistered garbage suicide");

@ -25,7 +25,7 @@
//
// A class to manage multiple image libraries.
// The library is in fact a big image that tqcontains
// The library is in fact a big image that contains
// several rows of other smaller images of the same size.
// The images inside the 'library' are indexed in the following way:
//

@ -165,7 +165,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m)
} // else the current has no wildcards...skip
} else {
// the new tqmask has no wildcards....
if(mt->szFileMask.tqcontains('*'))
if(mt->szFileMask.contains('*'))
{
// current one has wildcards...insert
m_pMediaTypeList->insert(index,m);
@ -188,7 +188,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m)
// the masks with no wildcards go first
// longer masks go first
bool bHasWildcards = m->szFileMask.tqcontains('*');
bool bHasWildcards = m->szFileMask.contains('*');
int index = 0;
for(KviMediaType * mt = m_pMediaTypeList->first();mt;mt = m_pMediaTypeList->next())
{
@ -207,7 +207,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m)
}
}
} else {
if(mt->szFileMask.tqcontains('*'))
if(mt->szFileMask.contains('*'))
{
m_pMediaTypeList->insert(index,m);
return;

@ -99,9 +99,9 @@ void KviRegisteredChannelDataBase::save(const char * filename)
}
}
KviRegisteredChannel * KviRegisteredChannelDataBase::tqfind(const char * name,const char * net)
KviRegisteredChannel * KviRegisteredChannelDataBase::find(const char * name,const char * net)
{
KviRegisteredChannelList * l = m_pChannelDict->tqfind(name);
KviRegisteredChannelList * l = m_pChannelDict->find(name);
if(!l)return 0;
for(KviRegisteredChannel * c = l->first();c;c = l->next())
{
@ -113,7 +113,7 @@ KviRegisteredChannel * KviRegisteredChannelDataBase::tqfind(const char * name,co
KviRegisteredChannel * KviRegisteredChannelDataBase::findExact(const char * name,const char * nettqmask)
{
KviRegisteredChannelList * l = m_pChannelDict->tqfind(name);
KviRegisteredChannelList * l = m_pChannelDict->find(name);
if(!l)return 0;
for(KviRegisteredChannel * c = l->first();c;c = l->next())
{
@ -124,7 +124,7 @@ KviRegisteredChannel * KviRegisteredChannelDataBase::findExact(const char * name
void KviRegisteredChannelDataBase::remove(KviRegisteredChannel * c)
{
KviRegisteredChannelList * l = m_pChannelDict->tqfind(c->name().ptr());
KviRegisteredChannelList * l = m_pChannelDict->find(c->name().ptr());
if(!l)return;
for(KviRegisteredChannel * ch = l->first();ch;ch = l->next())
{
@ -156,7 +156,7 @@ void KviRegisteredChannelDataBase::add(KviRegisteredChannel * c)
}
remove(old);
}
KviRegisteredChannelList * l = m_pChannelDict->tqfind(c->name().ptr());
KviRegisteredChannelList * l = m_pChannelDict->find(c->name().ptr());
if(!l)
{
l = new KviRegisteredChannelList;

@ -45,9 +45,9 @@ public:
KviPointerHashTable<const char *,KviStr> * propertyDict(){ return m_pPropertyDict; };
const KviStr & name(){ return m_szName; };
const KviStr & netMask(){ return m_szNetMask; };
KviStr * property(const char * name){ return m_pPropertyDict->tqfind(name); };
KviStr * property(const char * name){ return m_pPropertyDict->find(name); };
// val must be allocated with NEW!
void setProperty(const char * name,KviStr * val){ m_pPropertyDict->tqreplace(name,val); };
void setProperty(const char * name,KviStr * val){ m_pPropertyDict->replace(name,val); };
void removeProperty(const char * name){ m_pPropertyDict->remove(name); };
};
@ -62,7 +62,7 @@ protected:
KviPointerHashTable<const char *,KviRegisteredChannelList> * m_pChannelDict;
public:
KviPointerHashTable<const char *,KviRegisteredChannelList> * channelDict(){ return m_pChannelDict; };
KviRegisteredChannel * tqfind(const char * name,const char * net);
KviRegisteredChannel * find(const char * name,const char * net);
KviRegisteredChannel * findExact(const char * name,const char * nettqmask);
void remove(KviRegisteredChannel * c);
void add(KviRegisteredChannel * c);

@ -237,7 +237,7 @@ void KviRegisteredUser::setProperty(const TQString & name,const TQString & value
#endif
if(!val->isEmpty())
{
m_pPropertyDict->tqreplace(name,val);
m_pPropertyDict->replace(name,val);
} else {
delete val;
val = 0;
@ -251,7 +251,7 @@ bool KviRegisteredUser::getProperty(const TQString & name,TQString &value)
{
if(!m_pPropertyDict)return false;
if(name.isEmpty()) return false;
TQString * pValue = m_pPropertyDict->tqfind(name);
TQString * pValue = m_pPropertyDict->find(name);
if(pValue)value = *pValue;
else return false;
return true;
@ -261,7 +261,7 @@ const TQString & KviRegisteredUser::getProperty(const TQString & name)
{
if(!m_pPropertyDict)return KviTQString::empty;
if(name.isEmpty())return KviTQString::empty;
TQString * pValue = m_pPropertyDict->tqfind(name);
TQString * pValue = m_pPropertyDict->find(name);
if(pValue)return *pValue;
return KviTQString::empty;
}
@ -270,7 +270,7 @@ bool KviRegisteredUser::getBoolProperty(const TQString & name,bool def)
{
if(!m_pPropertyDict)return def;
if(name.isEmpty()) return def;
TQString * pValue = m_pPropertyDict->tqfind(name);
TQString * pValue = m_pPropertyDict->find(name);
if(pValue)
{
// be flexible , allow more "true" values (pragma)
@ -331,9 +331,9 @@ KviRegisteredUserDataBase::~KviRegisteredUserDataBase()
KviRegisteredUser * KviRegisteredUserDataBase::addUser(const TQString & name)
{
if(name.isEmpty()) return false;
if(m_pUserDict->tqfind(name))return 0;
if(m_pUserDict->find(name))return 0;
KviRegisteredUser * u = new KviRegisteredUser(name);
m_pUserDict->tqreplace(u->name(),u); //u->name() because we're NOT copying keys!
m_pUserDict->replace(u->name(),u); //u->name() because we're NOT copying keys!
emit(userAdded(name));
return u;
}
@ -341,20 +341,20 @@ KviRegisteredUser * KviRegisteredUserDataBase::addUser(const TQString & name)
KviRegisteredUserGroup * KviRegisteredUserDataBase::addGroup(const TQString & name)
{
if(name.isEmpty()) return false;
if(m_pGroupDict->tqfind(name))return 0;
if(m_pGroupDict->find(name))return 0;
KviRegisteredUserGroup * pGroup = new KviRegisteredUserGroup(name);
m_pGroupDict->tqreplace(pGroup->name(),pGroup); //u->name() because we're NOT copying keys!
m_pGroupDict->replace(pGroup->name(),pGroup); //u->name() because we're NOT copying keys!
return pGroup;
}
KviRegisteredUser * KviRegisteredUserDataBase::getUser(const TQString & name)
{
if(name.isEmpty()) return 0;
KviRegisteredUser * u = m_pUserDict->tqfind(name);
KviRegisteredUser * u = m_pUserDict->find(name);
if(!u)
{
u = new KviRegisteredUser(name);
m_pUserDict->tqreplace(u->name(),u); //u->name() because we're NOT copying keys!
m_pUserDict->replace(u->name(),u); //u->name() because we're NOT copying keys!
}
return u;
}
@ -378,7 +378,7 @@ static void append_mask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,Kv
KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,KviIrcMask * tqmask)
{
if(!u || !tqmask) return 0;
__range_valid(u == m_pUserDict->tqfind(u->name()));
__range_valid(u == m_pUserDict->find(u->name()));
KviRegisteredMaskList * l;
if(tqmask->hasWildNick())
@ -396,7 +396,7 @@ KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,Kvi
// masks with more info go first in the list
l = m_pWildMaskList;
} else {
l = m_pMaskDict->tqfind(tqmask->nick());
l = m_pMaskDict->find(tqmask->nick());
if(l)
{
// FIXME: #warning "Here we could compare the host and username only: nick matches for sure"
@ -486,7 +486,7 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db)
bool KviRegisteredUserDataBase::removeUser(const TQString & name)
{
if(name.isEmpty()) return false;
KviRegisteredUser * u = m_pUserDict->tqfind(name);
KviRegisteredUser * u = m_pUserDict->find(name);
if(!u)return false;
while(KviIrcMask * tqmask = u->maskList()->first())
{
@ -537,7 +537,7 @@ bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * tqmask)
}
// not found ...opz :)
} else {
KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask->nick());
KviRegisteredMaskList * l = m_pMaskDict->find(tqmask->nick());
if(l)
{
// FIXME: #warning "Here we could compare the host and username only: nick matches for sure"
@ -566,7 +566,7 @@ bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * tqmask)
KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const KviIrcMask &tqmask)
{
// first lookup the nickname in the maskDict
KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask.nick());
KviRegisteredMaskList * l = m_pMaskDict->find(tqmask.nick());
if(l)
{
for(KviRegisteredMask *m = l->first();m;m = l->next())
@ -593,7 +593,7 @@ KviRegisteredMask * KviRegisteredUserDataBase::findMatchingMask(const TQString &
{
// first lookup the nickname in the maskDict
if(nick.isEmpty()) return false;
KviRegisteredMaskList * l = m_pMaskDict->tqfind(nick);
KviRegisteredMaskList * l = m_pMaskDict->find(nick);
if(l)
{
for(KviRegisteredMask *m = l->first();m;m = l->next())
@ -620,7 +620,7 @@ KviRegisteredMask * KviRegisteredUserDataBase::findExactMask(const KviIrcMask &t
{
// first lookup the nickname in the maskDict
if(tqmask.nick()=="") return 0;
KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask.nick());
KviRegisteredMaskList * l = m_pMaskDict->find(tqmask.nick());
if(l)
{
for(KviRegisteredMask *m = l->first();m;m = l->next())
@ -686,7 +686,7 @@ void KviRegisteredUserDataBase::load(const TQString & filename)
}
++it;
}
if(!m_pGroupDict->tqfind(__tr("Default")))
if(!m_pGroupDict->find(__tr("Default")))
addGroup(__tr("Default"));
}

@ -172,7 +172,7 @@ public:
KviRegisteredUser * getUser(const TQString &name); // returns existing or adds
bool removeUser(const TQString &name);
bool removeGroup(const TQString &name);
KviRegisteredUser * findUserByName(const TQString &name){ return m_pUserDict->tqfind(name); };
KviRegisteredUser * findUserByName(const TQString &name){ return m_pUserDict->find(name); };
// tqmask must be allocated on the heap and the ownership is transferred!
// returns non zero if there is already an user with this tqmask (returns the pointer to it!)
KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * tqmask);

@ -87,10 +87,10 @@ KviSharedFile::KviSharedFile(const TQString &szName,const TQString &szAbsPath,co
m_expireTime = expireTime;
m_uFileSize = uFileSize;
#ifdef COMPILE_USE_QT4
// QT4ROX: Because they have finally moved the functionality of TQString::tqcontains() to TQString::count(), and TQString::tqcontains() now does the right job
// QT4ROX: Because they have finally moved the functionality of TQString::contains() to TQString::count(), and TQString::contains() now does the right job
m_uWildCount = m_szUserMask.count('*');
#else
m_uWildCount = m_szUserMask.tqcontains('*');
m_uWildCount = m_szUserMask.contains('*');
#endif
m_uNonWildCount = m_szUserMask.length() - m_uWildCount;
}
@ -224,12 +224,12 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o)
void KviSharedFilesManager::addSharedFile(KviSharedFile * f)
{
// First find the list
KviSharedFileList * l = m_pSharedListDict->tqfind(f->name());
KviSharedFileList * l = m_pSharedListDict->find(f->name());
if(!l)
{
l = new KviSharedFileList;
l->setAutoDelete(true);
m_pSharedListDict->tqreplace(f->name(),l);
m_pSharedListDict->replace(f->name(),l);
}
doInsert(l,f);
@ -248,12 +248,12 @@ KviSharedFile * KviSharedFilesManager::addSharedFile(const TQString &szName,cons
if(inf.exists() && inf.isFile() && inf.isReadable() && (inf.size() > 0))
{
// First find the list
KviSharedFileList * l = m_pSharedListDict->tqfind(szName);
KviSharedFileList * l = m_pSharedListDict->find(szName);
if(!l)
{
l = new KviSharedFileList;
l->setAutoDelete(true);
m_pSharedListDict->tqreplace(szName,l);
m_pSharedListDict->replace(szName,l);
}
// Now insert
@ -277,7 +277,7 @@ KviSharedFile * KviSharedFilesManager::addSharedFile(const TQString &szName,cons
KviSharedFile * KviSharedFilesManager::lookupSharedFile(const TQString &szName,KviIrcMask * tqmask,unsigned int uFileSize)
{
KviSharedFileList * l = m_pSharedListDict->tqfind(szName);
KviSharedFileList * l = m_pSharedListDict->find(szName);
if(!l)return 0;
for(KviSharedFile * o = l->first();o;o = l->next())
@ -301,7 +301,7 @@ KviSharedFile * KviSharedFilesManager::lookupSharedFile(const TQString &szName,K
}
bool KviSharedFilesManager::removeSharedFile(const TQString &szName,const TQString &szMask,unsigned int uFileSize)
{
KviSharedFileList * l = m_pSharedListDict->tqfind(szName);
KviSharedFileList * l = m_pSharedListDict->find(szName);
if(!l)return false;
for(KviSharedFile * o = l->first();o;o = l->next())
{
@ -323,7 +323,7 @@ bool KviSharedFilesManager::removeSharedFile(const TQString &szName,const TQStri
bool KviSharedFilesManager::removeSharedFile(const TQString &szName,KviSharedFile * off)
{
KviSharedFileList * l = m_pSharedListDict->tqfind(szName);
KviSharedFileList * l = m_pSharedListDict->find(szName);
if(!l)return false;
for(KviSharedFile * o = l->first();o;o = l->next())
{

@ -49,7 +49,7 @@ namespace KviStringConversion
{
if(!g_szLocalDir.isEmpty())
{
if(KviTQString::tqfind(buffer,g_szLocalDir)==0)
if(KviTQString::find(buffer,g_szLocalDir)==0)
{
buffer.remove(0,g_szLocalDir.length());
buffer.prepend("local://");
@ -57,7 +57,7 @@ namespace KviStringConversion
}
if(!g_szGlobalDir.isEmpty())
{
if(KviTQString::tqfind(buffer,g_szGlobalDir)==0)
if(KviTQString::find(buffer,g_szGlobalDir)==0)
{
buffer.remove(0,g_szGlobalDir.length());
buffer.prepend("global://");
@ -72,7 +72,7 @@ namespace KviStringConversion
{
if(!g_szLocalDir.isEmpty())
{
if(KviTQString::tqfind(buffer,"local://")==0)
if(KviTQString::find(buffer,"local://")==0)
{
buffer.remove(0,8);
buffer.prepend(g_szLocalDir);
@ -80,7 +80,7 @@ namespace KviStringConversion
}
if(!g_szGlobalDir.isEmpty())
{
if(KviTQString::tqfind(buffer,"global://")==0)
if(KviTQString::find(buffer,"global://")==0)
{
buffer.remove(0,9);
buffer.prepend(g_szGlobalDir);
@ -250,11 +250,11 @@ namespace KviStringConversion
if(bOk && (i >= 0))buffer.setWeight(i);
if(!str.isEmpty())
{
buffer.setBold(str.tqcontains("b"));
buffer.setItalic(str.tqcontains("i"));
buffer.setUnderline(str.tqcontains("u"));
buffer.setStrikeOut(str.tqcontains("s"));
buffer.setFixedPitch(str.tqcontains("f"));
buffer.setBold(str.contains("b"));
buffer.setItalic(str.contains("i"));
buffer.setUnderline(str.contains("u"));
buffer.setStrikeOut(str.contains("s"));
buffer.setFixedPitch(str.contains("f"));
}
return true;
}

@ -108,7 +108,7 @@ namespace KviFileUtils
#ifdef COMPILE_USE_QT4
int idx = dir.indexOf(':');
#else
int idx = dir.tqfind(':');
int idx = dir.find(':');
#endif
if(idx == 1)
{
@ -212,20 +212,20 @@ namespace KviFileUtils
void adjustFilePath(TQString &szPath)
{
#ifdef COMPILE_ON_WINDOWS
szPath.tqreplace('/',"\\");
szPath.replace('/',"\\");
#ifdef COMPILE_USE_QT4
szPath.tqreplace("\\\\","\\");
szPath.replace("\\\\","\\");
#else
while(szPath.tqfind("\\\\") != -1)szPath.tqreplace("\\\\","\\");
while(szPath.find("\\\\") != -1)szPath.replace("\\\\","\\");
#endif
// FIXME: Use the default drive here ?
if(szPath.startsWith("\\"))szPath.prepend("C:");
#else
szPath.tqreplace('\\',"/");
szPath.replace('\\',"/");
#ifdef COMPILE_USE_QT4
szPath.tqreplace("//","/");
szPath.replace("//","/");
#else
while(KviTQString::tqfind(szPath,"//") != -1)szPath.tqreplace("//","/");
while(KviTQString::find(szPath,"//") != -1)szPath.replace("//","/");
#endif
// deal with windows paths
if((szPath.length() > 2) && (szPath.at(0) != TQChar('/')))

@ -196,12 +196,12 @@ KviPackageWriter::~KviPackageWriter()
void KviPackageWriter::addInfoField(const TQString &szName,const TQString &szValue)
{
m_pStringInfoFields->tqreplace(szName,new TQString(szValue));
m_pStringInfoFields->replace(szName,new TQString(szValue));
}
void KviPackageWriter::addInfoField(const TQString &szName,TQByteArray * pValue)
{
m_pBinaryInfoFields->tqreplace(szName,pValue);
m_pBinaryInfoFields->replace(szName,pValue);
}
bool KviPackageWriter::addFile(const TQString &szLocalFileName,const TQString &szTargetFileName,kvi_u32_t uAddFileFlags)
@ -696,7 +696,7 @@ bool KviPackageReader::readHeaderInternal(KviFile * pFile,const TQString &szLoca
{
TQString szValue;
if(!pFile->load(szValue))return readError();
m_pStringInfoFields->tqreplace(szKey,new TQString(szValue));
m_pStringInfoFields->replace(szKey,new TQString(szValue));
}
break;
case KVI_PACKAGE_INFOFIELD_TYPE_BINARYBUFFER:
@ -707,7 +707,7 @@ bool KviPackageReader::readHeaderInternal(KviFile * pFile,const TQString &szLoca
delete pbValue;
return readError();
}
m_pBinaryInfoFields->tqreplace(szKey,pbValue);
m_pBinaryInfoFields->replace(szKey,pbValue);
}
break;
default:
@ -757,12 +757,12 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const TQString &szUnpackPath)
szFileName += szPath;
// no attacks please :)
szFileName.tqreplace(TQString("..\\"),TQString(""));
szFileName.tqreplace(TQString("..//"),TQString(""));
szFileName.replace(TQString("..\\"),TQString(""));
szFileName.replace(TQString("..//"),TQString(""));
KviFileUtils::adjustFilePath(szFileName);
int idx = KviTQString::tqfindRev(szFileName,TQChar(KVI_PATH_SEPARATOR_CHAR));
int idx = KviTQString::findRev(szFileName,TQChar(KVI_PATH_SEPARATOR_CHAR));
if(idx != -1)
{
TQString szPrefixPath = szFileName.left(idx);
@ -960,7 +960,7 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const TQString &szUnpackPath)
bool KviPackageReader::getStringInfoField(const TQString &szName,TQString &szBuffer)
{
TQString * pVal = m_pStringInfoFields->tqfind(szName);
TQString * pVal = m_pStringInfoFields->find(szName);
if(!pVal)return false;
szBuffer = *pVal;
return true;

@ -76,7 +76,7 @@ public:
// ex: /home/pragma/.kvirc/avatars/pragma.png
// local path->name : strip leading path informations
// name->local path : tqreplace : / and
// name->local path : replace : / and
};

@ -76,7 +76,7 @@ KviAvatarCache::~KviAvatarCache()
}
void KviAvatarCache::tqreplace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork)
void KviAvatarCache::replace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork)
{
TQString szKey;
@ -88,7 +88,7 @@ void KviAvatarCache::tqreplace(const TQString &szIdString,const KviIrcMask &tqma
e->szIdString = szIdString;
e->tLastAccess = kvi_unixTime();
m_pAvatarDict->tqreplace(szKey,e);
m_pAvatarDict->replace(szKey,e);
if(m_pAvatarDict->count() > MAX_AVATARS_IN_CACHE)
{
@ -117,7 +117,7 @@ const TQString & KviAvatarCache::lookup(const KviIrcMask &tqmask,const TQString
szKey.append(TQChar('+'));
szKey.append(szNetwork);
KviAvatarCacheEntry * e = m_pAvatarDict->tqfind(szKey);
KviAvatarCacheEntry * e = m_pAvatarDict->find(szKey);
if(!e)return KviTQString::empty;
e->tLastAccess = kvi_unixTime();
return e->szIdString;
@ -149,7 +149,7 @@ void KviAvatarCache::load(const TQString &szFileName)
KviAvatarCacheEntry * e = new KviAvatarCacheEntry;
e->tLastAccess = tLastAccess;
e->szIdString = szIdString;
m_pAvatarDict->tqreplace(it.currentKey(),e);
m_pAvatarDict->replace(it.currentKey(),e);
cnt++;
if(cnt >= MAX_AVATARS_IN_CACHE)return; // done
}

@ -55,7 +55,7 @@ public:
static KviAvatarCache * instance(){ return m_pAvatarCacheInstance; };
void tqreplace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork);
void replace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork);
void remove(const KviIrcMask &tqmask,const TQString &szNetwork);
const TQString & lookup(const KviIrcMask &tqmask,const TQString &szNetwork);

@ -60,7 +60,7 @@
+: i line with ident[br]
=: i line with OTHER type ident[br]
-: i line, no ident[br]
So finally you can tqfind <username> strings like "~pragma" or "^pragma", where "pragma"
So finally you can find <username> strings like "~pragma" or "^pragma", where "pragma"
is the system username of the irc-user and ~ and ^ are prefixes.[br]
The <host> part is the hostname of the remote user.[br]
In most cases it is the human-readable format of the host name, but sometimes

@ -69,7 +69,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::findServer(const KviIrcServer * pServ
void KviIrcServerDataBaseRecord::setCurrentServer(KviIrcServer *srv)
{
if(m_pServerList->tqfindRef(srv) != -1)m_pCurrentServer = srv;
if(m_pServerList->findRef(srv) != -1)m_pCurrentServer = srv;
}
KviIrcServer * KviIrcServerDataBaseRecord::currentServer()
@ -126,19 +126,19 @@ void KviIrcServerDataBase::clear()
KviIrcServerDataBaseRecord * KviIrcServerDataBase::insertNetwork(KviIrcNetwork *n)
{
KviIrcServerDataBaseRecord * r = new KviIrcServerDataBaseRecord(n);
m_pRecords->tqreplace(n->name(),r);
m_pRecords->replace(n->name(),r);
return r;
}
KviIrcServerDataBaseRecord * KviIrcServerDataBase::findRecord(const TQString &szNetName)
{
return m_pRecords->tqfind(szNetName);
return m_pRecords->find(szNetName);
}
KviIrcNetwork * KviIrcServerDataBase::findNetwork(const TQString &szName)
{
KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(szName);
KviIrcServerDataBaseRecord * r = m_pRecords->find(szName);
if(!r)return 0;
return r->network();
}
@ -146,7 +146,7 @@ KviIrcNetwork * KviIrcServerDataBase::findNetwork(const TQString &szName)
KviIrcServerDataBaseRecord * KviIrcServerDataBase::currentRecord()
{
KviIrcServerDataBaseRecord * r = 0;
if(!m_szCurrentNetwork.isEmpty())r = m_pRecords->tqfind(m_szCurrentNetwork);
if(!m_szCurrentNetwork.isEmpty())r = m_pRecords->find(m_szCurrentNetwork);
if(r)return r;
KviPointerHashTableIterator<TQString,KviIrcServerDataBaseRecord> it(*m_pRecords);
@ -185,11 +185,11 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const TQString &szNetN
for(KviIrcServer * s = r->m_pServerList->first();s;s = r->m_pServerList->next())
{
#ifdef COMPILE_USE_QT4
if(s->m_szDescription.tqcontains("random",TQt::CaseInsensitive) ||
(s->m_szDescription.tqcontains("round",TQt::CaseInsensitive) && s->m_szDescription.tqcontains("robin",TQt::CaseInsensitive)))
if(s->m_szDescription.contains("random",TQt::CaseInsensitive) ||
(s->m_szDescription.contains("round",TQt::CaseInsensitive) && s->m_szDescription.contains("robin",TQt::CaseInsensitive)))
#else
if(s->m_szDescription.tqcontains("random",false) ||
(s->m_szDescription.tqcontains("round",false) && s->m_szDescription.tqcontains("robin",false)))
if(s->m_szDescription.contains("random",false) ||
(s->m_szDescription.contains("round",false) && s->m_szDescription.contains("robin",false)))
#endif
{
r->setCurrentServer(s);
@ -234,7 +234,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,TQString
// net:networkname form
TQString szNet = d->szServer;
szNet.remove(0,4);
KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(szNet);
KviIrcServerDataBaseRecord * r = m_pRecords->find(szNet);
if(r)return makeCurrentBestServerInNetwork(szNet,r,szError);
szError = __tr2qs("The server specification seems to be in the net:<string> but the network couln't be found in the database");
return false;
@ -344,13 +344,13 @@ search_finished:
{
// is it a valid hostname ? (must contain at least one dot)
#ifdef COMPILE_USE_QT4
if(!d->szServer.tqcontains('.'))
if(!d->szServer.contains('.'))
#else
if(d->szServer.tqcontains('.') < 1)
if(d->szServer.contains('.') < 1)
#endif
{
// assume it is a network name!
KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(d->szServer);
KviIrcServerDataBaseRecord * r = m_pRecords->find(d->szServer);
if(r)return makeCurrentBestServerInNetwork(d->szServer,r,szError);
// else probably not a network name
}
@ -358,11 +358,11 @@ search_finished:
// a valid hostname or ip address , not found in list : add it and make it current
r = m_pRecords->tqfind(__tr2qs("Standalone Servers"));
r = m_pRecords->find(__tr2qs("Standalone Servers"));
if(!r)
{
r = new KviIrcServerDataBaseRecord(new KviIrcNetwork(__tr2qs("Standalone Servers")));
m_pRecords->tqreplace(r->network()->name(),r);
m_pRecords->replace(r->network()->name(),r);
}
KviIrcServer * s = new KviIrcServer();
@ -401,7 +401,7 @@ void parseMircServerRecord(TQString entry,TQString& szNet,
TQString& szDescription,TQString& szHost,TQString& szPort,bool& bSsl,kvi_u32_t& uPort)
{
bSsl = false;
int idx = KviTQString::tqfind(entry,"SERVER:");
int idx = KviTQString::find(entry,"SERVER:");
if(idx != -1)
{
szDescription = entry.left(idx);
@ -409,7 +409,7 @@ void parseMircServerRecord(TQString entry,TQString& szNet,
szDescription=szDescription.section(':',1,1);
entry.remove(0,idx + 7);
idx = KviTQString::tqfind(entry,"GROUP:");
idx = KviTQString::find(entry,"GROUP:");
if(idx != -1)
{
szHost = entry.left(idx);

@ -114,7 +114,7 @@ KviIrcUserDataBase::~KviIrcUserDataBase()
bool KviIrcUserDataBase::haveCustomColor(const TQString & nick)
{
KviIrcUserEntry *u = tqfind(nick);
KviIrcUserEntry *u = find(nick);
if(!u) return false;
if( u->m_szLastRegisteredMatchNick!=nick)
registeredUser(nick);
@ -127,7 +127,7 @@ bool KviIrcUserDataBase::haveCustomColor(const TQString & nick)
TQColor* KviIrcUserDataBase::customColor(const TQString & nick)
{
KviIrcUserEntry *u = tqfind(nick);
KviIrcUserEntry *u = find(nick);
if(!u) return 0;
if( u->m_szLastRegisteredMatchNick!=nick)
registeredUser(nick);
@ -143,7 +143,7 @@ TQColor* KviIrcUserDataBase::customColor(const TQString & nick)
KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick,const TQString & user,const TQString & host)
{
if(nick.isEmpty()) return 0;
KviIrcUserEntry *u = tqfind(nick);
KviIrcUserEntry *u = find(nick);
if(!u) return g_pRegisteredUserDataBase->findMatchingUser(nick,user,host);
KviRegisteredUser* pUser=0;
@ -189,7 +189,7 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick,cons
KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick)
{
if(nick.isEmpty()) return 0;
KviIrcUserEntry *u = tqfind(nick);
KviIrcUserEntry *u = find(nick);
if(!u) return 0;
return registeredUser(nick,u->user(),u->host());
}
@ -203,7 +203,7 @@ void KviIrcUserDataBase::clear()
KviIrcUserEntry * KviIrcUserDataBase::insertUser(const TQString &nick,const TQString &user,const TQString &hostname)
{
KviIrcUserEntry * e = m_pDict->tqfind(nick);
KviIrcUserEntry * e = m_pDict->find(nick);
if(e)
{
e->m_nRefs++;

@ -125,7 +125,7 @@ private:
public:
void clear();
KviIrcUserEntry * insertUser(const TQString &nick,const TQString &user,const TQString &hostname);
KviIrcUserEntry * tqfind(const TQString &nick){ return m_pDict->tqfind(nick); };
KviIrcUserEntry * find(const TQString &nick){ return m_pDict->find(nick); };
void removeUser(const TQString &nick,KviIrcUserEntry * e);
KviPointerHashTable<TQString,KviIrcUserEntry> * dict(){ return m_pDict; };

@ -148,7 +148,7 @@ const KviUserIdentity * KviUserIdentityManager::defaultIdentity()
KviUserIdentity * ret;
if(!m_szDefaultIdentity.isEmpty())
{
ret = m_pIdentityDict->tqfind(m_szDefaultIdentity);
ret = m_pIdentityDict->find(m_szDefaultIdentity);
if(ret)return ret;
}
@ -174,7 +174,7 @@ const KviUserIdentity * KviUserIdentityManager::defaultIdentity()
ret->setPartMessage(KVI_DEFAULT_PART_MESSAGE);
ret->setQuitMessage(KVI_DEFAULT_TQUIT_MESSAGE);
m_pIdentityDict->tqreplace(ret->id(),ret);
m_pIdentityDict->replace(ret->id(),ret);
return ret;
}
@ -198,7 +198,7 @@ void KviUserIdentityManager::load(const TQString &szFileName)
KviUserIdentity * id = new KviUserIdentity();
if(id->load(cfg))
m_pIdentityDict->tqreplace(id->id(),id);
m_pIdentityDict->replace(id->id(),id);
else
delete id;
}
@ -232,7 +232,7 @@ void KviUserIdentityManager::copyFrom(KviUserIdentityManager * pWorkingCopy)
{
KviUserIdentity * pNew = new KviUserIdentity();
pNew->copyFrom(*id);
m_pIdentityDict->tqreplace(pNew->id(),pNew);
m_pIdentityDict->replace(pNew->id(),pNew);
++it;
}
}

@ -128,7 +128,7 @@ public:
static KviUserIdentityManager * instance(){ return m_pInstance; };
KviPointerHashTable<TQString,KviUserIdentity> * identityDict(){ return m_pIdentityDict; };
const KviUserIdentity * findIdentity(const TQString &szId){ return m_pIdentityDict->tqfind(szId); };
const KviUserIdentity * findIdentity(const TQString &szId){ return m_pIdentityDict->find(szId); };
// NEVER NULL
const KviUserIdentity * defaultIdentity();

@ -348,13 +348,13 @@ bool KviHttpRequest::event(TQEvent *e)
void KviHttpRequest::emitLines(KviDataBuffer * pDataBuffer)
{
int idx = pDataBuffer->tqfind((const unsigned char *)"\n",1);
int idx = pDataBuffer->find((const unsigned char *)"\n",1);
while(idx != -1)
{
KviStr tmp((const char *)(m_pBuffer->data()),idx);
tmp.stripRight('\r');
pDataBuffer->remove(idx + 1);
idx = pDataBuffer->tqfind((const unsigned char *)"\n",1);
idx = pDataBuffer->find((const unsigned char *)"\n",1);
emit data(tmp);
}
}
@ -531,12 +531,12 @@ bool KviHttpRequest::processHeader(KviStr &szHeader)
KviStr szName = s->left(idx);
s->cutLeft(idx + 1);
s->stripWhiteSpace();
hdr.tqreplace(szName.ptr(),new KviStr(*s));
hdr.replace(szName.ptr(),new KviStr(*s));
//debug("FOUND HEADER (%s)=(%s)",szName.ptr(),s->ptr());
}
}
KviStr * size = hdr.tqfind("Content-length");
KviStr * size = hdr.find("Content-length");
if(size)
{
bool bOk;
@ -544,13 +544,13 @@ bool KviHttpRequest::processHeader(KviStr &szHeader)
if(!bOk)m_uTotalSize = 0;
}
KviStr * contentEncoding = hdr.tqfind("Content-encoding");
KviStr * contentEncoding = hdr.find("Content-encoding");
if(contentEncoding)
{
m_bGzip = contentEncoding->equalsCI("gzip");
}
KviStr * transferEncoding = hdr.tqfind("Transfer-Encoding");
KviStr * transferEncoding = hdr.find("Transfer-Encoding");
if(transferEncoding)
{
if(kvi_strEqualCI(transferEncoding->ptr(),"chunked"))
@ -651,7 +651,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
// time to process the header
m_pBuffer->append(*data);
int idx = m_pBuffer->tqfind((const unsigned char *)"\r\n\r\n",4);
int idx = m_pBuffer->find((const unsigned char *)"\r\n\r\n",4);
if(idx == -1)
{
// header not complete
@ -721,7 +721,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
// we're processing data in m_pBuffer here
if(m_bChunkedTransferEncoding)
{
// The transfer encoding is chunked: the buffer tqcontains
// The transfer encoding is chunked: the buffer contains
// chunks of data with an initial header composed
// of a hexadecimal length, an optional bullshit and a single CRLF
// The transfer terminates when we read a last chunk of size 0
@ -776,7 +776,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
// We're looking for the beginning of a chunk now.
// Note that we might be at the end of a previous chunk that has a CRLF terminator
// we need to skip it.
int crlf = m_pBuffer->tqfind((const unsigned char *)"\r\n",2);
int crlf = m_pBuffer->find((const unsigned char *)"\r\n",2);
if(crlf != -1)
{
if(crlf == 0)

@ -564,7 +564,7 @@ void KviSSLCertificate::splitX509String(KviPointerHashTable<const char *,KviStr>
arr[i]->cutLeft(idx + 1);
if(szTok.hasData() && arr[i]->hasData())
{
dict->tqreplace(szTok.ptr(),new KviStr(arr[i]->ptr()));
dict->replace(szTok.ptr(),new KviStr(arr[i]->ptr()));
}
}
}
@ -577,7 +577,7 @@ void KviSSLCertificate::splitX509String(KviPointerHashTable<const char *,KviStr>
const char * KviSSLCertificate::dictEntry(KviPointerHashTable<const char *,KviStr> * dict,const char * entry)
{
KviStr * t = dict->tqfind(entry);
KviStr * t = dict->find(entry);
if(!t)return __tr("Unknown");
return t->ptr();
}

@ -609,7 +609,7 @@ bool KviMessageCatalogue::load(const TQString& name)
KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].length));
// In some (or all?) *.mo files the first string
// is zero bytes long and the translated one tqcontains
// is zero bytes long and the translated one contains
// informations about the translation
if(e->m_szKey.len() == 0)
{
@ -629,7 +629,7 @@ bool KviMessageCatalogue::load(const TQString& name)
// find out the text encoding , if possible
if(szHeader.hasData())
{
// tqfind "charset=*\n"
// find "charset=*\n"
int idx = szHeader.findFirstIdx("charset=");
if(idx != -1)
{
@ -658,14 +658,14 @@ bool KviMessageCatalogue::load(const TQString& name)
const char * KviMessageCatalogue::translate(const char *text)
{
KviTranslationEntry * aux = m_pMessages->tqfind(text);
KviTranslationEntry * aux = m_pMessages->find(text);
if(aux)return aux->m_szEncodedTranslation.ptr();
return text;
}
const TQString & KviMessageCatalogue::translateToTQString(const char *text)
{
KviTranslationEntry * aux = m_pMessages->tqfind(text);
KviTranslationEntry * aux = m_pMessages->find(text);
if(aux)
{
if(aux->m_pTQTranslation)return *(aux->m_pTQTranslation);
@ -838,7 +838,7 @@ namespace KviLocale
if(idx != -1)
{
// composite codec: either UTF-8 [child codec] or child codec [UTF-8]
KviSmartTextCodec * c = g_pSmartCodecDict->tqfind(szName);
KviSmartTextCodec * c = g_pSmartCodecDict->find(szName);
if(c)return c;
@ -855,7 +855,7 @@ namespace KviLocale
}
if(c->ok())
{
g_pSmartCodecDict->tqreplace(szName,c);
g_pSmartCodecDict->replace(szName,c);
return c;
} else {
delete c;
@ -872,7 +872,7 @@ namespace KviLocale
bool loadCatalogue(const TQString &name,const TQString &szLocaleDir)
{
//debug("Looking up catalogue %s",name);
if(g_pCatalogueDict->tqfind(KviTQString::toUtf8(name).data()))return true; // already loaded
if(g_pCatalogueDict->find(KviTQString::toUtf8(name).data()))return true; // already loaded
TQString szBuffer;
@ -1041,7 +1041,7 @@ namespace KviLocale
KviMessageCatalogue * getLoadedCatalogue(const TQString& name)
{
return g_pCatalogueDict->tqfind(KviTQString::toUtf8(name).data());
return g_pCatalogueDict->find(KviTQString::toUtf8(name).data());
}
@ -1049,7 +1049,7 @@ namespace KviLocale
{
if(context)
{
KviMessageCatalogue * c = g_pCatalogueDict->tqfind(context);
KviMessageCatalogue * c = g_pCatalogueDict->find(context);
if(!c)
{
// FIXME: Should really try to load the catalogue here!
@ -1065,7 +1065,7 @@ namespace KviLocale
{
if(context)
{
KviMessageCatalogue * c = g_pCatalogueDict->tqfind(context);
KviMessageCatalogue * c = g_pCatalogueDict->find(context);
if(!c)
{
// FIXME: Should really try to load the catalogue here!
@ -1099,7 +1099,7 @@ TQString KviTranslator::translate(const char *context,const char * message,const
}
#endif
TQString KviTranslator::tqfind(const char *context,const char * message) const
TQString KviTranslator::find(const char *context,const char * message) const
{
// we ignore contexts for qt translations
return g_pMainCatalogue->translateToTQString(message);

@ -136,7 +136,7 @@ class KVILIB_API KviTranslator : public TQTranslator
virtual TQString translate(const char * context,const char * message,const char * comment) const;
#endif
// Deprecated in qt 4.x
virtual TQString tqfind(const char * context,const char * message) const;
virtual TQString find(const char * context,const char * message) const;
#ifndef COMPILE_USE_QT4
// Dead in qt 4.x
virtual TQTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const;

@ -458,7 +458,7 @@
KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState(KviTalCheckListItem *key) const
{
TQHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState>::Iterator it = d->statesDict.tqfind(key);
TQHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState>::Iterator it = d->statesDict.find(key);
if (it != d->statesDict.end())
return it.value();
else
@ -499,7 +499,7 @@
TQRect r(x, y, boxsize-3, boxsize-3);
// columns might have been swapped
r.moveBy(lv->header()->sectionPos(0), 0);
if (!r.tqcontains(pos))
if (!r.contains(pos))
return;
}
if ((myType == CheckBox) || (myType == CheckBoxController)) {
@ -1187,7 +1187,7 @@
void KviTalCheckListItem::setStoredState( ToggleState newState, void *key )
{
if ( myType == CheckBox || myType == CheckBoxController )
d->statesDict->tqreplace( key, new ToggleState(newState) );
d->statesDict->replace( key, new ToggleState(newState) );
}
KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState( void *key ) const
@ -1195,7 +1195,7 @@
if ( !d->statesDict )
return Off;
ToggleState *foundState = d->statesDict->tqfind( key );
ToggleState *foundState = d->statesDict->find( key );
if ( foundState )
return ToggleState( *foundState );
else
@ -1236,7 +1236,7 @@
TQRect r( x, y, boxsize-3, boxsize-3 );
// columns might have been swapped
r.moveBy( lv->header()->sectionPos( 0 ), 0 );
if ( !r.tqcontains( pos ) )
if ( !r.contains( pos ) )
return;
}
if ( ( myType == CheckBox ) || ( myType == CheckBoxController) ) {

@ -60,7 +60,7 @@ KviActionManager::KviActionManager()
#define CATEGORY(__var,__name,__vname,__descr) \
__var = new KviActionCategory(__name,__vname,__descr); \
m_pCategories->tqreplace(__name,__var)
m_pCategories->replace(__name,__var)
CATEGORY(m_pCategoryIrc,"irc",__tr2qs("IRC"),__tr2qs("IRC Context related actions"));
CATEGORY(m_pCategoryGeneric,"generic",__tr2qs("Generic"),__tr2qs("Generic actions"));
@ -146,7 +146,7 @@ void KviActionManager::killAllKvsUserActions()
bool KviActionManager::coreActionExists(const TQString &szName)
{
KviAction *a = m_pActions->tqfind(szName);
KviAction *a = m_pActions->find(szName);
if(a)return (!a->isKviUserActionNeverOverrideThis());
return false;
}
@ -159,7 +159,7 @@ TQString KviActionManager::nameForAutomaticAction(const TQString &szTemplate)
do {
KviTQString::sprintf(ret,"%Q%d",&szTemplate,i);
i++;
} while(m_pActions->tqfind(ret));
} while(m_pActions->find(ret));
return ret;
}
@ -173,7 +173,7 @@ KviActionCategory * KviActionManager::category(const TQString &szName)
{
if(!szName.isEmpty())
{
KviActionCategory * c = m_pCategories->tqfind(szName);
KviActionCategory * c = m_pCategories->find(szName);
if(c)return c;
}
return m_pCategoryGeneric;
@ -248,7 +248,7 @@ void KviActionManager::delayedRegisterAccelerators()
bool KviActionManager::registerAction(KviAction * a)
{
if(m_pActions->tqfind(a->name()))return false;
if(m_pActions->find(a->name()))return false;
connect(a,TQT_SIGNAL(destroyed()),this,TQT_SLOT(actionDestroyed()));
m_pActions->insert(a->name(),a);
if(g_pFrame)a->registerAccelerator(); // otherwise it is delayed!
@ -263,7 +263,7 @@ void KviActionManager::actionDestroyed()
bool KviActionManager::unregisterAction(const TQString &szName)
{
KviAction * a = m_pActions->tqfind(szName);
KviAction * a = m_pActions->find(szName);
if(!a)return false;
disconnect(a,TQT_SIGNAL(destroyed()),this,TQT_SLOT(actionDestroyed()));
a->unregisterAccelerator();
@ -272,15 +272,15 @@ bool KviActionManager::unregisterAction(const TQString &szName)
KviAction * KviActionManager::getAction(const TQString &szName)
{
KviAction * a = m_pActions->tqfind(szName);
KviAction * a = m_pActions->find(szName);
if(a)return a;
int idx = szName.tqfind('.');
int idx = szName.find('.');
if(idx < 0)
{
// backward compatibility: try to lookup the name with the kvirc. prefix
TQString s = "kvirc.";
s += szName;
return m_pActions->tqfind(s);
return m_pActions->find(s);
}
if((idx == 5) && (!m_bCoreActionsRegistered))
{
@ -293,14 +293,14 @@ KviAction * KviActionManager::getAction(const TQString &szName)
{
register_core_actions(this);
m_bCoreActionsRegistered = true;
a = m_pActions->tqfind(szName);
a = m_pActions->find(szName);
return a;
}
}
// try to preload the module that might register this action...
TQString szModule = szName.left(idx);
if(!g_pModuleManager->getModule(szModule))return 0;
return m_pActions->tqfind(szName);
return m_pActions->find(szName);
}
void KviActionManager::listActionsByCategory(const TQString &szCatName,KviPointerList<KviAction> * pBuffer)

@ -96,7 +96,7 @@ public:
void emitRemoveActionsHintRequest();
protected:
void setCurrentToolBar(KviCustomToolBar * t);
KviAction * findAction(const TQString &szName){ return m_pActions->tqfind(szName); };
KviAction * findAction(const TQString &szName){ return m_pActions->find(szName); };
void customizeToolBarsDialogCreated();
void customizeToolBarsDialogDestroyed();
void tryFindCurrentToolBar();

@ -482,8 +482,8 @@ void KviApp::setup()
{
TQString szStyleData;
KviFileUtils::readFile(szStylesheetFile,szStyleData);
szStyleData.tqreplace("global://",m_szGlobalKvircDir);
szStyleData.tqreplace("local://",m_szLocalKvircDir);
szStyleData.replace("global://",m_szGlobalKvircDir);
szStyleData.replace("local://",m_szLocalKvircDir);
setStyleSheet(szStyleData);
}
#endif
@ -703,7 +703,7 @@ void KviApp::contextSensitiveHelp()
TQMetaObject * o = w->tqmetaObject();
if(o)
{
int i = o->tqfindProperty("contextSensitiveHelp",true);
int i = o->findProperty("contextSensitiveHelp",true);
if(i != -1)
{
TQVariant v = w->property("contextSensitiveHelp");
@ -733,7 +733,7 @@ void KviApp::loadDefaultScript()
cmd.prepend("parse \"");
cmd.append("\"");
#ifdef COMPILE_ON_WINDOWS
cmd.tqreplace("\\","\\\\");
cmd.replace("\\","\\\\");
#endif
KviKvsScript::run(cmd,g_pFrame->firstConsole());
// now line up the toolbars (they may get messed while loading the script)
@ -1785,7 +1785,7 @@ KviConsole * KviApp::topmostConnectedConsole()
KviWindow * KviApp::findWindow(const char * windowId)
{
return g_pGlobalWindowDict->tqfind(windowId);
return g_pGlobalWindowDict->find(windowId);
}
KviWindow * KviApp::findWindowByCaption(const TQString &windowCaption,int iContextId)
@ -1869,10 +1869,10 @@ void KviApp::addRecentChannel(const TQString& szChan,const TQString& net)
{
if(!m_pRecentChannelsDict)
buildRecentChannels();
TQStringList* pList=m_pRecentChannelsDict->tqfind(net.utf8().data());
TQStringList* pList=m_pRecentChannelsDict->find(net.utf8().data());
if(pList)
{
if(!pList->tqcontains(szChan)) pList->append(szChan);
if(!pList->contains(szChan)) pList->append(szChan);
}
else
{
@ -1900,10 +1900,10 @@ void KviApp::buildRecentChannels()
szNet = (*it).section( KVI_RECENT_CHANNELS_SEPARATOR, 1 );
if(!szNet.isEmpty())
{
TQStringList* pList=m_pRecentChannelsDict->tqfind(szNet.utf8().data());
TQStringList* pList=m_pRecentChannelsDict->find(szNet.utf8().data());
if(pList)
{
if(!pList->tqcontains(szChan)) pList->append(szChan);
if(!pList->contains(szChan)) pList->append(szChan);
}
else
{
@ -1935,7 +1935,7 @@ void KviApp::saveRecentChannels()
TQStringList* KviApp::getRecentChannels(const TQString& net)
{
if(!m_pRecentChannelsDict) buildRecentChannels();
return m_pRecentChannelsDict->tqfind(net.utf8().data());
return m_pRecentChannelsDict->find(net.utf8().data());
}

@ -484,7 +484,7 @@ bool KviApp::mapImageFile(TQString &szRetPath,const char * filename)
KviStr szBestMatch;
while(szRetPath.tqfind(KVI_PATH_SEPARATOR) != -1)
while(szRetPath.find(KVI_PATH_SEPARATOR) != -1)
{
KviTQString::cutToFirst(szRetPath,KVI_PATH_SEPARATOR);

@ -155,7 +155,7 @@ bool KviApp::checkFileAssociations()
return false;
} else {
TQString szIcon = applicationFilePath()+",1";
szIcon.tqreplace('/',"\\");
szIcon.replace('/',"\\");
if(!kvi_strEqualCI(szIcon.local8Bit().data(),buffer)){
free(buffer);
return false;
@ -187,7 +187,7 @@ bool KviApp::checkFileAssociations()
return false;
} else {
TQString szCmd = applicationFilePath()+" \"%1\"";
szCmd.tqreplace('/',"\\");
szCmd.replace('/',"\\");
if(!kvi_strEqualCI(szCmd.local8Bit().data(),buffer)) {
free(buffer);
return false;
@ -305,7 +305,7 @@ bool KviApp::checkUriAssociations(char * proto)
return false;
} else {
TQString szIcon = applicationFilePath()+",0";
szIcon.tqreplace('/',"\\");
szIcon.replace('/',"\\");
if(!kvi_strEqualCI(szIcon.local8Bit().data(),buffer)){
free(buffer);
return false;
@ -339,7 +339,7 @@ bool KviApp::checkUriAssociations(char * proto)
return false;
} else {
TQString szCmd = applicationFilePath()+" \"%1\"";
szCmd.tqreplace('/',"\\");
szCmd.replace('/',"\\");
if(!kvi_strEqualCI(szCmd.local8Bit().data(),buffer)) {
free(buffer);
return false;
@ -365,7 +365,7 @@ void KviApp::setupUriAssociations(char * proto)
KviTQCString tmp;
TQString appPath = applicationFilePath();
appPath.tqreplace('/',"\\");
appPath.replace('/',"\\");
SHDeleteKey(HKEY_CLASSES_ROOT,key);
@ -399,7 +399,7 @@ void KviApp::setupFileAssociations()
KviTQCString tmp;
TQString appPath = applicationFilePath();
appPath.tqreplace('/',"\\");
appPath.replace('/',"\\");
SHDeleteKey(HKEY_CLASSES_ROOT,".kvs");

@ -951,9 +951,9 @@ void KviChangeUserModeAction::popupAboutToShow()
id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_INVISIBLE)),__tr2qs("Invisible (+i)"));
m_pPopup->setItemChecked(id,c->connection()->userInfo()->hasUserMode('i'));
szModes.tqreplace("w","");
szModes.tqreplace("s","");
szModes.tqreplace("i","");
szModes.replace("w","");
szModes.replace("s","");
szModes.replace("i","");
while(!szModes.isEmpty())
{
TQChar ccc = szModes[0];
@ -972,7 +972,7 @@ void KviChangeUserModeAction::popupActivated(int id)
if(!c->isConnected())return;
if(!text.isEmpty())
{
int idx = text.tqfind('+');
int idx = text.find('+');
if(idx != -1)
{
idx++;

@ -86,7 +86,7 @@ TQString KviCustomToolBarManager::idForNewToolBar(const TQString &szTemplate)
tmp.setNum(idx);
s += tmp;
}
if(!m_pDescriptors->tqfind(s))return s;
if(!m_pDescriptors->find(s))return s;
idx++;
}
return s;
@ -105,20 +105,20 @@ KviCustomToolBarDescriptor * KviCustomToolBarManager::findDescriptorByInternalId
bool KviCustomToolBarManager::renameDescriptor(const TQString &szId,const TQString &szNewId,const TQString &szNewLabelCode)
{
KviCustomToolBarDescriptor * d = m_pDescriptors->tqfind(szId);
KviCustomToolBarDescriptor * d = m_pDescriptors->find(szId);
if(!d)return false;
d->rename(szNewLabelCode);
if(szId == szNewId)return true; // already done
m_pDescriptors->setAutoDelete(false);
m_pDescriptors->remove(szId);
m_pDescriptors->tqreplace(szNewId,d);
m_pDescriptors->replace(szNewId,d);
m_pDescriptors->setAutoDelete(true);
return true;
}
bool KviCustomToolBarManager::destroyDescriptor(const TQString &szId)
{
KviCustomToolBarDescriptor * d = m_pDescriptors->tqfind(szId);
KviCustomToolBarDescriptor * d = m_pDescriptors->find(szId);
if(!d)return false;
m_pDescriptors->remove(szId); // will delete it too!
return true;
@ -131,10 +131,10 @@ void KviCustomToolBarManager::clear()
KviCustomToolBarDescriptor * KviCustomToolBarManager::create(const TQString &szId,const TQString &szLabelCode)
{
KviCustomToolBarDescriptor * d = m_pDescriptors->tqfind(szId);
KviCustomToolBarDescriptor * d = m_pDescriptors->find(szId);
if(d)return d;
d = new KviCustomToolBarDescriptor(szId,szLabelCode);
m_pDescriptors->tqreplace(szId,d);
m_pDescriptors->replace(szId,d);
return d;
}
@ -193,7 +193,7 @@ void KviCustomToolBarManager::load(const TQString &szFileName)
KviCustomToolBarDescriptor * d = new KviCustomToolBarDescriptor(it.currentKey(),TQString());
d->m_bVisibleAtStartup = (cfg.readIntEntry("Visible",0) > 0);
if(!d->load(&cfg))delete d;
else m_pDescriptors->tqreplace(it.currentKey(),d);
else m_pDescriptors->replace(it.currentKey(),d);
++it;
}
}
@ -228,7 +228,7 @@ void KviCustomToolBarManager::loadScripttoolbarsCompat(const TQString &szFileNam
tmp.sprintf("%d",i);
KviCustomToolBarDescriptor * d = new KviCustomToolBarDescriptor(TQString(),TQString());
if(!d->loadScripttoolbarCompat(tmp.ptr(),&cfg))delete d;
else m_pDescriptors->tqreplace(d->id(),d);
else m_pDescriptors->replace(d->id(),d);
}
// get rid of the file now...

@ -57,7 +57,7 @@ public:
KviPointerHashTable<TQString,KviCustomToolBarDescriptor> * descriptors(){ return m_pDescriptors; };
KviCustomToolBar * firstExistingToolBar();
KviCustomToolBarDescriptor * create(const TQString &szId,const TQString &szLabelCode);
KviCustomToolBarDescriptor * tqfind(const TQString &szId){ return m_pDescriptors->tqfind(szId); };
KviCustomToolBarDescriptor * find(const TQString &szId){ return m_pDescriptors->find(szId); };
KviCustomToolBarDescriptor * findDescriptorByInternalId(int id);
void updateVisibleToolBars();
void createToolBarsVisibleAtStartup();

@ -90,8 +90,8 @@ void KviFileTransferManager::invokeTransferWindow(KviWindow * pWnd,bool bCreateM
{
KviPointerHashTable<TQString,TQVariant> d(7,false);
d.setAutoDelete(true);
d.tqreplace("bCreateMinimized",new TQVariant(bCreateMinimized,0));
d.tqreplace("bNoRaise",new TQVariant(bNoRaise,0));
d.replace("bCreateMinimized",new TQVariant(bCreateMinimized,0));
d.replace("bNoRaise",new TQVariant(bNoRaise,0));
KviModuleExtensionManager::instance()->allocateExtension(
"tool",

@ -547,10 +547,10 @@ int KviIconManager::getSmallIconIdFromName(const TQString &szName)
{
int * pInt = new int;
*pInt = i;
m_pIconNames->tqreplace(TQString(g_szIconNames[i]),pInt);
m_pIconNames->replace(TQString(g_szIconNames[i]),pInt);
}
}
int * pInt = m_pIconNames->tqfind(szName);
int * pInt = m_pIconNames->find(szName);
if(!pInt)return 0;
return *pInt;
}
@ -610,7 +610,7 @@ KviCachedPixmap * KviIconManager::getPixmapWithCache(const TQString &szName)
{
if(szName.isEmpty())return 0;
KviCachedPixmap * p = m_pCachedImages->tqfind(szName);
KviCachedPixmap * p = m_pCachedImages->find(szName);
if(p)
{
@ -645,7 +645,7 @@ KviCachedPixmap * KviIconManager::getPixmapWithCacheScaleOnLoad(const TQString &
{
if(szName.isEmpty())return 0;
KviCachedPixmap * p = m_pCachedImages->tqfind(szName);
KviCachedPixmap * p = m_pCachedImages->find(szName);
if(p)
{
@ -772,16 +772,16 @@ void KviIconManager::urlToCachedFileName(KviStr &szFName)
void KviIconManager::urlToCachedFileName(TQString &szFName)
{
szFName.tqreplace(":","_");
szFName.tqreplace(";","_");
szFName.tqreplace("/","_");
szFName.tqreplace("\\","_");
szFName.tqreplace("\"","_");
szFName.tqreplace("\'","_");
szFName.tqreplace("(","_");
szFName.tqreplace(")","_");
szFName.tqreplace("?","_");
szFName.tqreplace("___",".");
szFName.replace(":","_");
szFName.replace(";","_");
szFName.replace("/","_");
szFName.replace("\\","_");
szFName.replace("\"","_");
szFName.replace("\'","_");
szFName.replace("(","_");
szFName.replace(")","_");
szFName.replace("?","_");
szFName.replace("___",".");
}
KviAvatar * KviIconManager::getAvatar(const TQString &szLocalPath,const TQString &szName)

@ -723,7 +723,7 @@ void KviIrcConnection::userInfoReceived(const TQString &szUserName,const TQStrin
userInfo()->setUserName(szUserName);
TQString szUnmaskedHost = m_pUserInfo->unmaskedHostName();
// Update the user entry
KviIrcUserEntry * e = userDataBase()->tqfind(userInfo()->nickName());
KviIrcUserEntry * e = userDataBase()->find(userInfo()->nickName());
if(e) // should be there! (we have the permanent entry in the notify list view)
{
e->setUser(szUserName);
@ -1003,7 +1003,7 @@ void KviIrcConnection::loginToIrcServer()
m_pConsole->notifyListView()->join(m_pUserInfo->nickName(),"*","*");
// set own avatar if we have it
KviIrcUserEntry * e = userDataBase()->tqfind(userInfo()->nickName());
KviIrcUserEntry * e = userDataBase()->find(userInfo()->nickName());
if(e) // should be there!
{
if(!e->avatar())
@ -1189,7 +1189,7 @@ void KviIrcConnection::loginComplete(const TQString &szNickName)
KviIrcUserDataBase * db = userDataBase();
if(db)
{
KviIrcUserEntry * e = db->tqfind(szNick);
KviIrcUserEntry * e = db->find(szNick);
if(e)
{
user = e->user();

@ -57,19 +57,19 @@ void KviIrcConnectionServerInfo::setSupportedChannelModes(const TQString &szSupp
{
int pos=-1;
pos=szSupportedChannelModes.tqfind(',');
pos=szSupportedChannelModes.find(',');
if(pos>=0) m_szListModes=szSupportedChannelModes.left(pos);
pos=szSupportedChannelModes.tqfindRev(',');
pos=szSupportedChannelModes.findRev(',');
if(pos>=0) m_szPlainModes=szSupportedChannelModes.right(szSupportedChannelModes.length()+pos-1);
m_szSupportedChannelModes = szSupportedChannelModes;
m_bSupportsModesIe = (szSupportedChannelModes.tqcontains('e') && szSupportedChannelModes.tqcontains('I'));
m_bSupportsModesIe = (szSupportedChannelModes.contains('e') && szSupportedChannelModes.contains('I'));
TQChar* aux=(TQChar*)szSupportedChannelModes.ucs2();
while(aux->tqunicode())
{
if(!m_szSupportedChannelModes.tqcontains(*aux))
if(!m_szSupportedChannelModes.contains(*aux))
m_szSupportedChannelModes.append(*aux);
aux++;
}
@ -189,11 +189,11 @@ kvi_u32_t KviIrcConnectionServerInfo::modeFlagFromModeChar(TQChar c)
void KviIrcConnectionServerInfo::setServerVersion(const TQString & version)
{
if(m_pServInfo) delete m_pServInfo;
if(version.tqcontains("unreal",false))
if(version.contains("unreal",false))
m_pServInfo = new KviUnrealIrcServerInfo(version);
else if(version.tqcontains("bahamut",false))
else if(version.contains("bahamut",false))
m_pServInfo = new KviBahamutIrcServerInfo(version);
else if(version.tqcontains("hyperion",false))
else if(version.contains("hyperion",false))
m_pServInfo = new KviHyperionIrcServerInfo(version);
else
m_pServInfo = new KviBasicIrcServerInfo(version);

@ -460,8 +460,8 @@ void KviIrcConnectionTargetResolver::haveServerIp()
if(!validateLocalAddress(m_pTarget->bindAddress(),bindAddress))
{
TQString szBindAddress = m_pTarget->bindAddress();
if((szBindAddress.tqfind('.') != -1) ||
(szBindAddress.tqfind(':') != -1))
if((szBindAddress.find('.') != -1) ||
(szBindAddress.find(':') != -1))
{
if(!_OUTPUT_MUTE)
m_pConsole->output(KVI_OUT_SYSTEMWARNING,
@ -486,7 +486,7 @@ void KviIrcConnectionTargetResolver::haveServerIp()
if(!validateLocalAddress(KVI_OPTION_STRING(KviOption_stringIpV6ConnectionBindAddress),bindAddress))
{
// if it is not an interface name , kill it for now and let the user correct the address
if(KVI_OPTION_STRING(KviOption_stringIpV6ConnectionBindAddress).tqfind(':') != -1)
if(KVI_OPTION_STRING(KviOption_stringIpV6ConnectionBindAddress).find(':') != -1)
{
if(!_OUTPUT_MUTE)
m_pConsole->output(KVI_OUT_SYSTEMWARNING,
@ -515,7 +515,7 @@ void KviIrcConnectionTargetResolver::haveServerIp()
if(!validateLocalAddress(KVI_OPTION_STRING(KviOption_stringIpV4ConnectionBindAddress),bindAddress))
{
// if it is not an interface name , kill it for now and let the user correct the address
if(KVI_OPTION_STRING(KviOption_stringIpV4ConnectionBindAddress).tqfind(':') != -1)
if(KVI_OPTION_STRING(KviOption_stringIpV4ConnectionBindAddress).find(':') != -1)
{
if(!_OUTPUT_MUTE)
m_pConsole->output(KVI_OUT_SYSTEMWARNING,

@ -33,7 +33,7 @@ KviIrcConnectionUserInfo::KviIrcConnectionUserInfo()
bool KviIrcConnectionUserInfo::hasUserMode(const TQChar &m)
{
return m_szUserMode.tqcontains(m) > 0;
return m_szUserMode.contains(m) > 0;
}
bool KviIrcConnectionUserInfo::addUserMode(const TQChar &m)
@ -45,9 +45,9 @@ bool KviIrcConnectionUserInfo::addUserMode(const TQChar &m)
bool KviIrcConnectionUserInfo::removeUserMode(const TQChar &m)
{
int idx = m_szUserMode.tqfind(m,0);
int idx = m_szUserMode.find(m,0);
if(idx == -1)return false;
m_szUserMode.tqreplace(m,TQString(""));
m_szUserMode.replace(m,TQString(""));
return true;
}

@ -845,8 +845,8 @@ void KviIrcContext::terminateConnectionRequest(bool bForce,const TQString &szQui
KVS_TRIGGER_EVENT_0(KviEvent_OnDisconnectRequest,m_pConsole);
TQString szQuit = szQuitMsg;
if(szQuit.isEmpty())szQuit = KVI_OPTION_STRING(KviOption_stringQuitMessage);
szQuit.tqreplace(";","\\;");
szQuit.tqreplace("\n"," ");
szQuit.replace(";","\\;");
szQuit.replace("\n"," ");
TQString buffer;
KviKvsVariant ret;
if(KviKvsScript::evaluate(szQuit,console(),0,&ret))

@ -151,7 +151,7 @@ void KviIrcUrl::split(TQString url, KviIrcUrlParts& result)
result.iPort = 6667;
result.iError=0;
int iProtoLen = url.tqfind("://");
int iProtoLen = url.find("://");
if(iProtoLen!=-1) {
if(KviTQString::equalCIN(url,"irc",3)) {
// OK, seems to be a valid proto;
@ -168,7 +168,7 @@ void KviIrcUrl::split(TQString url, KviIrcUrlParts& result)
//irc(???):// proto??
result.iError |= InvalidProtocol;
}
iProtoLen = url.tqfind("://");
iProtoLen = url.find("://");
url = url.right(url.length()-iProtoLen-3);
} else {
result.iError |= InvalidProtocol;
@ -176,13 +176,13 @@ void KviIrcUrl::split(TQString url, KviIrcUrlParts& result)
}
//Ok, we understand a protocol.. Now we shuld find a server name:)
int iTmp;
iTmp = url.tqfind(':');
iTmp = url.find(':');
if(iTmp!=-1) {
result.szHost = url.left(iTmp);
url = url.right(url.length()-iTmp-1);
// Accepted, now the time for the port:)
bool bOk;
if( (iTmp = url.tqfind('/')) != -1) { // any channels pending?
if( (iTmp = url.find('/')) != -1) { // any channels pending?
result.iPort = url.left(iTmp).toUInt(&bOk);
if(!bOk) {
result.iPort = 6667;
@ -197,7 +197,7 @@ void KviIrcUrl::split(TQString url, KviIrcUrlParts& result)
}
url = "";
}
} else if( (iTmp = url.tqfind('/')) != -1) { // have channels??
} else if( (iTmp = url.find('/')) != -1) { // have channels??
result.szHost = url.left(iTmp);
url = url.right(url.length()-iTmp-1);
} else {

@ -255,16 +255,16 @@ int parseArgs(ParseArgs * a)
{
if(a->szExecCommand.hasData())a->szExecCommand.append('\n');
a->szExecCommand.append("parse \"");
tmp.tqreplace('$',"\\$");
tmp.tqreplace('\\',"\\\\");
tmp.replace('$',"\\$");
tmp.replace('\\',"\\\\");
a->szExecCommand.append(tmp);
a->szExecCommand.append('"');
} else if(KviTQString::equalCI(ri,".kvt"))
{
if(a->szExecCommand.hasData())a->szExecCommand.append('\n');
a->szExecCommand.append("theme.install \"");
tmp.tqreplace('$',"\\$");
tmp.tqreplace('\\',"\\\\");
tmp.replace('$',"\\$");
tmp.replace('\\',"\\\\");
a->szExecCommand.append(tmp);
a->szExecCommand.append('"');
} else

@ -172,7 +172,7 @@ void KviNotifyListManager::notifyOnLine(const TQString &nick,const TQString &use
while(KviRegisteredUser * u = it.current())
{
if(TQStringList::split(",",u->getProperty("notify")).tqfindIndex(nick)!=-1)
if(TQStringList::split(",",u->getProperty("notify")).findIndex(nick)!=-1)
{
TQString szComment=u->getProperty("comment");
if(!szComment.isEmpty())
@ -232,7 +232,7 @@ void KviNotifyListManager::notifyOffLine(const TQString &nick,const TQString &us
while(KviRegisteredUser * u = it.current())
{
if(TQStringList::split(",",u->getProperty("notify")).tqfindIndex(nick)!=-1)
if(TQStringList::split(",",u->getProperty("notify")).findIndex(nick)!=-1)
{
TQString szComment=u->getProperty("comment");
if(!szComment.isEmpty())
@ -386,14 +386,14 @@ void KviIsOnNotifyListManager::buildRegUserDict()
notify.stripWhiteSpace();
while(!notify.isEmpty())
{
int idx = notify.tqfind(' ');
int idx = notify.find(' ');
if(idx > 0)
{
TQString single = notify.left(idx);
m_pRegUserDict->tqreplace(single,new TQString(u->name()));
m_pRegUserDict->replace(single,new TQString(u->name()));
notify.remove(0,idx+1);
} else {
m_pRegUserDict->tqreplace(notify,new TQString(u->name()));
m_pRegUserDict->replace(notify,new TQString(u->name()));
notify = "";
}
}
@ -624,7 +624,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg)
// check if we have a cached tqmask
if(db)
{
if(KviIrcUserEntry * ue = db->tqfind(*s))
if(KviIrcUserEntry * ue = db->find(*s))
{
// already in the db... do we have a tqmask ?
if(ue->hasUser() && ue->hasHost())
@ -658,7 +658,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg)
bool KviIsOnNotifyListManager::doMatchUser(const TQString &notifyString,const KviIrcMask & tqmask)
{
TQString * nam = m_pRegUserDict->tqfind(notifyString);
TQString * nam = m_pRegUserDict->find(notifyString);
if(nam)
{
// ok...find the user
@ -980,7 +980,7 @@ bool KviStupidNotifyListManager::handleIsOn(KviIrcMessage * msg)
{
TQString nkd = m_pConnection->decodeText(nk.ptr());
TQString nksp = " " + nkd;
m_szLastIsOnMsg.tqreplace(nksp,"",false);
m_szLastIsOnMsg.replace(nksp,"",false);
if(!(m_pConsole->notifyListView()->findEntry(nkd)))
{
// not yet notified
@ -1097,7 +1097,7 @@ void KviWatchNotifyListManager::buildRegUserDict()
TQStringList sl = TQStringList::split(' ',notify);
for(TQStringList::Iterator it = sl.begin();it != sl.end();++it)
{
m_pRegUserDict->tqreplace(*it,new TQString(u->name()));
m_pRegUserDict->replace(*it,new TQString(u->name()));
}
}
++it;
@ -1116,7 +1116,7 @@ void KviWatchNotifyListManager::start()
while(it.current())
{
TQString nk = it.currentKey();
if(nk.tqfind('*') == -1)
if(nk.find('*') == -1)
{
if((watchStr.length() + nk.length() + 2) > 501)
{
@ -1148,7 +1148,7 @@ void KviWatchNotifyListManager::stop()
bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const TQString &notifyString,const KviIrcMask & tqmask)
{
TQString * nam = m_pRegUserDict->tqfind(notifyString);
TQString * nam = m_pRegUserDict->find(notifyString);
if(nam)
{
@ -1247,7 +1247,7 @@ bool KviWatchNotifyListManager::handleWatchReply(KviIrcMessage *msg)
if(_OUTPUT_VERBOSE)
m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Stopped watching for \r!n\r%Q\r"),&dnk);
}
if(m_pRegUserDict->tqfind(dnk))m_pRegUserDict->remove(dnk); // kill that
if(m_pRegUserDict->find(dnk))m_pRegUserDict->remove(dnk); // kill that
return true;

@ -91,13 +91,13 @@ void KviTextIconManager::clear()
void KviTextIconManager::insert(const TQString &name,int id)
{
m_pTextIconDict->tqreplace(name,new KviTextIcon(id));
m_pTextIconDict->replace(name,new KviTextIcon(id));
emit changed();
}
void KviTextIconManager::insert(const TQString &name,KviTextIcon& icon)
{
m_pTextIconDict->tqreplace(name,new KviTextIcon(&icon));
m_pTextIconDict->replace(name,new KviTextIcon(&icon));
emit changed();
}
@ -129,7 +129,7 @@ void KviTextIconManager::checkDefaultAssociations()
{
for(int i=0;default_associations[i].name;i++)
{
if(!m_pTextIconDict->tqfind(default_associations[i].name))
if(!m_pTextIconDict->find(default_associations[i].name))
insert(TQString::fromUtf8(default_associations[i].name),default_associations[i].iVal);
}
emit changed();
@ -172,7 +172,7 @@ int KviTextIconManager::load(const TQString &filename,bool bMerge)
cfg.setGroup("Manager");
int upd = cfg.readIntEntry("ConfigUpdate",0);
KviConfigGroup * dict = cfg.dict()->tqfind("TextIcons");
KviConfigGroup * dict = cfg.dict()->find("TextIcons");
if(dict)
{
KviConfigGroupIterator it(*dict);
@ -209,16 +209,16 @@ int KviTextIconManager::load(const TQString &filename,bool bMerge)
{
if(bMerge)
{
if(!m_pTextIconDict->tqfind(*s))
if(!m_pTextIconDict->find(*s))
if(id!=-1)
m_pTextIconDict->tqreplace(*s,new KviTextIcon(id));
m_pTextIconDict->replace(*s,new KviTextIcon(id));
else
m_pTextIconDict->tqreplace(*s,new KviTextIcon(szTmp));
m_pTextIconDict->replace(*s,new KviTextIcon(szTmp));
} else {
if(id!=-1)
m_pTextIconDict->tqreplace(*s,new KviTextIcon(id));
m_pTextIconDict->replace(*s,new KviTextIcon(id));
else
m_pTextIconDict->tqreplace(*s,new KviTextIcon(szTmp));
m_pTextIconDict->replace(*s,new KviTextIcon(szTmp));
}
}
}

@ -70,7 +70,7 @@ public:
void clear();
void insert(const TQString &name,int id);
void insert(const TQString &name,KviTextIcon& icon);
KviTextIcon * lookupTextIcon(const TQString &name){ return m_pTextIconDict->tqfind(name); };
KviTextIcon * lookupTextIcon(const TQString &name){ return m_pTextIconDict->find(name); };
void load();
void save();
protected:

@ -80,14 +80,14 @@ namespace KviUserInput
static TQString szUserFriendlyCommandlineContext(__tr2qs("commandline::userfriendly"));
TQString szCmd=szData;
// escape any -$;\%(
szCmd.tqreplace("\\","\\\\");
szCmd.tqreplace("\"","\\\"");
szCmd.tqreplace("$","\\$");
szCmd.tqreplace("%","\\%");
szCmd.tqreplace("(","\\(");
szCmd.tqreplace(";","\\;");
szCmd.tqreplace("-","\\-");
szCmd.tqreplace("+","\\+");
szCmd.replace("\\","\\\\");
szCmd.replace("\"","\\\"");
szCmd.replace("$","\\$");
szCmd.replace("%","\\%");
szCmd.replace("(","\\(");
szCmd.replace(";","\\;");
szCmd.replace("-","\\-");
szCmd.replace("+","\\+");
KviKvsScript kvs(szContext.isEmpty() ? szUserFriendlyCommandlineContext : szContext,szCmd);
return (kvs.run(pWindow,0,0) != KviKvsScript::Error);
} else {

@ -48,9 +48,9 @@ public:
KviPointerHashTable<TQString,KviKvsScript> * aliasDict(){ return m_pAliasDict; };
const KviKvsScript * lookup(const TQString & szName)
{ return m_pAliasDict->tqfind(szName); };
{ return m_pAliasDict->find(szName); };
void add(const TQString &szName,KviKvsScript * pAlias)
{ m_pAliasDict->tqreplace(szName,pAlias); };
{ m_pAliasDict->replace(szName,pAlias); };
bool remove(const TQString & szName)
{ return m_pAliasDict->remove(szName); };
void clear()

@ -143,8 +143,8 @@ namespace KviKvsCoreCallbackCommands
KVSCCC_PARAMETERS_END
KviDns::QueryType queryType = KviDns::IpV4;
if(KVSCCC_pSwitches->tqfind('i',"ipv6"))queryType = KviDns::IpV6;
if(KVSCCC_pSwitches->tqfind('a',"any"))queryType = KviDns::Any;
if(KVSCCC_pSwitches->find('i',"ipv6"))queryType = KviDns::IpV6;
if(KVSCCC_pSwitches->find('a',"any"))queryType = KviDns::Any;
KviKvsVariant * pMagic = pMagicPtr ? new KviKvsVariant(*pMagicPtr) : new KviKvsVariant();
@ -256,14 +256,14 @@ namespace KviKvsCoreCallbackCommands
// make sure that we have only doubled "::" and not ":" or ":::..."
TQString tmp = szName;
tmp.tqreplace("::","@"); // @ is not allowed by the rule above
if(tmp.tqfind(":") != -1)
tmp.replace("::","@"); // @ is not allowed by the rule above
if(tmp.find(":") != -1)
{
KVSCCC_pContext->error(__tr2qs("Stray ':' character in alias name: did you mean ...<namespace>::<name> ?"));
return false;
}
if(tmp.tqfind("@@") != -1)
if(tmp.find("@@") != -1)
{
KVSCCC_pContext->error(__tr2qs("Found an empty namespace in alias name"));
return false;
@ -273,7 +273,7 @@ namespace KviKvsCoreCallbackCommands
{
if(!KviKvsAliasManager::instance()->remove(szName))
{
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("The alias %Q is not existing"),&szName);
}
} else {
@ -359,7 +359,7 @@ namespace KviKvsCoreCallbackCommands
KVSCCC_pConnection->asyncWhoisData()->add(info);
if(KVSCCC_pSwitches->tqfind('i',"idle-time"))KVSCCC_pConnection->sendFmtData("WHOIS %s %s",szN.data(),szN.data());
if(KVSCCC_pSwitches->find('i',"idle-time"))KVSCCC_pConnection->sendFmtData("WHOIS %s %s",szN.data(),szN.data());
else KVSCCC_pConnection->sendFmtData("WHOIS %s",szN.data());
return true;
@ -432,7 +432,7 @@ namespace KviKvsCoreCallbackCommands
if(!KVSCCC_pWindow->buttonContainer())
{
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("The specified window has no button containers"));
return true;
}
@ -443,7 +443,7 @@ namespace KviKvsCoreCallbackCommands
{
if(pButton)delete pButton;
else {
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("Window button '%Q' not found"),&szName);
}
return true;
@ -471,12 +471,12 @@ namespace KviKvsCoreCallbackCommands
{
pButton->setButtonPixmap(*pix);
} else {
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&szIcon);
}
}
pButton->setEnabled(!(KVSCCC_pSwitches->tqfind('d',"disabled")));
pButton->setEnabled(!(KVSCCC_pSwitches->find('d',"disabled")));
return true;
}
@ -528,7 +528,7 @@ namespace KviKvsCoreCallbackCommands
{
if(!KviKvsEventManager::instance()->isValidRawEvent(iNumber))
{
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName);
return true;
}
@ -536,7 +536,7 @@ namespace KviKvsCoreCallbackCommands
iNumber = KviKvsEventManager::instance()->findAppEventIndexByName(szEventName);
if(!KviKvsEventManager::instance()->isValidAppEvent(iNumber))
{
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName);
return true;
}
@ -548,13 +548,13 @@ namespace KviKvsCoreCallbackCommands
{
if(!KviKvsEventManager::instance()->removeScriptRawHandler(iNumber,szHandlerName))
{
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber);
}
} else {
if(!KviKvsEventManager::instance()->removeScriptAppHandler(iNumber,szHandlerName))
{
if(!KVSCCC_pSwitches->tqfind('q',"quiet"))
if(!KVSCCC_pSwitches->find('q',"quiet"))
KVSCCC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
}
@ -679,7 +679,7 @@ namespace KviKvsCoreCallbackCommands
The stderr data event is similar to the stdout one but there are three differences.
The first one is that the stderr event is NOT triggered by default: you must
use the -e switch to enable it. The second difference is that $0
tqcontains "stderr" instead of "stdout". The last difference is that $1 contains data
contains "stderr" instead of "stdout". The last difference is that $1 contains data
coming from the slave process stderr stream.[br]
[br]
[b]Termination event[/b][br]
@ -914,13 +914,13 @@ namespace KviKvsCoreCallbackCommands
int f = 0;
if(KVSCCC_pSwitches->tqfind('t',"trigger-termination") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED;
if(KVSCCC_pSwitches->tqfind('n',"no-stdout") == 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT;
if(KVSCCC_pSwitches->tqfind('e',"trigger-stderr") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR;
if(KVSCCC_pSwitches->tqfind('x',"trigger-startup") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTARTED;
if(KVSCCC_pSwitches->tqfind('b',"output-block") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS;
if(KVSCCC_pSwitches->tqfind('w',"bind-to-window") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_KILLIFNOWINDOW;
if(KVSCCC_pSwitches->tqfind('d',"direct") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_NOSHELL;
if(KVSCCC_pSwitches->find('t',"trigger-termination") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED;
if(KVSCCC_pSwitches->find('n',"no-stdout") == 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT;
if(KVSCCC_pSwitches->find('e',"trigger-stderr") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR;
if(KVSCCC_pSwitches->find('x',"trigger-startup") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTARTED;
if(KVSCCC_pSwitches->find('b',"output-block") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS;
if(KVSCCC_pSwitches->find('w',"bind-to-window") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_KILLIFNOWINDOW;
if(KVSCCC_pSwitches->find('d',"direct") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_NOSHELL;
TQString szShell;
KVSCCC_pSwitches->getAsStringIfExisting('s',"shell",szShell);
@ -928,7 +928,7 @@ namespace KviKvsCoreCallbackCommands
kvs_int_t iPingTime = 0;
kvs_int_t iMaxRunTime = 0;
KviKvsVariant * pPing = KVSCCC_pSwitches->tqfind('p',"trigger-ping");
KviKvsVariant * pPing = KVSCCC_pSwitches->find('p',"trigger-ping");
if(pPing)
{
if(!(pPing->asInteger(iPingTime) && iPingTime > 0))
@ -938,7 +938,7 @@ namespace KviKvsCoreCallbackCommands
}
}
KviKvsVariant * pKill = KVSCCC_pSwitches->tqfind('k',"kill-after");
KviKvsVariant * pKill = KVSCCC_pSwitches->find('k',"kill-after");
if(pKill)
{
if(!(pKill->asInteger(iMaxRunTime) && iMaxRunTime > 0))
@ -962,7 +962,7 @@ namespace KviKvsCoreCallbackCommands
KviKvsProcessAsyncOperation * op = new KviKvsProcessAsyncOperation(d);
if(!op->start())
{
if(KVSCCC_pSwitches->tqfind('q',"quiet") == 0)KVSCCC_pContext->warning(__tr2qs("Failed to start the process"));
if(KVSCCC_pSwitches->find('q',"quiet") == 0)KVSCCC_pContext->warning(__tr2qs("Failed to start the process"));
delete op;
}
@ -1132,8 +1132,8 @@ namespace KviKvsCoreCallbackCommands
KviKvsTimer::Lifetime lt;
if(KVSCCC_pSwitches->tqfind('s',"single-shot"))lt = KviKvsTimer::SingleShot;
else if(KVSCCC_pSwitches->tqfind('p',"persistent"))lt = KviKvsTimer::Persistent;
if(KVSCCC_pSwitches->find('s',"single-shot"))lt = KviKvsTimer::SingleShot;
else if(KVSCCC_pSwitches->find('p',"persistent"))lt = KviKvsTimer::Persistent;
else lt = KviKvsTimer::WindowLifetime;
// prepare the callback parameters

@ -784,7 +784,7 @@ namespace KviKvsCoreFunctions
{
//Check for right Characters
#ifdef COMPILE_ON_WINDOWS
if (szAllowedCharacters.tqfind((char)(c->tqunicode()),0,true) >= 0) tmpFormat += '%';
if (szAllowedCharacters.find((char)(c->tqunicode()),0,true) >= 0) tmpFormat += '%';
#else
if (c->isLetter()) tmpFormat += '%';
#endif

@ -182,7 +182,7 @@ namespace KviKvsCoreFunctions
{
if(KVSCF_pContext->window()->console()->isConnected())
{
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick);
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick);
if(e)
{
KVSCF_pRetBuffer->setString(e->host());
@ -678,7 +678,7 @@ namespace KviKvsCoreFunctions
{
if(KVSCF_pContext->window()->console()->isConnected())
{
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick);
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick);
if(e)
{
KVSCF_pRetBuffer->setBoolean(e->hasHost() && e->hasUser());

@ -118,7 +118,7 @@ namespace KviKvsCoreFunctions
{
if(KVSCF_pContext->window()->console()->isConnected())
{
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick.isEmpty() ? KVSCF_pContext->window()->connection()->currentNickName() : szNick);
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick.isEmpty() ? KVSCF_pContext->window()->connection()->currentNickName() : szNick);
if(e)
{
KviIrcMask u;

@ -399,14 +399,14 @@ namespace KviKvsCoreFunctions
if(szSwitch.length() > 1)
{
if(szLongSwitch.isEmpty())
v = sl->tqfind(szSwitch);
v = sl->find(szSwitch);
else
v = sl->tqfind(szSwitch[0].tqunicode(),szLongSwitch);
v = sl->find(szSwitch[0].tqunicode(),szLongSwitch);
}else {
if(szLongSwitch.isEmpty())
v = sl->tqfind(szSwitch[0]);
v = sl->find(szSwitch[0]);
else
v = sl->tqfind(szSwitch[0].tqunicode(),szLongSwitch);
v = sl->find(szSwitch[0].tqunicode(),szLongSwitch);
}
if(v)KVSCF_pRetBuffer->copyFrom(*v);
@ -981,7 +981,7 @@ namespace KviKvsCoreFunctions
{
if(KVSCF_pContext->window()->console()->isConnected())
{
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick);
KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick);
if(e)
{
KVSCF_pRetBuffer->setString(e->user());
@ -1035,9 +1035,9 @@ namespace KviKvsCoreFunctions
if(szType.isEmpty())
KVSCF_pRetBuffer->setString(KVI_VERSION);
else {
if(szType.tqfind('r') != -1)KVSCF_pRetBuffer->setString(KVI_RELEASE_NAME);
else if(szType.tqfind('s') != -1)KVSCF_pRetBuffer->setString(KVI_SOURCES_DATE);
else if(szType.tqfind('b') != -1)KVSCF_pRetBuffer->setString(KVI_BUILD_DATE);
if(szType.find('r') != -1)KVSCF_pRetBuffer->setString(KVI_RELEASE_NAME);
else if(szType.find('s') != -1)KVSCF_pRetBuffer->setString(KVI_SOURCES_DATE);
else if(szType.find('b') != -1)KVSCF_pRetBuffer->setString(KVI_BUILD_DATE);
else KVSCF_pRetBuffer->setString(KVI_VERSION);
}
return true;

@ -122,7 +122,7 @@ namespace KviKvsCoreSimpleCommands
if(szReason.isEmpty())szReason = KVI_OPTION_STRING(KviOption_stringAwayMessage);
if(KVSCSC_pSwitches->tqfind('a',"all-networks"))
if(KVSCSC_pSwitches->find('a',"all-networks"))
{
KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict);
while(KviWindow * wnd = it.current())
@ -176,7 +176,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(back)
{
if(KVSCSC_pSwitches->tqfind('a',"all-networks"))
if(KVSCSC_pSwitches->find('a',"all-networks"))
{
KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict);
while(KviWindow * wnd = it.current())
@ -291,10 +291,10 @@ namespace KviKvsCoreSimpleCommands
kvs_int_t pitch = -1;
kvs_int_t duration = -1;
bool bSync = (KVSCSC_pSwitches->tqfind('s',"sync") != 0);
bool bSync = (KVSCSC_pSwitches->find('s',"sync") != 0);
bool bOk = false;
KviKvsVariant * pPitch = KVSCSC_pSwitches->tqfind('p',"pitch");
KviKvsVariant * pPitch = KVSCSC_pSwitches->find('p',"pitch");
if(pPitch)
{
if(!pPitch->asInteger(pitch))
@ -304,7 +304,7 @@ namespace KviKvsCoreSimpleCommands
}
}
KviKvsVariant * pDuration = KVSCSC_pSwitches->tqfind('d',"duration");
KviKvsVariant * pDuration = KVSCSC_pSwitches->find('d',"duration");
if(pDuration)
{
if(!pDuration->asInteger(duration))
@ -410,7 +410,7 @@ namespace KviKvsCoreSimpleCommands
if(!KVSCSC_pWindow->buttonContainer())
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The specified window has no button containers"));
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The specified window has no button containers"));
return true;
}
@ -418,7 +418,7 @@ namespace KviKvsCoreSimpleCommands
if(!pButton)
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No button with type %Q named %Q"),&tbTypeUnused,&tbName);
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No button with type %Q named %Q"),&tbTypeUnused,&tbName);
return true;
}
TQChar o;
@ -442,7 +442,7 @@ namespace KviKvsCoreSimpleCommands
{
pButton->setButtonPixmap(*pix);
} else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&tbPar);
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&tbPar);
}
}
break;
@ -527,7 +527,7 @@ namespace KviKvsCoreSimpleCommands
KviTQCString szD = KVSCSC_pConnection->encodeText(szCtcpData);
if(!(KVSCSC_pConnection->sendFmtData("%s %s :%c%s%c",
KVSCSC_pSwitches->tqfind('n',"notice") ? "NOTICE" : "PRIVMSG",szT.data(),0x01,szD.data(),0x01)))
KVSCSC_pSwitches->find('n',"notice") ? "NOTICE" : "PRIVMSG",szT.data(),0x01,szD.data(),0x01)))
return KVSCSC_pContext->warningNoIrcConnection();
return true;
@ -628,16 +628,16 @@ namespace KviKvsCoreSimpleCommands
KVSCSC_PARAMETERS_END
if(hObject == (kvs_hobject_t)0)
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Can't delete a null object reference"));
} else {
KviKvsObject * o = KviKvsKernel::instance()->objectController()->lookupObject(hObject);
if(!o)
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Can't delete an inexisting object"));
} else {
if(KVSCSC_pSwitches->tqfind('i',"immediate"))
if(KVSCSC_pSwitches->find('i',"immediate"))
o->dieNow();
else
o->die();
@ -688,7 +688,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsPopupMenu * p = KviKvsPopupManager::instance()->lookup(szPopupName);
if(!p)
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Inexisting popup \"%Q\""),&szPopupName);
return true;
}
@ -699,9 +699,9 @@ namespace KviKvsCoreSimpleCommands
return false;
}
if(!p->removeItemByName(szItemId,KVSCSC_pSwitches->tqfind('d',"deep")))
if(!p->removeItemByName(szItemId,KVSCSC_pSwitches->find('d',"deep")))
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("The menu item with id \"%Q\" does not exist in popup \"%Q\""),&szItemId,&szPopupName);
}
@ -849,7 +849,7 @@ namespace KviKvsCoreSimpleCommands
if(!KVSCSC_pSwitches->isEmpty())
{
KviKvsVariant * v;
if((v = KVSCSC_pSwitches->tqfind('w',"window")))
if((v = KVSCSC_pSwitches->find('w',"window")))
{
TQString szWnd;
v->asString(szWnd);
@ -862,7 +862,7 @@ namespace KviKvsCoreSimpleCommands
}
}
if((v = KVSCSC_pSwitches->tqfind('i',"icon")))
if((v = KVSCSC_pSwitches->find('i',"icon")))
{
if(!v->asInteger(iMsgType))
{
@ -873,13 +873,13 @@ namespace KviKvsCoreSimpleCommands
}
}
if(KVSCSC_pSwitches->tqfind('d',"debug"))
if(KVSCSC_pSwitches->find('d',"debug"))
{
pWnd = KviDebugWindow::getInstance();
}
}
int iFlags = KVSCSC_pSwitches->tqfind('n',"no-timestamp") ? KviIrcView::NoTimestamp : 0;
int iFlags = KVSCSC_pSwitches->find('n',"no-timestamp") ? KviIrcView::NoTimestamp : 0;
pWnd->outputNoFmt(iMsgType,szAll,iFlags);
return true;
}
@ -971,7 +971,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsVariant * v;
if(v = KVSCSC_pSwitches->tqfind('i',"color-set"))
if(v = KVSCSC_pSwitches->find('i',"color-set"))
{
kvs_int_t msgType;
if(v->asInteger(msgType))
@ -981,7 +981,7 @@ namespace KviKvsCoreSimpleCommands
} else KVSCSC_pContext->warning(__tr2qs("Invalid color-set specification, using default"));
}
if(v = KVSCSC_pSwitches->tqfind('w',"window"))
if(v = KVSCSC_pSwitches->find('w',"window"))
{
TQString szWin;
v->asString(szWin);
@ -998,21 +998,21 @@ namespace KviKvsCoreSimpleCommands
bool bPrefix = false;
bool bSuffix = false;
if(v = KVSCSC_pSwitches->tqfind('p',"prefix"))
if(v = KVSCSC_pSwitches->find('p',"prefix"))
{
v->asString(szPrefix);
bPrefix = true;
}
if(v = KVSCSC_pSwitches->tqfind('s',"suffix"))
if(v = KVSCSC_pSwitches->find('s',"suffix"))
{
v->asString(szSuffix);
bSuffix = true;
}
int iFlags = 0;
if(KVSCSC_pSwitches->tqfind('n',"no-highlighting"))iFlags |= KviConsole::NoHighlighting;
if(KVSCSC_pSwitches->tqfind('f',"no-flashing"))iFlags |= KviConsole::NoWindowFlashing;
if(KVSCSC_pSwitches->tqfind('x',"no-notifier"))iFlags |= KviConsole::NoNotifier;
if(KVSCSC_pSwitches->find('n',"no-highlighting"))iFlags |= KviConsole::NoHighlighting;
if(KVSCSC_pSwitches->find('f',"no-flashing"))iFlags |= KviConsole::NoWindowFlashing;
if(KVSCSC_pSwitches->find('x',"no-notifier"))iFlags |= KviConsole::NoNotifier;
pConsole->outputPrivmsg(pWnd,type,
szNick,szUser,szHost,szText,
@ -1121,12 +1121,12 @@ namespace KviKvsCoreSimpleCommands
KviKvsScript s("eval::inner",szCommands);
int iRunFlags = 0;
if(KVSCSC_pContext->reportingDisabled() || KVSCSC_pSwitches->tqfind('q',"quiet"))
if(KVSCSC_pContext->reportingDisabled() || KVSCSC_pSwitches->find('q',"quiet"))
iRunFlags |= KviKvsScript::Quiet;
bool bRet = s.run(KVSCSC_pContext,iRunFlags) ? true : false;
if(!bRet)
{
if(!KVSCSC_pSwitches->tqfind('f',"force"))
if(!KVSCSC_pSwitches->find('f',"force"))
return false;
KVSCSC_pContext->clearError();
}
@ -1185,7 +1185,7 @@ namespace KviKvsCoreSimpleCommands
{
if(!KviKvsEventManager::instance()->isValidRawEvent(iNumber))
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName);
return true;
}
@ -1193,36 +1193,36 @@ namespace KviKvsCoreSimpleCommands
iNumber = KviKvsEventManager::instance()->findAppEventIndexByName(szEventName);
if(!KviKvsEventManager::instance()->isValidAppEvent(iNumber))
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName);
return true;
}
}
if(KVSCSC_pSwitches->tqfind('u',"unregister"))
if(KVSCSC_pSwitches->find('u',"unregister"))
{
// unregister it
if(bIsRaw)
{
if(!KviKvsEventManager::instance()->removeScriptRawHandler(iNumber,szHandlerName))
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber);
} else {
if(!KviKvsEventManager::instance()->removeScriptAppHandler(iNumber,szHandlerName))
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
} else if(KVSCSC_pSwitches->tqfind('e',"enable") || KVSCSC_pSwitches->tqfind('d',"disable"))
} else if(KVSCSC_pSwitches->find('e',"enable") || KVSCSC_pSwitches->find('d',"disable"))
{
// enable it
if(bIsRaw)
{
if(!KviKvsEventManager::instance()->enableScriptRawHandler(iNumber,szHandlerName,KVSCSC_pSwitches->tqfind('e',"enable")))
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KviKvsEventManager::instance()->enableScriptRawHandler(iNumber,szHandlerName,KVSCSC_pSwitches->find('e',"enable")))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber);
} else {
if(!KviKvsEventManager::instance()->enableScriptAppHandler(iNumber,szHandlerName,KVSCSC_pSwitches->tqfind('e',"enable")))
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KviKvsEventManager::instance()->enableScriptAppHandler(iNumber,szHandlerName,KVSCSC_pSwitches->find('e',"enable")))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
} else {
@ -1244,7 +1244,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsVariant retVal;
copy.run(KVSCSC_pWindow,&vList,0,KviKvsScript::PreserveParams);
} else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
}

@ -291,8 +291,8 @@ try_again:
KVSCSC_PARAMETERS_END
KviDns::QueryType queryType = KviDns::IpV4;
if(KVSCSC_pSwitches->tqfind('i',"ipv6"))queryType = KviDns::IpV6;
if(KVSCSC_pSwitches->tqfind('a',"any"))queryType = KviDns::Any;
if(KVSCSC_pSwitches->find('i',"ipv6"))queryType = KviDns::IpV6;
if(KVSCSC_pSwitches->find('a',"any"))queryType = KviDns::Any;
KviKvsAsyncDnsOperation * op = new KviKvsAsyncDnsOperation(
KVSCSC_pContext->window(),
@ -518,7 +518,7 @@ try_again:
KVSCSC_PARAMETER("name",KVS_PT_STRING,KVS_PF_OPTIONAL,szName)
KVSCSC_PARAMETERS_END
if(KVSCSC_pSwitches->tqfind('a',"active"))
if(KVSCSC_pSwitches->find('a',"active"))
{
KviKvsTimerManager::instance()->deleteAllTimers();
return true;
@ -528,13 +528,13 @@ try_again:
{
if(!KviKvsTimerManager::instance()->deleteCurrentTimer())
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Timer name omitted but there is not current timer (this is not a timer callback)"));
}
} else {
if(!KviKvsTimerManager::instance()->deleteTimer(szName))
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Can't kill the timer '%Q' since it is not running"),&szName);
}
}

@ -278,7 +278,7 @@ namespace KviKvsCoreSimpleCommands
if(!(KVSCSC_pConnection->sendFmtData("NOTICE %s :%s",szT.data(),szD.data())))
return KVSCSC_pContext->warningNoIrcConnection();
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pWindow->output(KVI_OUT_OWNPRIVMSG,"[NOTICE >>> %Q]: %Q",&szTarget,&szText);
return true;
@ -634,12 +634,12 @@ namespace KviKvsCoreSimpleCommands
TQString szBuffer;
if(!KviFileUtils::loadFile(szFileName,szBuffer,true)) // <-- scripts SHOULD be shipped in utf8 format
{
if(KVSCSC_pSwitches->tqfind('e',"fail-on-load"))
if(KVSCSC_pSwitches->find('e',"fail-on-load"))
{
KVSCSC_pContext->error(__tr2qs("Failed to load the file '%Q' for parsing"),&szFileName);
return false;
} else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Failed to load the file '%Q' for parsing"),&szFileName);
return true;
}
@ -647,7 +647,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsScript s(szFileName,szBuffer);
KviKvsVariant * pRetVal = KVSCSC_pSwitches->tqfind('r',"propagate-return") ? KVSCSC_pContext->returnValue() : 0;
KviKvsVariant * pRetVal = KVSCSC_pSwitches->find('r',"propagate-return") ? KVSCSC_pContext->returnValue() : 0;
KviKvsVariant vFileName(szFileName);
vList.prepend(&vFileName);
@ -655,7 +655,7 @@ namespace KviKvsCoreSimpleCommands
if(!s.run(KVSCSC_pContext->window(),&vList,pRetVal,KviKvsScript::PreserveParams,&rtd))
{
if(KVSCSC_pSwitches->tqfind('f',"fail-on-error"))return false;
if(KVSCSC_pSwitches->find('f',"fail-on-error"))return false;
}
return true;
}
@ -712,7 +712,7 @@ namespace KviKvsCoreSimpleCommands
if(KVSCSC_pWindow->type() == KVI_WINDOW_TYPE_CHANNEL)
szChans = KVSCSC_pWindow->target();
else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Missing channel list"));
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Missing channel list"));
return true;
}
}
@ -748,9 +748,9 @@ namespace KviKvsCoreSimpleCommands
KviChannel * ch = KVSCSC_pConnection->findChannel(*it);
if(ch)
{
ch->partMessageSent(!KVSCSC_pSwitches->tqfind('k',"keep"),!KVSCSC_pSwitches->tqfind('s',"silent"));
ch->partMessageSent(!KVSCSC_pSwitches->find('k',"keep"),!KVSCSC_pSwitches->find('s',"silent"));
} else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("You don't appear to be on channel %s"),(*it).utf8().data());
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("You don't appear to be on channel %s"),(*it).utf8().data());
}
}
@ -875,13 +875,13 @@ namespace KviKvsCoreSimpleCommands
TQPoint pnt = TQCursor::pos();
KviKvsVariant * pCoords = KVSCSC_pSwitches->tqfind('p',"point");
KviKvsVariant * pCoords = KVSCSC_pSwitches->find('p',"point");
if(pCoords)
{
TQString szCoords;
pCoords->asString(szCoords);
int idx = szCoords.tqfind(',');
int idx = szCoords.find(',');
bool bCoordsOk = true;
if(idx == -1)bCoordsOk = false;
else {
@ -956,7 +956,7 @@ namespace KviKvsCoreSimpleCommands
if(!(KVSCSC_pConnection->sendFmtData("PRIVMSG %s :%s",szT.data(),szD.data())))
return KVSCSC_pContext->warningNoIrcConnection();
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pWindow->output(KVI_OUT_OWNPRIVMSG,"[PRIVMSG >>> %Q]: %Q",&szTarget,&szText);
}
@ -1018,7 +1018,7 @@ namespace KviKvsCoreSimpleCommands
KviIrcUserDataBase * db = KVSCSC_pWindow->connection()->userDataBase();
if(db)
{
KviIrcUserEntry * e = db->tqfind(szNick);
KviIrcUserEntry * e = db->find(szNick);
if(e)
{
user = e->user();
@ -1084,12 +1084,12 @@ namespace KviKvsCoreSimpleCommands
KVSCSC_PARAMETER("reason",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szReason)
KVSCSC_PARAMETERS_END
if(KVSCSC_pSwitches->tqfind('q',"quit"))
if(KVSCSC_pSwitches->find('q',"quit"))
{
TQTimer::singleShot(0,g_pApp,TQT_SLOT(quit()));
} else {
KVSCSC_RETQUIRE_CONNECTION
KVSCSC_pWindow->context()->terminateConnectionRequest(KVSCSC_pSwitches->tqfind('f',"force"),szReason,KVSCSC_pSwitches->tqfind('u',"unexpected"));
KVSCSC_pWindow->context()->terminateConnectionRequest(KVSCSC_pSwitches->find('f',"force"),szReason,KVSCSC_pSwitches->find('u',"unexpected"));
}
return true;
}
@ -1183,7 +1183,7 @@ namespace KviKvsCoreSimpleCommands
if(!KVSCSC_pConnection->sendData(szData.data()))
return KVSCSC_pContext->warningNoIrcConnection();
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pWindow->output(KVI_OUT_RAW,__tr2qs("[RAW]: %Q"),&szRawCommand);
return true;
@ -1233,7 +1233,7 @@ namespace KviKvsCoreSimpleCommands
KviWindow * pAux = g_pApp->findWindow(szWinId.utf8().data());
if(pAux)KVSCSC_pContext->setWindow(pAux);
else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Window with id %Q not found: no rebinding performed"),&szWinId);
}
return true;

@ -86,12 +86,12 @@ namespace KviKvsCoreSimpleCommands
KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szText)
KVSCSC_PARAMETERS_END
if(KVSCSC_pSwitches->tqfind('x',"allow-exec"))
if(KVSCSC_pSwitches->find('x',"allow-exec"))
{
// allow execution of commands
if(!KviUserInput::parse(szText,KVSCSC_pWindow,__tr2qs("say: injected commandline")))
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Say parse error: Broken command"));
}
} else {
@ -213,9 +213,9 @@ namespace KviKvsCoreSimpleCommands
KVSCSC_PARAMETERS_END
KviConsole * console = 0;
if(KVSCSC_pSwitches->tqfind('n',"new-context"))console = KVSCSC_pWindow->frame()->createNewConsole();
if(KVSCSC_pSwitches->find('n',"new-context"))console = KVSCSC_pWindow->frame()->createNewConsole();
else {
if(KVSCSC_pSwitches->tqfind('u',"unused-context"))
if(KVSCSC_pSwitches->find('u',"unused-context"))
{
// first try the current console
console = KVSCSC_pWindow->console();
@ -261,7 +261,7 @@ namespace KviKvsCoreSimpleCommands
return false;
} else {
KviAsynchronousConnectionData * d = new KviAsynchronousConnectionData();
d->bUseLastServerInContext = KVSCSC_pSwitches->tqfind('l',"last") != 0;
d->bUseLastServerInContext = KVSCSC_pSwitches->find('l',"last") != 0;
d->szCommandToExecAfterConnect = szCmd;
d->szBindAddress = szBindAddress;
d->szPass = szPassword;
@ -273,13 +273,13 @@ namespace KviKvsCoreSimpleCommands
} else {
// server is not empty.
KviAsynchronousConnectionData * d = new KviAsynchronousConnectionData();
d->bUseSSL = (KVSCSC_pSwitches->tqfind('s',"ssl") != 0);
d->bUseSSL = (KVSCSC_pSwitches->find('s',"ssl") != 0);
d->szServer = szServer;
d->uPort = (kvi_u32_t)uPort;
d->szLinkFilter = szSocketFilter;
d->bPortIsOk = (uPort > 0);
#ifdef COMPILE_IPV6_SUPPORT
d->bUseIpV6 = (KVSCSC_pSwitches->tqfind('i',"ipv6") != 0) || KviNetUtils::isValidStringIp_V6(szServer);
d->bUseIpV6 = (KVSCSC_pSwitches->find('i',"ipv6") != 0) || KviNetUtils::isValidStringIp_V6(szServer);
#else
d->bUseIpV6 = false;
#endif
@ -367,20 +367,20 @@ namespace KviKvsCoreSimpleCommands
{
if(!(KVSCSC_pWindow->frame()->mainMenuBar()->removeMenu(szVisibleText)))
{
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No menu bar item with text '%Q'"),&szPopupName);
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No menu bar item with text '%Q'"),&szPopupName);
}
return true;
}
KviKvsPopupMenu * p = KviKvsPopupManager::instance()->lookup(szPopupName);
int idx = -1;
if(KviKvsVariant * pIdx = KVSCSC_pSwitches->tqfind('i',"index"))
if(KviKvsVariant * pIdx = KVSCSC_pSwitches->find('i',"index"))
{
kvs_int_t iIdx;
if(pIdx->asInteger(iIdx))
idx = iIdx;
else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
if(!KVSCSC_pSwitches->find('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Invalid index specified: ignored"));
}
}
@ -390,7 +390,7 @@ namespace KviKvsCoreSimpleCommands
if(p)KVSCSC_pWindow->frame()->mainMenuBar()->addMenu(szVisibleText,p,idx);
else {
if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The popup '%Q' is not defined"),&szPopupName);
if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The popup '%Q' is not defined"),&szPopupName);
}
return true;
@ -702,7 +702,7 @@ namespace KviKvsCoreSimpleCommands
if(KviLocale::loadCatalogue(szCatalogue,szDir))
return true;
if(KVSCSC_pSwitches->tqfind('v',"verbose"))
if(KVSCSC_pSwitches->find('v',"verbose"))
KVSCSC_pContext->warning(__tr2qs("No catalogue %Q for the current language found"),&szCatalogue);
return true;
@ -741,7 +741,7 @@ namespace KviKvsCoreSimpleCommands
if(!KviLocale::unloadCatalogue(szCatalogue))
{
if(KVSCSC_pSwitches->tqfind('v',"verbose"))
if(KVSCSC_pSwitches->find('v',"verbose"))
KVSCSC_pContext->warning(__tr2qs("The catalogue %Q was not loaded"),&szCatalogue);
}
return true;

@ -102,13 +102,13 @@ void KviKvsDnsManager::addDns(KviKvsDnsObject * pObject)
m_pDnsObjects = new KviPointerHashTable<void *,KviKvsDnsObject>;
m_pDnsObjects->setAutoDelete(true);
}
m_pDnsObjects->tqreplace(pObject->dns(),pObject);
m_pDnsObjects->replace(pObject->dns(),pObject);
connect(pObject->dns(),TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(dnsLookupTerminated(KviDns *)));
}
void KviKvsDnsManager::dnsLookupTerminated(KviDns * pDns)
{
KviKvsDnsObject * o = m_pDnsObjects->tqfind(pDns);
KviKvsDnsObject * o = m_pDnsObjects->find(pDns);
if(!o)
{
debug("KviKvsDnsManager::dnsLookupTerminated(): can't find the KviKvsDnsObject structure");

@ -2107,7 +2107,7 @@ channel
$5 contains the original color/icon set of the message that depends on
the type of the message itself.[br]
Since the CTCP ACTION messages generally have different format of output
then for your convenience $6 tqcontains 1 if the message was caused by a
then for your convenience $6 contains 1 if the message was caused by a
CTCP ACTION and 0 otherwise.[br]
If you call [cmd]halt[/cmd] in this event the message output will be completely disabled
(thus, KVIrc assumes that YOU have provided the necessary output and feedback to the user).[br]
@ -2967,7 +2967,7 @@ channel
channel
@description:
Triggered when a channel mode has been changed, AFTER all the mode specific events
were triggered. $3 contains the unparsed mode flags (-o+b...) and $4 tqcontains
were triggered. $3 contains the unparsed mode flags (-o+b...) and $4 contains
the unparsed mode parameter string (you need to split it!).
*/
EVENT("OnChannelModeChange","$0 = sourcenick\n$1 = sourceusername\n$2 = sourcehost\n$3 = modeflags\n$4 = mode params"),

@ -39,7 +39,7 @@ KviKvsHash::KviKvsHash(const KviKvsHash &h)
KviPointerHashTableIterator<TQString,KviKvsVariant> it(*(h.m_pDict));
while(it.current())
{
m_pDict->tqreplace(it.currentKey(),new KviKvsVariant(*(it.current())));
m_pDict->replace(it.currentKey(),new KviKvsVariant(*(it.current())));
++it;
}
}
@ -88,9 +88,9 @@ void KviKvsHash::serialize(TQString& result)
KviKvsVariant * KviKvsHash::get(const TQString &szKey)
{
KviKvsVariant * v = m_pDict->tqfind(szKey);
KviKvsVariant * v = m_pDict->find(szKey);
if(v)return v;
v = new KviKvsVariant();
m_pDict->tqreplace(szKey,v);
m_pDict->replace(szKey,v);
return v;
}

@ -47,8 +47,8 @@ protected:
KviPointerHashTable<TQString,KviKvsVariant> * m_pDict;
public:
void unset(const TQString &szKey){ m_pDict->remove(szKey); };
void set(const TQString &szKey,KviKvsVariant * pVal){ m_pDict->tqreplace(szKey,pVal); };
KviKvsVariant * tqfind(const TQString &szKey) const { return m_pDict->tqfind(szKey); };
void set(const TQString &szKey,KviKvsVariant * pVal){ m_pDict->replace(szKey,pVal); };
KviKvsVariant * find(const TQString &szKey) const { return m_pDict->find(szKey); };
KviKvsVariant * get(const TQString &szKey);
bool isEmpty() const { return m_pDict->isEmpty(); };

@ -114,7 +114,7 @@ void KviKvsKernel::done()
void KviKvsKernel::completeCommand(const TQString &szCommandBegin,KviPointerList<TQString> * pMatches)
{
int idx = szCommandBegin.tqfind(TQChar('.'));
int idx = szCommandBegin.find(TQChar('.'));
if(idx == -1)
{
// no module name inside
@ -157,7 +157,7 @@ void KviKvsKernel::completeModuleCommand(const TQString &szModuleName,const TQSt
void KviKvsKernel::completeFunction(const TQString &szFunctionBegin,KviPointerList<TQString> * pMatches)
{
int idx = szFunctionBegin.tqfind(TQChar('.'));
int idx = szFunctionBegin.find(TQChar('.'));
if(idx == -1)
{
// no module name inside

@ -101,24 +101,24 @@ public:
KviKvsAsyncOperationManager * asyncOperationManager(){ return m_pAsyncOperationManager; };
void registerSpecialCommandParsingRoutine(const TQString &szCmdName,KviKvsSpecialCommandParsingRoutine * r)
{ m_pSpecialCommandParsingRoutineDict->tqreplace(szCmdName,r); };
{ m_pSpecialCommandParsingRoutineDict->replace(szCmdName,r); };
KviKvsSpecialCommandParsingRoutine * findSpecialCommandParsingRoutine(const TQString &szCmdName)
{ return m_pSpecialCommandParsingRoutineDict->tqfind(szCmdName); };
{ return m_pSpecialCommandParsingRoutineDict->find(szCmdName); };
void registerCoreSimpleCommandExecRoutine(const TQString &szCmdName,KviKvsCoreSimpleCommandExecRoutine * r)
{ m_pCoreSimpleCommandExecRoutineDict->tqreplace(szCmdName,r); };
{ m_pCoreSimpleCommandExecRoutineDict->replace(szCmdName,r); };
KviKvsCoreSimpleCommandExecRoutine * findCoreSimpleCommandExecRoutine(const TQString &szCmdName)
{ return m_pCoreSimpleCommandExecRoutineDict->tqfind(szCmdName); };
{ return m_pCoreSimpleCommandExecRoutineDict->find(szCmdName); };
void registerCoreFunctionExecRoutine(const TQString &szFncName,KviKvsCoreFunctionExecRoutine * r)
{ m_pCoreFunctionExecRoutineDict->tqreplace(szFncName,r); };
{ m_pCoreFunctionExecRoutineDict->replace(szFncName,r); };
KviKvsCoreFunctionExecRoutine * findCoreFunctionExecRoutine(const TQString &szFncName)
{ return m_pCoreFunctionExecRoutineDict->tqfind(szFncName); };
{ return m_pCoreFunctionExecRoutineDict->find(szFncName); };
void registerCoreCallbackCommandExecRoutine(const TQString &szCmdName,KviKvsCoreCallbackCommandExecRoutine * r)
{ m_pCoreCallbackCommandExecRoutineDict->tqreplace(szCmdName,r); };
{ m_pCoreCallbackCommandExecRoutineDict->replace(szCmdName,r); };
KviKvsCoreCallbackCommandExecRoutine * findCoreCallbackCommandExecRoutine(const TQString &szCmdName)
{ return m_pCoreCallbackCommandExecRoutineDict->tqfind(szCmdName); };
{ return m_pCoreCallbackCommandExecRoutineDict->find(szCmdName); };
void completeCommand(const TQString &szCommandBegin,KviPointerList<TQString> * pMatches);
void completeFunction(const TQString &szFunctionBegin,KviPointerList<TQString> * pMatches);

@ -90,17 +90,17 @@ void KviKvsModuleInterface::completeFunction(const TQString &szFunctionBegin,Kvi
void KviKvsModuleInterface::kvsRegisterSimpleCommand(const TQString &szCommand,KviKvsModuleSimpleCommandExecRoutine r)
{
m_pModuleSimpleCommandExecRoutineDict->tqreplace(szCommand,new KviKvsModuleSimpleCommandExecRoutine(r));
m_pModuleSimpleCommandExecRoutineDict->replace(szCommand,new KviKvsModuleSimpleCommandExecRoutine(r));
}
void KviKvsModuleInterface::kvsRegisterCallbackCommand(const TQString &szCommand,KviKvsModuleCallbackCommandExecRoutine r)
{
m_pModuleCallbackCommandExecRoutineDict->tqreplace(szCommand,new KviKvsModuleCallbackCommandExecRoutine(r));
m_pModuleCallbackCommandExecRoutineDict->replace(szCommand,new KviKvsModuleCallbackCommandExecRoutine(r));
}
void KviKvsModuleInterface::kvsRegisterFunction(const TQString &szFunction,KviKvsModuleFunctionExecRoutine r)
{
m_pModuleFunctionExecRoutineDict->tqreplace(szFunction,new KviKvsModuleFunctionExecRoutine(r));
m_pModuleFunctionExecRoutineDict->replace(szFunction,new KviKvsModuleFunctionExecRoutine(r));
}
@ -161,7 +161,7 @@ static bool default_module_kvs_cmd_unload(KviKvsModuleCommandCall *c)
{
if(c->module()->isLocked())
{
if(!c->switches()->tqfind('f',"force"))
if(!c->switches()->find('f',"force"))
{
c->warning(__tr2qs("Can't unload the module: it has locked itself in memory"));
return true;

@ -79,8 +79,8 @@ public:
KviKvsSwitchList * switchList(){ return m_pSwitchList; };
// forwarders for the switch list
bool hasSwitch(unsigned short u,const TQString &szSwitch){ return (m_pSwitchList->tqfind(u,szSwitch) != 0); };
KviKvsVariant * getSwitch(unsigned short u,const TQString &szSwitch){ return m_pSwitchList->tqfind(u,szSwitch); };
bool hasSwitch(unsigned short u,const TQString &szSwitch){ return (m_pSwitchList->find(u,szSwitch) != 0); };
KviKvsVariant * getSwitch(unsigned short u,const TQString &szSwitch){ return m_pSwitchList->find(u,szSwitch); };
};
class KVIRC_API KviKvsModuleCallbackCommandCall : public KviKvsModuleCommandCall
@ -167,11 +167,11 @@ public:
void kvsUnregisterAllEventHandlers();
KviKvsModuleSimpleCommandExecRoutine * kvsFindSimpleCommand(const TQString &szCommand)
{ return m_pModuleSimpleCommandExecRoutineDict->tqfind(szCommand); };
{ return m_pModuleSimpleCommandExecRoutineDict->find(szCommand); };
KviKvsModuleCallbackCommandExecRoutine * kvsFindCallbackCommand(const TQString &szCommand)
{ return m_pModuleCallbackCommandExecRoutineDict->tqfind(szCommand); };
{ return m_pModuleCallbackCommandExecRoutineDict->find(szCommand); };
KviKvsModuleFunctionExecRoutine * kvsFindFunction(const TQString &szFunction)
{ return m_pModuleFunctionExecRoutineDict->tqfind(szFunction); };
{ return m_pModuleFunctionExecRoutineDict->find(szFunction); };
void completeCommand(const TQString &cmd,KviPointerList<TQString> * matches);
void completeFunction(const TQString &cmd,KviPointerList<TQString> * matches);

@ -742,7 +742,7 @@ bool KviKvsObject::connectSignal(const TQString &sigName,KviKvsObject * pTarget,
m_pSignalDict->setAutoDelete(true);
}
KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName);
KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName);
if(!l)
{
l = new KviKvsObjectConnectionList;
@ -776,7 +776,7 @@ bool KviKvsObject::disconnectSignal(const TQString &sigName,KviKvsObject * pTarg
{
if(!m_pSignalDict)return false; //no such signal to disconnect
KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName);
KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName);
if(!l)return false;
KviKvsObjectConnectionListIterator it(*l);
@ -806,11 +806,11 @@ bool KviKvsObject::disconnectSignal(const TQString &sigName,KviKvsObject * pTarg
bool KviKvsObject::disconnectSignal(const TQString &sigName,KviKvsObjectConnection * pConnection)
{
if(!m_pSignalDict)return false;
KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName);
KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName);
//__range_valid(l);
if(!l)return false;
pConnection->pTargetObject->unregisterConnection(pConnection);
//__range_valid(l->tqfindRef(pConnection) > -1);
//__range_valid(l->findRef(pConnection) > -1);
l->removeRef(pConnection);
if(l->isEmpty())m_pSignalDict->remove(sigName);
if(m_pSignalDict->isEmpty())
@ -838,7 +838,7 @@ int KviKvsObject::emitSignal(const TQString &sigName,KviKvsObjectFunctionCall *
{
if(!m_pSignalDict)return 0;
KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName);
KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName);
if(!l)return 0; // no slots registered
KviKvsVariant retVal;
@ -1156,7 +1156,7 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c)
#ifdef COMPILE_USE_QT4
int idx = m_pObject->tqmetaObject()->indexOfProperty(szName);
#else
int idx = m_pObject->tqmetaObject()->tqfindProperty(szName,true);
int idx = m_pObject->tqmetaObject()->findProperty(szName,true);
#endif
if(idx < 0)
{
@ -1305,12 +1305,12 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c)
TQFont fnt;
fnt.setFamily(szFf);
fnt.setPointSize(iPs);
if(szFl.tqfind('b') != -1)fnt.setBold(true);
if(szFl.tqfind('i') != -1)fnt.setItalic(true);
if(szFl.tqfind('u') != -1)fnt.setUnderline(true);
if(szFl.tqfind('o') != -1)fnt.setOverline(true);
if(szFl.tqfind('f') != -1)fnt.setFixedPitch(true);
if(szFl.tqfind('s') != -1)fnt.setStrikeOut(true);
if(szFl.find('b') != -1)fnt.setBold(true);
if(szFl.find('i') != -1)fnt.setItalic(true);
if(szFl.find('u') != -1)fnt.setUnderline(true);
if(szFl.find('o') != -1)fnt.setOverline(true);
if(szFl.find('f') != -1)fnt.setFixedPitch(true);
if(szFl.find('s') != -1)fnt.setStrikeOut(true);
m_pObject->setProperty(szName,TQVariant(fnt));
}
break;
@ -1387,7 +1387,7 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c)
#ifdef COMPILE_USE_QT4
int idx = m_pObject->tqmetaObject()->indexOfProperty(szName);
#else
int idx = m_pObject->tqmetaObject()->tqfindProperty(szName,true);
int idx = m_pObject->tqmetaObject()->findProperty(szName,true);
#endif
if(idx < 0)
{
@ -1564,7 +1564,7 @@ KviKvsObjectFunctionHandler * KviKvsObject::lookupFunctionHandler(const TQString
if(classOverride.isEmpty() && m_pFunctionHandlers)
{
// lookup the local overrides
h = m_pFunctionHandlers->tqfind(funcName);
h = m_pFunctionHandlers->find(funcName);
}
if(!h)
@ -1711,7 +1711,7 @@ void KviKvsObject::registerPrivateImplementation(const TQString &szFunctionName,
szContext += "[privateimpl]::";
szContext += szFunctionName;
m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szCode));
m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szCode));
}
}

@ -91,7 +91,7 @@ KviKvsObjectClass::~KviKvsObjectClass()
void KviKvsObjectClass::registerFunctionHandler(const TQString & szFunctionName,KviKvsObjectFunctionHandlerProc pProc,unsigned int uFlags)
{
m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectCoreCallFunctionHandler(pProc,uFlags));
m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectCoreCallFunctionHandler(pProc,uFlags));
}
void KviKvsObjectClass::registerFunctionHandler(const TQString & szFunctionName,const TQString &szBuffer,unsigned int uFlags)
@ -99,22 +99,22 @@ void KviKvsObjectClass::registerFunctionHandler(const TQString & szFunctionName,
TQString szContext = m_szName;
szContext += "::";
szContext += szFunctionName;
m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szBuffer,uFlags));
m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szBuffer,uFlags));
}
void KviKvsObjectClass::registerStandardNothingReturnFunctionHandler(const TQString &szFunctionName)
{
m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectStandardNothingReturnFunctionHandler());
m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectStandardNothingReturnFunctionHandler());
}
void KviKvsObjectClass::registerStandardTrueReturnFunctionHandler(const TQString &szFunctionName)
{
m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectStandardTrueReturnFunctionHandler());
m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectStandardTrueReturnFunctionHandler());
}
void KviKvsObjectClass::registerStandardFalseReturnFunctionHandler(const TQString &szFunctionName)
{
m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectStandardFalseReturnFunctionHandler());
m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectStandardFalseReturnFunctionHandler());
}

@ -88,7 +88,7 @@ public:
// retisters an empty handler that returns $false
void registerStandardFalseReturnFunctionHandler(const TQString & szFunc);
KviKvsObjectFunctionHandler * lookupFunctionHandler(const TQString & szFunc){ return m_pFunctionHandlers->tqfind(szFunc); };
KviKvsObjectFunctionHandler * lookupFunctionHandler(const TQString & szFunc){ return m_pFunctionHandlers->find(szFunc); };
KviKvsObject * allocateInstance(KviKvsObject * pParent,const TQString &szName,KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams);
bool save(const TQString &szFileName);

@ -166,7 +166,7 @@ void KviKvsObjectController::flushUserClasses()
TQString szPath;
TQString szFileName = c->name().lower();
szFileName += ".kvs";
szFileName.tqreplace("::","--");
szFileName.replace("::","--");
g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes,szFileName);
if(c->save(szPath))
c->clearDirtyFlag();
@ -180,7 +180,7 @@ void KviKvsObjectController::flushUserClasses()
KviKvsObjectClass * KviKvsObjectController::lookupClass(const TQString &szClass,bool bBuiltinOnly)
{
KviKvsObjectClass * pC = m_pClassDict->tqfind(szClass);
KviKvsObjectClass * pC = m_pClassDict->find(szClass);
if(!pC)
{
// maybe we need to load the object library ?
@ -189,7 +189,7 @@ KviKvsObjectClass * KviKvsObjectController::lookupClass(const TQString &szClass,
{
debug("ops...something wrong with the libkviobjects module!");
return 0;
} else pC = m_pClassDict->tqfind(szClass);
} else pC = m_pClassDict->find(szClass);
if(!pC)
{
if(bBuiltinOnly)return 0;
@ -197,13 +197,13 @@ KviKvsObjectClass * KviKvsObjectController::lookupClass(const TQString &szClass,
TQString szPath;
TQString szFileName = szClass.lower();
szFileName += ".kvs";
szFileName.tqreplace("::","--");
szFileName.replace("::","--");
g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes,szFileName);
if(!KviFileUtils::fileExists(szPath))
g_pApp->getGlobalKvircDirectory(szPath,KviApp::Classes,szFileName);
if(!KviFileUtils::fileExists(szPath))return 0;
if(!KviKvsObjectClass::load(szPath))return 0;
pC = m_pClassDict->tqfind(szClass);
pC = m_pClassDict->find(szClass);
if(pC)pC->clearDirtyFlag(); // just loaded from disk: no need to sync it
}
} else {
@ -221,7 +221,7 @@ void KviKvsObjectController::deleteClass(KviKvsObjectClass * pClass)
TQString szPath;
TQString szFileName = pClass->name().lower();
szFileName += ".kvs";
szFileName.tqreplace("::","--");
szFileName.replace("::","--");
g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes,szFileName);
KviFileUtils::removeFile(szPath);
delete pClass;

@ -62,7 +62,7 @@ public:
void flushUserClasses();
void killAllObjectsWithClass(KviKvsObjectClass * pClass);
KviKvsObjectClass * lookupClass(const TQString &szClass,bool bBuiltinOnly = false);
KviKvsObject * lookupObject(kvs_hobject_t hObject){ return m_pObjectDict->tqfind(hObject); };
KviKvsObject * lookupObject(kvs_hobject_t hObject){ return m_pObjectDict->find(hObject); };
KviPointerHashTable<void *,KviKvsObject> * objectDict(){ return m_pObjectDict; };
KviPointerHashTable<TQString,KviKvsObjectClass> * classDict(){ return m_pClassDict; };
};

@ -2675,7 +2675,7 @@ KviKvsTreeNodeVariable * KviKvsParser::parsePercent(bool bInObjScope)
if(m_pGlobals)
{
if(m_pGlobals->tqfind(szIdentifier))return new KviKvsTreeNodeGlobalVariable(pBegin,szIdentifier);
if(m_pGlobals->find(szIdentifier))return new KviKvsTreeNodeGlobalVariable(pBegin,szIdentifier);
}
if(m_iFlags & AssumeLocals)

@ -229,12 +229,12 @@
[example]
%var << Pragma
[/example]
%var now tqcontains "Ciao ciao Pragma"[br]
%var now contains "Ciao ciao Pragma"[br]
Append a '!' character
[example]
%var <+ !
[/example]
%var now tqcontains "Ciao ciao Pragma!"
%var now contains "Ciao ciao Pragma!"
Now reset it.
[example]
%var =
@ -245,7 +245,7 @@
%var = Pragma,Diabl0,Arter|o
%var <, MalboroLi
[/example]
%var now tqcontains "Pragma,Diabl0,Arter|o,MalboroLi"[br]
%var now contains "Pragma,Diabl0,Arter|o,MalboroLi"[br]
[br]
Now a longer example.
[example]

@ -263,7 +263,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandGlobal()
m_pGlobals = new KviPointerHashTable<TQString,TQString>(17,false);
m_pGlobals->setAutoDelete(true);
}
m_pGlobals->tqreplace(szIdentifier,new TQString());
m_pGlobals->replace(szIdentifier,new TQString());
skipSpaces();

@ -43,9 +43,9 @@ public:
KviPointerHashTable<TQString,KviKvsPopupMenu> * popupDict(){ return m_pPopupDict; };
KviKvsPopupMenu * lookup(const TQString &szPopupName){ return m_pPopupDict->tqfind(szPopupName); };
KviKvsPopupMenu * lookup(const TQString &szPopupName){ return m_pPopupDict->find(szPopupName); };
KviKvsPopupMenu * get(const TQString &szPopupName);
void add(const TQString &szPopupName,KviKvsPopupMenu * pPopup){ m_pPopupDict->tqreplace(szPopupName,pPopup); };
void add(const TQString &szPopupName,KviKvsPopupMenu * pPopup){ m_pPopupDict->replace(szPopupName,pPopup); };
void remove(const TQString &szPopupName){ m_pPopupDict->remove(szPopupName); };
void clear(){ m_pPopupDict->clear(); };

@ -124,7 +124,7 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
TQString * pListingStr = new TQString();
KviTQString::sprintf(*pListingStr,"%d ",iLine - 1);
*pListingStr += TQString(pPrevLine,pLineBegin - pPrevLine);
pListingStr->tqreplace("\n","");
pListingStr->replace("\n","");
pListing->append(pListingStr);
}
@ -143,7 +143,7 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
TQString * pListingStr = new TQString();
KviTQString::sprintf(*pListingStr,"%c%d ",KVI_TEXT_BOLD,iLine);
*pListingStr += TQString(pLineBegin,pBegin - pLineBegin);
pListingStr->tqreplace("\n","");
pListingStr->replace("\n","");
pListing->append(pListingStr);
}
@ -164,7 +164,7 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
TQString * pListingStr = new TQString();
KviTQString::sprintf(*pListingStr,"%d ",iLine + 1);
*pListingStr += TQString(pLineBegin,pBegin - pLineBegin);
pListingStr->tqreplace("\n","");
pListingStr->replace("\n","");
pListing->append(pListingStr);
}

@ -324,7 +324,7 @@ void KviKvsScriptAddonManager::delayedLoad()
TQString szName = it.currentKey();
KviKvsScriptAddon * a = new KviKvsScriptAddon();
if(a->load(&cfg,szName))
m_pAddonDict->tqreplace(szName,a);
m_pAddonDict->replace(szName,a);
else
delete a;
++it;
@ -351,14 +351,14 @@ bool KviKvsScriptAddonManager::registerAddon(KviKvsScriptAddonRegistrationData *
d->szDescriptionScript,
d->szUninstallCallbackScript,
d->szIconId);
m_pAddonDict->tqreplace(d->szName,a);
m_pAddonDict->replace(d->szName,a);
return true;
}
KviKvsScriptAddon * KviKvsScriptAddonManager::findAddon(const TQString &szName)
{
if(!m_bLoaded)delayedLoad();
return m_pAddonDict->tqfind(szName);
return m_pAddonDict->find(szName);
}
bool KviKvsScriptAddonManager::unregisterAddon(const TQString &szName,KviWindow * pWnd,bool bExecuteUninstallCallback)

@ -60,7 +60,7 @@ void KviKvsSwitchList::addShort(unsigned short uShortKey,KviKvsVariant * pVarian
m_pShortSwitchDict = new KviPointerHashTable<unsigned short,KviKvsVariant>(11);
m_pShortSwitchDict->setAutoDelete(true);
}
m_pShortSwitchDict->tqreplace(uShortKey,pVariant);
m_pShortSwitchDict->replace(uShortKey,pVariant);
}
void KviKvsSwitchList::addLong(const TQString &szLongKey,KviKvsVariant * pVariant)
@ -70,6 +70,6 @@ void KviKvsSwitchList::addLong(const TQString &szLongKey,KviKvsVariant * pVarian
m_pLongSwitchDict = new KviPointerHashTable<TQString,KviKvsVariant>(11);
m_pLongSwitchDict->setAutoDelete(true);
}
m_pLongSwitchDict->tqreplace(szLongKey,pVariant);
m_pLongSwitchDict->replace(szLongKey,pVariant);
}

@ -46,35 +46,35 @@ public:
bool isEmpty(){ return ((m_pShortSwitchDict == 0) && (m_pLongSwitchDict == 0)); };
KviKvsVariant * tqfind(const TQChar &c)
KviKvsVariant * find(const TQChar &c)
{
return m_pShortSwitchDict ? m_pShortSwitchDict->tqfind(c.tqunicode()) : 0;
return m_pShortSwitchDict ? m_pShortSwitchDict->find(c.tqunicode()) : 0;
};
KviKvsVariant * tqfind(unsigned short uShortKey)
KviKvsVariant * find(unsigned short uShortKey)
{
return m_pShortSwitchDict ? m_pShortSwitchDict->tqfind((int)uShortKey) : 0;
return m_pShortSwitchDict ? m_pShortSwitchDict->find((int)uShortKey) : 0;
};
KviKvsVariant * tqfind(const TQString &szLongKey)
KviKvsVariant * find(const TQString &szLongKey)
{
return m_pLongSwitchDict ? m_pLongSwitchDict->tqfind(szLongKey) : 0;
return m_pLongSwitchDict ? m_pLongSwitchDict->find(szLongKey) : 0;
};
KviKvsVariant * tqfind(unsigned short uShortKey,const TQString &szLongKey)
KviKvsVariant * find(unsigned short uShortKey,const TQString &szLongKey)
{
if(m_pLongSwitchDict)
{
KviKvsVariant * t;
t = m_pLongSwitchDict->tqfind(szLongKey);
t = m_pLongSwitchDict->find(szLongKey);
if(t)return t;
}
return m_pShortSwitchDict ? m_pShortSwitchDict->tqfind((int)uShortKey) : 0;
return m_pShortSwitchDict ? m_pShortSwitchDict->find((int)uShortKey) : 0;
};
bool getAsStringIfExisting(unsigned short uShortKey,const TQString &szLongKey,TQString &szBuffer)
{
KviKvsVariant * v = tqfind(uShortKey,szLongKey);
KviKvsVariant * v = find(uShortKey,szLongKey);
if(v)
{
v->asString(szBuffer);

@ -122,7 +122,7 @@ bool KviKvsTimerManager::addTimer(const TQString &szName,KviKvsTimer::Lifetime l
}
KviKvsTimer * t = new KviKvsTimer(szName,l,pWnd,iDelay,iId,pCallback,pParams);
KviKvsTimer * old = m_pTimerDictByName->tqfind(szName);
KviKvsTimer * old = m_pTimerDictByName->find(szName);
if(old)deleteTimer(old->id());
m_pTimerDictByName->insert(szName,t);
m_pTimerDictById->insert(t->id(),t);
@ -131,7 +131,7 @@ bool KviKvsTimerManager::addTimer(const TQString &szName,KviKvsTimer::Lifetime l
bool KviKvsTimerManager::deleteTimer(const TQString &szName)
{
KviKvsTimer * t = m_pTimerDictByName->tqfind(szName);
KviKvsTimer * t = m_pTimerDictByName->find(szName);
if(!t)return false;
killTimer(t->id());
m_pTimerDictById->remove(t->id());
@ -142,7 +142,7 @@ bool KviKvsTimerManager::deleteTimer(const TQString &szName)
bool KviKvsTimerManager::deleteTimer(int iId)
{
KviKvsTimer * t = m_pTimerDictById->tqfind(iId);
KviKvsTimer * t = m_pTimerDictById->find(iId);
if(!t)return false;
killTimer(t->id());
m_pTimerDictById->remove(t->id());
@ -206,7 +206,7 @@ void KviKvsTimerManager::timerEvent(TQTimerEvent *e)
return;
}
KviKvsTimer * t = m_pTimerDictById->tqfind(iId);
KviKvsTimer * t = m_pTimerDictById->find(iId);
if(!t)
{
debug("Internal error: got an nonexistant timer event");

@ -112,7 +112,7 @@ public:
// the current timer will be unique
bool deleteCurrentTimer();
void deleteAllTimers();
bool timerExists(const TQString &szName){ return m_pTimerDictByName->tqfind(szName); };
bool timerExists(const TQString &szName){ return m_pTimerDictByName->find(szName); };
KviPointerHashTable<TQString,KviKvsTimer> * timerDict()
{ return m_pTimerDictByName; };
protected:

@ -57,7 +57,7 @@ bool KviKvsTreeNodeExtendedScopeVariable::evaluateReadOnly(KviKvsRunTimeContext
return false;
}
KviKvsVariant * v = c->extendedScopeVariables()->tqfind(m_szIdentifier);
KviKvsVariant * v = c->extendedScopeVariables()->find(m_szIdentifier);
if(v)
{
pBuffer->copyFrom(v);

@ -51,7 +51,7 @@ void KviKvsTreeNodeGlobalVariable::dump(const char * prefix)
bool KviKvsTreeNodeGlobalVariable::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer)
{
KviKvsVariant * v = c->globalVariables()->tqfind(m_szIdentifier);
KviKvsVariant * v = c->globalVariables()->find(m_szIdentifier);
if(v)pBuffer->copyFrom(v);
else pBuffer->setNothing();
return true;

@ -102,7 +102,7 @@ bool KviKvsTreeNodeHashElement::evaluateReadOnlyInObjectScope(KviKvsObject *o,Kv
return true;
}
KviKvsVariant * v = val.hash()->tqfind(szKey);
KviKvsVariant * v = val.hash()->find(szKey);
if(!v)
{
pBuffer->setNothing();

@ -55,7 +55,7 @@ void KviKvsTreeNodeLocalVariable::dump(const char * prefix)
bool KviKvsTreeNodeLocalVariable::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer)
{
#ifdef COMPILE_NEW_KVS
KviKvsVariant * v = c->localVariables()->tqfind(m_szIdentifier);
KviKvsVariant * v = c->localVariables()->find(m_szIdentifier);
if(v)
{
pBuffer->copyFrom(v);

@ -62,7 +62,7 @@ bool KviKvsTreeNodeObjectField::canEvaluateInObjectScope()
bool KviKvsTreeNodeObjectField::evaluateReadOnlyInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer)
{
#ifdef COMPILE_NEW_KVS
KviKvsVariant * v = o->dataContainer()->tqfind(m_szIdentifier);
KviKvsVariant * v = o->dataContainer()->find(m_szIdentifier);
if(v)pBuffer->copyFrom(v);
else pBuffer->setNothing();
#endif

@ -1443,10 +1443,10 @@ bool KviKvsTreeNodeOperationStringSubstitution::execute(KviKvsRunTimeContext * c
TQString str;
target->result()->asString(str);
bool bGlobal = szF.tqfind('g',false) != -1;
bool bGlobal = szF.find('g',false) != -1;
TQRegExp re(szL,szF.tqfind('i',false) == -1,szF.tqfind('w',false) != -1);
re.setMinimal(szF.tqfind('m',false) != -1); // greedy or minimal ?
TQRegExp re(szL,szF.find('i',false) == -1,szF.find('w',false) != -1);
re.setMinimal(szF.find('m',false) != -1); // greedy or minimal ?
int idx = 0;

@ -410,7 +410,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopup::execute(KviKvsRunTimeContext * c)
}
// we want to (re)create it
if(!swl.tqfind('m',"--merge"))pPopup->doClear();
if(!swl.find('m',"--merge"))pPopup->doClear();
}

@ -84,7 +84,7 @@ bool KviKvsTreeNodeSpecialCommandForeach::execute(KviKvsRunTimeContext * c)
if(!(m_pSwitches->evaluate(c,&swl)))return false;
}
bool bIncludeEmptyScalars = swl.tqfind('a',"all") != 0;
bool bIncludeEmptyScalars = swl.find('a',"all") != 0;
for(KviKvsVariant * pArg = l.first();pArg;pArg = l.next())
{

@ -86,7 +86,7 @@ void KviKvsTreeNodeSwitchList::addShort(int iShortKey,KviKvsTreeNodeData * p)
m_pShortSwitchDict->setAutoDelete(true);
}
m_pShortSwitchDict->tqreplace(iShortKey,p);
m_pShortSwitchDict->replace(iShortKey,p);
p->setParent(this);
}
@ -98,7 +98,7 @@ void KviKvsTreeNodeSwitchList::addLong(const TQString &szLongKey,KviKvsTreeNodeD
m_pLongSwitchDict->setAutoDelete(true);
}
m_pLongSwitchDict->tqreplace(szLongKey,p);
m_pLongSwitchDict->replace(szLongKey,p);
p->setParent(this);
}
@ -145,7 +145,7 @@ KviKvsTreeNodeData * KviKvsTreeNodeSwitchList::getStandardRebindingSwitch()
KviKvsTreeNodeData * d;
if(m_pShortSwitchDict)
{
d = m_pShortSwitchDict->tqfind('r');
d = m_pShortSwitchDict->find('r');
if(d)
{
m_pShortSwitchDict->setAutoDelete(false);
@ -156,7 +156,7 @@ KviKvsTreeNodeData * KviKvsTreeNodeSwitchList::getStandardRebindingSwitch()
}
if(m_pLongSwitchDict)
{
d = m_pLongSwitchDict->tqfind("rebind");
d = m_pLongSwitchDict->find("rebind");
if(d)
{
m_pLongSwitchDict->setAutoDelete(false);

@ -148,23 +148,23 @@ void KviKvsUserAction::exportToKvs(TQString &szBuffer,
szBuffer += szName;
szBuffer += "\",";
TQString tmp = szVisibleName;
if(tmp.tqcontains('$'))
if(tmp.contains('$'))
{
szBuffer += tmp;
szBuffer += ",";
} else {
tmp.tqreplace("\"","\\\"");
tmp.replace("\"","\\\"");
szBuffer += "\"";
szBuffer += tmp;
szBuffer += "\",";
}
tmp = szDescription;
if(tmp.tqcontains('$'))
if(tmp.contains('$'))
{
szBuffer += tmp;
szBuffer += ",\"";
} else {
tmp.tqreplace("\"","\\\"");
tmp.replace("\"","\\\"");
szBuffer += "\"";
szBuffer += tmp;
szBuffer += "\",\"";

@ -931,14 +931,14 @@ public:
};
void KviKvsVariant::serializeString(TQString& buffer)
{
buffer.tqreplace('\\',"\\\\");
buffer.tqreplace('\n',"\\n");
buffer.tqreplace('\r',"\\r");
buffer.tqreplace('\b',"\\b");
buffer.tqreplace('\t',"\\t");
buffer.tqreplace('\f',"\\f");
buffer.tqreplace('/',"\\/");
buffer.tqreplace('"',"\\\"");
buffer.replace('\\',"\\\\");
buffer.replace('\n',"\\n");
buffer.replace('\r',"\\r");
buffer.replace('\b',"\\b");
buffer.replace('\t',"\\t");
buffer.replace('\f',"\\f");
buffer.replace('/',"\\/");
buffer.replace('"',"\\\"");
buffer.prepend('"');
buffer.append('"');
}

@ -266,7 +266,7 @@ unsigned int KviModule::secondsSinceLastAccess()
/*
void KviModule::registerCommand(const char * cmd,KviModuleCommandParseProc proc)
{
if(m_pCommandDict->tqfind(cmd))m_pCommandDict->remove(cmd);
if(m_pCommandDict->find(cmd))m_pCommandDict->remove(cmd);
m_pCommandDict->insert(cmd,new KviModuleCommandParseProc(proc));
}
@ -312,7 +312,7 @@ void KviModule::unregisterAllEventHandlers()
void KviModule::registerFunction(const char * fnc,KviModuleFunctionParseProc proc)
{
if(m_pFunctionDict->tqfind(fnc))m_pFunctionDict->remove(fnc);
if(m_pFunctionDict->find(fnc))m_pFunctionDict->remove(fnc);
m_pFunctionDict->insert(fnc,new KviModuleFunctionParseProc(proc));
}

@ -103,13 +103,13 @@ KviModuleExtensionManager::~KviModuleExtensionManager()
KviModuleExtensionDescriptorList * KviModuleExtensionManager::getExtensionList(const KviStr &szType)
{
g_pModuleManager->loadModulesByCaps(szType.ptr());
return m_pExtensionDict->tqfind(szType.ptr());
return m_pExtensionDict->find(szType.ptr());
}
KviModuleExtensionDescriptor * KviModuleExtensionManager::registerExtension(KviModule * m,const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &icon)
{
KviModuleExtensionDescriptor * d = new KviModuleExtensionDescriptor(m,szType,szName,szVisibleName,r,icon);
KviModuleExtensionDescriptorList * l = m_pExtensionDict->tqfind(szType.ptr());
KviModuleExtensionDescriptorList * l = m_pExtensionDict->find(szType.ptr());
if(!l)
{
l = new KviModuleExtensionDescriptorList();
@ -157,12 +157,12 @@ KviModuleExtensionDescriptorList * KviModuleExtensionManager::allocateExtensionG
(void)m; // get rid of the unused warning :D
}
KviModuleExtensionDescriptorList * l = m_pExtensionDict->tqfind(szType.ptr());
KviModuleExtensionDescriptorList * l = m_pExtensionDict->find(szType.ptr());
if(!l)
{
// retry : it might have been unloaded
g_pModuleManager->loadModulesByCaps(szType.ptr());
l = m_pExtensionDict->tqfind(szType.ptr());
l = m_pExtensionDict->find(szType.ptr());
}
return l;
@ -170,7 +170,7 @@ KviModuleExtensionDescriptorList * KviModuleExtensionManager::allocateExtensionG
KviModuleExtensionDescriptor * KviModuleExtensionManager::findExtensionDescriptor(const KviStr &szType,const KviStr &szName)
{
KviModuleExtensionDescriptorList * l = m_pExtensionDict->tqfind(szType.ptr());
KviModuleExtensionDescriptorList * l = m_pExtensionDict->find(szType.ptr());
if(!l)return 0;
for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next())
@ -196,7 +196,7 @@ KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr &
// uhm... not there ?
g_pModuleManager->loadModulesByCaps(szType.ptr());
// try again after loading the modules
// l = m_pExtensionDict->tqfind(szType.ptr()); <--- this shouldn't change!
// l = m_pExtensionDict->find(szType.ptr()); <--- this shouldn't change!
for(d = l->first();d;d = l->next())
{
if(d->name().equalsCI(szName))return d->allocate(pWnd,pParams,pSpecial);
@ -222,7 +222,7 @@ KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr &
// uhm... not there ?
g_pModuleManager->loadModulesByCaps(szType.ptr());
// try again after loading the modules
// l = m_pExtensionDict->tqfind(szType.ptr()); <--- this shouldn't change!
// l = m_pExtensionDict->find(szType.ptr()); <--- this shouldn't change!
for(d = l->first();d;d = l->next())
{
if(d->id() == id)return d->allocate(pWnd,pParams,pSpecial);

@ -124,18 +124,18 @@ void KviModuleManager::completeModuleNames(const TQString &word,KviPointerList<T
KviModule * KviModuleManager::findModule(const char * modName)
{
KviModule * m = m_pModuleDict->tqfind(modName);
KviModule * m = m_pModuleDict->find(modName);
if(m)m->updateAccessTime();
return m;
}
KviModule * KviModuleManager::getModule(const char * modName)
{
KviModule * m = m_pModuleDict->tqfind(modName);
KviModule * m = m_pModuleDict->find(modName);
if(!m)
{
if(!loadModule(modName)) return 0;
m = m_pModuleDict->tqfind(modName);
m = m_pModuleDict->find(modName);
}
if(m)m->updateAccessTime();
return m;

@ -1098,7 +1098,7 @@ void KviServerParser::parseCtcpReplyPing(KviCtcpMessage * msg)
bool bOk;
if(szTime.tqcontains('.'))
if(szTime.contains('.'))
{
KviStr szUSecs = szTime;
szUSecs.cutToFirst('.');
@ -1511,7 +1511,7 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg)
TQString szReply,szFileName;
szFileName=a->name();
if(KVI_OPTION_BOOL(KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores))
szFileName.tqreplace(" ","_");
szFileName.replace(" ","_");
// escape the spaces with the right octal code
encodeCtcpParameter(szFileName,szReply);
@ -1573,7 +1573,7 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg)
KviTQString::sprintf(nickLink,"\r!n\r%Q\r",&(msg->pSource->nick()));
KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->tqfind(msg->pSource->nick());
KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->find(msg->pSource->nick());
if(e){
if( (szGender=="m") || (szGender=="M") ) {
e->setGender(KviIrcUserEntry::Male);
@ -1631,8 +1631,8 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg)
TQString szCommand = "http.get -w=nm ";
unsigned int uMaxSize = KVI_OPTION_UINT(KviOption_uintMaximumRequestedAvatarSize);
if(uMaxSize > 0)KviTQString::appendFormatted(szCommand,"-m=%u ",uMaxSize);
szRemoteFile = szRemoteFile.tqreplace(";","%3B");
szRemoteFile = szRemoteFile.tqreplace("\"","%22");
szRemoteFile = szRemoteFile.replace(";","%3B");
szRemoteFile = szRemoteFile.replace("\"","%22");
szCommand += "\""+szRemoteFile+"\"";
szCommand += " \"";
szCommand += szLocalFilePath.ptr();
@ -1800,10 +1800,10 @@ void KviServerParser::parseCtcpReplyUserinfo(KviCtcpMessage *msg)
TQString decoded=msg->msg->console()->decodeText(msg->pData);
bool bNeedToUpdateUserlist = false;
KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->tqfind(msg->pSource->nick());
KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->find(msg->pSource->nick());
if(e)
{
int pos = decoded.tqfind("Gender=",0,false);
int pos = decoded.find("Gender=",0,false);
if(pos>=0)
{

@ -651,7 +651,7 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg)
szNick,szUser,szHost,victim,szKickMsg))
msg->setHaltOutput();
KviIrcUserEntry * e = msg->connection()->userDataBase()->tqfind(victim);
KviIrcUserEntry * e = msg->connection()->userDataBase()->find(victim);
TQString szVHost;
TQString szVUser;
@ -1052,7 +1052,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg)
{
if(szUser == "*")
{
if(szNick.tqfind('.') != -1)
if(szNick.find('.') != -1)
{
// server notice
// FIXME: "Dedicated window for server notices ?"
@ -1635,7 +1635,7 @@ void KviServerParser::parseLiteralMode(KviIrcMessage *msg)
// {
// // This is a server or a channel service
// KviStr snick = source.nick();
// if(snick.tqcontains('.'))source.setHost(source.nick()); // this is a server
// if(snick.contains('.'))source.setHost(source.nick()); // this is a server
// }
TQString szTarget = msg->connection()->decodeText(msg->safeParam(0));
@ -1682,7 +1682,7 @@ void KviServerParser::parseChannelMode(const TQString &szNick,const TQString &sz
KviTQString::sprintf(nickBuffer,"\r!n\r%Q\r",&szNick);
KviTQString::sprintf(hostBuffer,"\r!h\r%Q\r",&szHost);
} else {
if(nickBuffer.tqfind('.') != -1)
if(nickBuffer.find('.') != -1)
{
// This looks a lot like a server!
KviTQString::sprintf(nickBuffer,"\r!s\r%Q\r",&szNick);

@ -61,8 +61,8 @@
#include "kvi_kvs_variantlist.h"
// #define IS_CHANNEL_TYPE_FLAG(_str) ((*(_str) == '#') || (*(_str) == '&') || (*(_str) == '!'))
#define IS_CHANNEL_TYPE_FLAG(_qchar) (msg->connection()->serverInfo()->supportedChannelTypes().tqfind(_qchar) != -1)
#define IS_USER_MODE_PREFIX(_qchar) (msg->connection()->serverInfo()->supportedModePrefixes().tqfind(_qchar) != -1)
#define IS_CHANNEL_TYPE_FLAG(_qchar) (msg->connection()->serverInfo()->supportedChannelTypes().find(_qchar) != -1)
#define IS_USER_MODE_PREFIX(_qchar) (msg->connection()->serverInfo()->supportedModePrefixes().find(_qchar) != -1)
// Numeric message handlers
@ -126,7 +126,7 @@ void KviServerParser::parseNumeric004(KviIrcMessage *msg)
do
{
umodes = msg->safeParam(uModeParam);
} while (((umodes.tqcontains('.')) || (umodes.tqcontains('-'))) && uModeParam++ < uParams);
} while (((umodes.contains('.')) || (umodes.contains('-'))) && uModeParam++ < uParams);
KviStr chanmodes = msg->safeParam(uModeParam+1);
@ -139,7 +139,7 @@ void KviServerParser::parseNumeric004(KviIrcMessage *msg)
if((umodes.occurences('o') != 1) || (chanmodes.occurences('o') != 1) ||
(chanmodes.occurences('b') != 1) || (chanmodes.occurences('v') != 1) ||
(chanmodes.occurences('t') != 1) || (chanmodes.occurences('n') != 1) ||
(chanmodes.tqcontains('.')) || (chanmodes.tqcontains('-')) || (chanmodes.tqcontains('(')))
(chanmodes.contains('.')) || (chanmodes.contains('-')) || (chanmodes.contains('(')))
{
if(!_OUTPUT_TQUIET)
{
@ -303,7 +303,7 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg)
msg->console()->outputNoFmt(KVI_OUT_SERVERINFO,__tr2qs("This server supports the CODEPAGE command, it will be used"));
}
/*if( tmp.tqcontains(msg->console()->textCodec()->name(),false) || tmp.tqcontains("*",false) )
/*if( tmp.contains(msg->console()->textCodec()->name(),false) || tmp.contains("*",false) )
{
msg->connection()->sendFmtData("CODEPAGE %s",msg->console()->textCodec()->name());
}*/
@ -682,7 +682,7 @@ void KviServerParser::parseNumericWhoReply(KviIrcMessage *msg)
TQString szServ = msg->connection()->decodeText(msg->safeParam(4));
TQString szNick = msg->connection()->decodeText(msg->safeParam(5));
TQString szFlag = msg->connection()->decodeText(msg->safeParam(6));
bool bAway = szFlag.tqfind('G') != -1;
bool bAway = szFlag.find('G') != -1;
KviStr trailing = msg->safeTrailing();
KviStr hops = trailing.getToken(' ');
@ -693,7 +693,7 @@ void KviServerParser::parseNumericWhoReply(KviIrcMessage *msg)
// Update the user entry
KviIrcUserDataBase * db = msg->connection()->userDataBase();
KviIrcUserEntry * e = db->tqfind(szNick);
KviIrcUserEntry * e = db->find(szNick);
if(e)
{
if(bHopsOk)e->setHops(iHops);
@ -1023,7 +1023,7 @@ void KviServerParser::parseNumericWhoisAway(KviIrcMessage * msg)
TQString szNk = msg->connection()->decodeText(msg->safeParam(1));
KviIrcUserDataBase * db = msg->connection()->userDataBase();
KviIrcUserEntry * e = db->tqfind(szNk);
KviIrcUserEntry * e = db->find(szNk);
if(e)e->setAway(true);
KviQuery * q = msg->connection()->findQuery(szNk);
if(q) q->updateLabelText();
@ -1050,7 +1050,7 @@ void KviServerParser::parseNumericWhoisUser(KviIrcMessage *msg)
TQString szHost = msg->connection()->decodeText(msg->safeParam(3));
TQString szReal = msg->connection()->decodeText(msg->safeTrailing());
KviIrcUserDataBase * db = msg->connection()->userDataBase();
KviIrcUserEntry * e = db->tqfind(szNick);
KviIrcUserEntry * e = db->find(szNick);
if(e)
{
e->setUser(szUser);
@ -1253,7 +1253,7 @@ void KviServerParser::parseNumericWhoisServer(KviIrcMessage *msg)
TQString szServ = msg->connection()->decodeText(msg->safeParam(2));
KviIrcUserDataBase * db = msg->connection()->userDataBase();
KviIrcUserEntry * e = db->tqfind(szNick);
KviIrcUserEntry * e = db->find(szNick);
if(e)e->setServer(szServ);
KviQuery * q = msg->connection()->findQuery(szNick);
if(q) q->updateLabelText();
@ -1683,7 +1683,7 @@ void KviServerParser::parseNumericAway(KviIrcMessage * msg)
szNewNick.append("AWAY");
} else {
szNewNick = KVI_OPTION_STRING(KviOption_stringCustomAwayNick);
szNewNick.tqreplace("%nick%",nick);
szNewNick.replace("%nick%",nick);
}
if(_OUTPUT_PARANOIC)

@ -204,11 +204,11 @@ void KviActionDrawer::fill()
{
KviActionCategory * c = a->category();
if(!c)c = KviActionManager::categoryGeneric();
KviActionDrawerPage * p = pages.tqfind(c->visibleName());
KviActionDrawerPage * p = pages.find(c->visibleName());
if(!p)
{
p = new KviActionDrawerPage(this,c->description());
pages.tqreplace(c->visibleName(),p);
pages.replace(c->visibleName(),p);
addTab(p,c->visibleName());
//p->show();
}
@ -216,7 +216,7 @@ void KviActionDrawer::fill()
++it;
}
KviActionDrawerPage * p = pages.tqfind(KviActionManager::categoryIrc()->visibleName());
KviActionDrawerPage * p = pages.find(KviActionManager::categoryIrc()->visibleName());
if(p)
{
int iii = indexOf(p);

@ -167,14 +167,14 @@ KviChannel::KviChannel(KviFrame * lpFrm,KviConsole * lpConsole,const char * name
m_pBanEditorButton = new KviWindowToolPageButton(KVI_SMALLICON_UNBAN,KVI_SMALLICON_BAN,__tr2qs("Ban Editor"),buttonContainer(),false,"ban_editor_button");
connect(m_pBanEditorButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleBanEditor()));
if(m_pConsole->connection()->serverInfo()->supportedListModes().tqcontains('e'))
if(m_pConsole->connection()->serverInfo()->supportedListModes().contains('e'))
{
m_pBanExceptionEditorButton =new KviWindowToolPageButton(KVI_SMALLICON_BANUNEXCEPT,KVI_SMALLICON_BANEXCEPT,__tr2qs("Ban Exception Editor"),buttonContainer(),false,"ban_exception_editor_button");
connect(m_pBanExceptionEditorButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleBanExceptionEditor()));
} else {
m_pBanExceptionEditorButton=0;
}
if(m_pConsole->connection()->serverInfo()->supportedListModes().tqcontains('I'))
if(m_pConsole->connection()->serverInfo()->supportedListModes().contains('I'))
{
m_pInviteEditorButton =new KviWindowToolPageButton(KVI_SMALLICON_INVITEUNEXCEPT,KVI_SMALLICON_INVITEEXCEPT,__tr2qs("Invite Exception Editor"),buttonContainer(),false,"invite_exception_editor_button");
connect(m_pInviteEditorButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleInviteEditor()));
@ -265,7 +265,7 @@ void KviChannel::textViewRightClicked()
void KviChannel::getBaseLogFileName(TQString &buffer)
{
TQString szChan(windowName());
szChan.tqreplace(".","%2e");
szChan.replace(".","%2e");
if (console()->connection())
{
buffer=szChan;
@ -569,14 +569,14 @@ TQSize KviChannel::tqsizeHint() const
void KviChannel::setChannelMode(char mode,bool bAdd)
{
if(!m_pConsole->connection()->serverInfo()->supportedListModes().tqcontains(mode)){
if(!m_pConsole->connection()->serverInfo()->supportedListModes().contains(mode)){
if(bAdd)
{
if(!(m_szChannelMode.tqcontains(mode)))m_szChannelMode.append(mode);
if(!(m_szChannelMode.contains(mode)))m_szChannelMode.append(mode);
} else {
if(m_szChannelMode.tqcontains(mode))
if(m_szChannelMode.contains(mode))
{
m_szChannelMode.tqreplace(mode,"");
m_szChannelMode.replace(mode,"");
}
}
updateModeLabel();
@ -602,7 +602,7 @@ void KviChannel::addHighlightedUser(const char * nick)
{
if(!m_pUserListView->findEntry(nick))return;
else
m_pTmpHighLighted->tqreplace(nick,new TQString());
m_pTmpHighLighted->replace(nick,new TQString());
}
void KviChannel::removeHighlightedUser(const char * nick)
@ -1319,7 +1319,7 @@ void KviChannel::getChannelActivityStats(KviChannelActivityStats * s)
(a->uActionType == KVI_USERACTION_NOTICE) ||
(a->uActionType == KVI_USERACTION_ACTION))
{
if(!userDict.tqfind(a->szNick))
if(!userDict.find(a->szNick))
{
if(isOn(a->szNick.ascii()))
{
@ -1379,8 +1379,8 @@ void KviChannel::closeEvent(TQCloseEvent *e)
if(connection())
{
TQString tmp = KVI_OPTION_STRING(KviOption_stringPartMessage);
tmp.tqreplace(";","\\;");
tmp.tqreplace("\n"," ");
tmp.replace(";","\\;");
tmp.replace("\n"," ");
KviKvsVariant vRet;
if(KviKvsScript::evaluate(tmp,this,0,&vRet))vRet.asString(tmp);
@ -1605,12 +1605,12 @@ void KviChannel::preprocessMessage(TQString & szMessage)
{
TQStringList strings = TQStringList::split(" ",szMessage, TRUE);
for ( TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) {
if((*it).tqcontains('\r')) continue;
if((*it).contains('\r')) continue;
TQString tmp = KviMircCntrl::stripControlBytes(*it);
if( findEntry(*it) ) *it=TQString("\r!n\r%1\r").tqarg(*it);
if(m_pConsole)
if(m_pConsole->connection())
if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().tqcontains(tmp[0]))
if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0]))
if((*it)==tmp)
*it=TQString("\r!c\r%1\r").tqarg(*it);
else

@ -285,7 +285,7 @@ public:
void addHighlightedUser(const char * nick);
void removeHighlightedUser(const char * nick);
bool isHighlightedUser(const char * nick) { return m_pTmpHighLighted->tqfind(nick); };
bool isHighlightedUser(const char * nick) { return m_pTmpHighLighted->find(nick); };
KviIrcView * messageView() const { return m_pMessageView; };
virtual void lostUserFocus();
virtual void getTaskBarTipText(TQString &buffer);

@ -636,7 +636,7 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,c
{
while(aux->tqunicode())
{
if( KVI_OPTION_STRING(KviOption_stringWordSplitters).tqfind(*aux) > -1 )
if( KVI_OPTION_STRING(KviOption_stringWordSplitters).find(*aux) > -1 )
szSource.append(' ');
else
szSource.append(*aux);
@ -649,7 +649,7 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,c
szSource.prepend(' ');
if(KVI_OPTION_BOOL(KviOption_boolAlwaysHighlightNick) && connection())
{
if(szSource.tqfind(TQString(" %1 ").tqarg(connection()->userInfo()->nickName()),0,false) > -1)
if(szSource.find(TQString(" %1 ").tqarg(connection()->userInfo()->nickName()),0,false) > -1)
return triggerOnHighlight(wnd,type,nick,user,host,szMsg,connection()->userInfo()->nickName());
}
@ -661,7 +661,7 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,c
if((*it).isEmpty())
continue;
// FIXME : This is SLOOOOOOOOW (TQString -> ascii translation!!) !!!!
if(szSource.tqfind(TQString(" %1 ").tqarg(*it),0,false) > -1)
if(szSource.find(TQString(" %1 ").tqarg(*it),0,false) > -1)
{
return triggerOnHighlight(wnd,type,nick,user,host,szMsg,*it);
}
@ -926,7 +926,7 @@ void KviConsole::avatarChanged(KviAvatar * avatar,const TQString &nick,const TQS
{
// cache it
if(avatar)
KviAvatarCache::instance()->tqreplace(avatar->identificationString(),KviIrcMask(nick,user,host),currentNetworkName().utf8().data());
KviAvatarCache::instance()->replace(avatar->identificationString(),KviIrcMask(nick,user,host),currentNetworkName().utf8().data());
else
KviAvatarCache::instance()->remove(KviIrcMask(nick,user,host),currentNetworkName().utf8().data());
}
@ -1001,7 +1001,7 @@ void KviConsole::resetAvatarForMatchingUsers(KviRegisteredUser * u)
KviAvatar * KviConsole::setAvatar(const TQString &nick,const TQString &user,const TQString &host,const TQString &szLocalPath,const TQString &szName)
{
if(!connection())return 0;
KviIrcUserEntry * e = connection()->userDataBase()->tqfind(nick);
KviIrcUserEntry * e = connection()->userDataBase()->find(nick);
if(e)
{
// User and host must match
@ -1043,7 +1043,7 @@ KviAvatar * KviConsole::defaultAvatarFromOptions()
KviAvatar * KviConsole::currentAvatar()
{
if(!connection())return 0;
KviIrcUserEntry * e = connection()->userDataBase()->tqfind(connection()->userInfo()->nickName());
KviIrcUserEntry * e = connection()->userDataBase()->find(connection()->userInfo()->nickName());
if(!e)return 0;
KviAvatar * a = e->avatar();
if(!a)
@ -1061,7 +1061,7 @@ KviAvatar * KviConsole::currentAvatar()
void KviConsole::setAvatarFromOptions()
{
if(!connection())return;
KviIrcUserEntry * e = connection()->userDataBase()->tqfind(connection()->userInfo()->nickName());
KviIrcUserEntry * e = connection()->userDataBase()->find(connection()->userInfo()->nickName());
if(!e)return;
KviAvatar * a = defaultAvatarFromOptions();
if(a)

@ -155,7 +155,7 @@
if(cur)
{
KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->tqfindItem(cur->szEngineName.ptr());
KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->findItem(cur->szEngineName.ptr());
if(it)
{
m_pEnableCheck->setChecked(true);

@ -154,7 +154,7 @@ void KviCustomToolBar::unfilterChild(TQObject * o)
{
if(m_pFilteredChildren)
{
bool * b = m_pFilteredChildren->tqfind(o);
bool * b = m_pFilteredChildren->find(o);
if(b)
{
if(!*b)((TQWidget *)o)->setEnabled(false);

@ -247,7 +247,7 @@ void KviFrame::restoreModuleExtensionToolBars()
for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistModuleExtensionToolbars).begin();it != KVI_OPTION_STRINGLIST(KviOption_stringlistModuleExtensionToolbars).end();++it)
{
TQString szEntry = *it;
int idx = szEntry.tqfind(':');
int idx = szEntry.find(':');
if(idx != -1)
{
TQString szMod = szEntry.left(idx);
@ -509,7 +509,7 @@ void KviFrame::saveWindowProperties(KviWindow * wnd,const char * szSection)
unsigned int minVal = time(0);
while(it.current() && minVal)
{
TQString * pVal = it.current()->tqfind("EntryTimestamp");
TQString * pVal = it.current()->find("EntryTimestamp");
if(pVal)
{
bool bOk;
@ -805,7 +805,7 @@ void KviFrame::unhighlightWindowsOfContext(KviIrcContext * c)
void KviFrame::setActiveWindow(KviWindow *wnd)
{
// ASSERT(m_pWinList->tqfindRef(wnd))
// ASSERT(m_pWinList->findRef(wnd))
if(wnd->isMinimized())wnd->restore();
if(wnd->mdiParent())wnd->setFocus();
else wnd->delayedAutoRaise();
@ -867,7 +867,7 @@ void KviFrame::childConnectionUserModeChange(KviIrcConnection * c)
void KviFrame::childWindowActivated(KviWindow *wnd)
{
// ASSERT(m_pWinList->tqfindRef(wnd))
// ASSERT(m_pWinList->findRef(wnd))
if(g_pActiveWindow == wnd)return;
if(g_pActiveWindow)g_pActiveWindow->lostUserFocus();
// YES: it's HERE!

@ -138,7 +138,7 @@ public:
// window list. This is useful for asynchronous functions
// that keep a window pointer and need to ensure that it is still
// valid after an uncontrolled delay. (Think of a /timer implementation)
bool windowExists(KviWindow * wnd){ return (m_pWinList->tqfindRef(wnd) != -1); };
bool windowExists(KviWindow * wnd){ return (m_pWinList->findRef(wnd) != -1); };
// The number of consoles in this frame
unsigned int consoleCount();
// Creates a new console window. DON'T use the KviConsole constructor directly.

@ -139,7 +139,7 @@ KviImageDialog::KviImageDialog(TQWidget * par,
m_pTypeList->append(KID_TYPE_FULL_PATH);
}
int idx = m_pTypeList->tqfindIndex(initialType);
int idx = m_pTypeList->findIndex(initialType);
if(idx < 0)idx = 0;
TQWidget * l = new TQWidget(this);

@ -797,7 +797,7 @@ void KviInputEditor::mousePressEvent(TQMouseEvent *e)
#ifdef COMPILE_USE_QT4
int occ = szClip.count(TQChar('\n'));
#else
int occ = szClip.tqcontains(TQChar('\n'));
int occ = szClip.contains(TQChar('\n'));
#endif
if(!szClip.isEmpty())
@ -807,10 +807,10 @@ void KviInputEditor::mousePressEvent(TQMouseEvent *e)
szClip.truncate(60);
szClip.append("...");
}
szClip.tqreplace(TQChar('&'),"&amp;");
szClip.tqreplace(TQChar('<'),"&lt;");
szClip.tqreplace(TQChar('>'),"&gt;");
szClip.tqreplace(TQChar('\n'),"<br>");
szClip.replace(TQChar('&'),"&amp;");
szClip.replace(TQChar('<'),"&lt;");
szClip.replace(TQChar('>'),"&gt;");
szClip.replace(TQChar('\n'),"<br>");
TQString label = "<center><b>";
label += __tr2qs("Clipboard");
@ -985,13 +985,13 @@ void KviInputEditor::insertText(const TQString &text)
//szText.replaceAll('\t'," "); //Do not paste tabs
//szText.tqreplace(TQRegExp("\t")," "); // do not paste tabs
//szText.replace(TQRegExp("\t")," "); // do not paste tabs
m_bUpdatesEnabled = false;
removeSelected();
m_bUpdatesEnabled = true;
if(szText.tqfind('\n') == -1)
if(szText.find('\n') == -1)
{
m_szTextBuffer.insert(m_iCursorPosition,szText);
m_szTextBuffer.truncate(m_iMaxBufferSize);
@ -1001,7 +1001,7 @@ void KviInputEditor::insertText(const TQString &text)
TQString szBlock;
while(!szText.isEmpty())
{
int idx = szText.tqfind('\n');
int idx = szText.find('\n');
if(idx != -1)
{
szBlock = szText.left(idx);
@ -1046,7 +1046,7 @@ void KviInputEditor::pasteClipboardWithConfirmation()
if(!c)return;
TQString szText = c->text(TQClipboard::Clipboard);
if(szText.tqcontains(TQChar('\n')) > 0)
if(szText.contains(TQChar('\n')) > 0)
{
if(m_pInputParent->inherits("KviInput"))
((KviInput*)(m_pInputParent))->multiLinePaste(szText);
@ -1061,7 +1061,7 @@ void KviInputEditor::pasteSelectionWithConfirmation()
if(!c)return;
TQString szText = c->text(c->supportsSelection() ? TQClipboard::Selection : TQClipboard::Clipboard);
if(szText.tqcontains(TQChar('\n')) > 0)
if(szText.contains(TQChar('\n')) > 0)
{
if(m_pInputParent->inherits("KviInput"))
((KviInput*)(m_pInputParent))->multiLinePaste(szText);
@ -1779,10 +1779,10 @@ void KviInputEditor::getWordBeforeCursor(TQString &buffer,bool * bIsFirstWordInL
buffer = m_szTextBuffer.left(m_iCursorPosition);
int idx = buffer.tqfindRev(' ');
int idx2 = buffer.tqfindRev(','); // This is for comma separated lists...
int idx3 = buffer.tqfindRev('(');
int idx4 = buffer.tqfindRev('"');
int idx = buffer.findRev(' ');
int idx2 = buffer.findRev(','); // This is for comma separated lists...
int idx3 = buffer.findRev('(');
int idx4 = buffer.findRev('"');
if(idx2 > idx)idx = idx2;
if(idx3 > idx)idx = idx3;
if(idx4 > idx)idx = idx4;
@ -2485,7 +2485,7 @@ void KviInput::keyPressEvent(TQKeyEvent *e)
#ifdef COMPILE_USE_QT4
int nLines = szText.count('\n') + 1;
#else
int nLines = szText.tqcontains('\n') + 1;
int nLines = szText.contains('\n') + 1;
#endif
if(nLines > 15)
{
@ -2551,7 +2551,7 @@ void KviInput::multilineEditorButtonToggled(bool bOn)
m_pMultiLineEditor = KviScriptEditor::createInstance(this);
TQString szText = __tr2qs("<Ctrl+Return>; submits, <Alt+Backspace>; hides this editor");
// compatibility entry to avoid breaking translation just before a release... :)
szText.tqreplace("Alt+Backspace","Ctrl+Backspace");
szText.replace("Alt+Backspace","Ctrl+Backspace");
m_pMultiLineEditor->setFindText(szText);
m_pMultiLineEditor->setFindLineeditReadOnly(true);
m_pInputEditor->hide();

@ -1303,11 +1303,11 @@ void KviIrcView::getLinkEscapeCommand(TQString &buffer,const TQString &szPayload
{
if(szPayload.isEmpty())return;
int idx = szPayload.tqfind(escape_label);
int idx = szPayload.find(escape_label);
if(idx == -1)return;
idx += escape_label.length();
int idx2 = szPayload.tqfind("[!",idx);
int idx2 = szPayload.find("[!",idx);
int len = idx2 == -1 ? szPayload.length() - idx : idx2 - idx;
buffer = szPayload.mid(idx,len);
@ -2128,7 +2128,7 @@ highlighting_check_loop:
// yet more optimized
if(*((unsigned short *)p) < 0xff)
if(void * jmp_address = char_to_check_jump_table[*((unsigned short *)p)])goto *jmp_address;
// goto *(char_to_check_jump_table[*((unsigned char *)p)]); <--- tqreplace 0 with &nothing_found
// goto *(char_to_check_jump_table[*((unsigned char *)p)]); <--- replace 0 with &nothing_found
//nothing_found:
p++;
goto highlighting_check_loop;
@ -3968,7 +3968,7 @@ void KviIrcView::toggleToolWidget()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// The IrcView : tqfind
// The IrcView : find
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -4063,7 +4063,7 @@ void KviIrcView::findNext(const TQString& szText,bool bCaseS,bool bRegExp,bool b
idx = re.search(l->szText,0);
} else {
TQString tmp = l->szText;
idx = tmp.tqfind(szText,0,bCaseS);
idx = tmp.find(szText,0,bCaseS);
}
if(idx != -1)
@ -4116,7 +4116,7 @@ void KviIrcView::findPrev(const TQString& szText,bool bCaseS,bool bRegExp,bool b
idx = re.search(l->szText,0);
} else {
TQString tmp = l->szText;
idx = tmp.tqfind(szText,0,bCaseS);;
idx = tmp.find(szText,0,bCaseS);;
}
if(idx != -1)
@ -4520,11 +4520,11 @@ void KviIrcView::mouseDoubleClickEvent(TQMouseEvent *e)
if((plmn.tqunicode() == '+') || (plmn.tqunicode() == '-'))
{
TQString target(m_pKviWindow->windowName());
target.tqreplace("\\","\\\\");
target.tqreplace("\"","\\\"");
target.tqreplace(";","\\;");
target.tqreplace("$","\\$");
target.tqreplace("%","\\%");
target.replace("\\","\\\\");
target.replace("\"","\\\"");
target.replace(";","\\;");
target.replace("$","\\$");
target.replace("%","\\%");
TQChar flag = linkCmd[2];
switch(flag.tqunicode())
{
@ -4929,7 +4929,7 @@ void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &lin
tip+="</nowrap></font></u></td></tr><tr><td>";
TQMimeSourceFactory::defaultFactory()->setPixmap("host_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)));
if(linkText.tqfind('*') != -1)
if(linkText.find('*') != -1)
{
if(linkText.length() > 1)tip += __tr2qs("Unable to look it up hostname: Hostname appears to be masked");
else tip += __tr2qs("Unable to look it up hostname: Unknown host");
@ -4955,7 +4955,7 @@ void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &lin
}
tip+="</nowrap></font></u></td></tr><tr><td>";
if(linkText.tqfind('*') != -1)
if(linkText.find('*') != -1)
{
if(linkText.length() > 1)tip += __tr2qs("Server appears to be a network hub<br>");
else tip += __tr2qs("Unknown server<br>"); // might happen...
@ -5007,7 +5007,7 @@ void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &lin
{
if(console()->connection())
{
KviIrcUserEntry * e = console()->connection()->userDataBase()->tqfind(linkText);
KviIrcUserEntry * e = console()->connection()->userDataBase()->find(linkText);
if(e)
{
TQString buffer;
@ -5035,8 +5035,8 @@ void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &lin
TQString chanMode;
c->getChannelModeString(chanMode);
TQString topic = KviMircCntrl::stripControlBytes(c->topicWidget()->topic());
topic.tqreplace("<","&lt;");
topic.tqreplace(">","&gt;");
topic.replace("<","&lt;");
topic.replace(">","&gt;");
KviIrcUrl::join(szUrl,console()->connection()->target()->server());
szUrl.append(szChan);
KviTQString::sprintf(buf,__tr2qs("<b>%Q</b> (<u><font color=\"blue\"><nowrap>"

@ -254,7 +254,7 @@ void KviMaskEditor::searchTextChanged ( const TQString & text)
{
pMaskItem->setVisible(true);
} else {
if(pMaskItem->tqmask()->szMask.tqcontains(text))
if(pMaskItem->tqmask()->szMask.contains(text))
pMaskItem->setVisible(true);
else
pMaskItem->setVisible(false);

@ -378,7 +378,7 @@ void KviMdiManager::childMaximized(KviMdiChild * lpC)
void KviMdiManager::childMinimized(KviMdiChild * lpC,bool bWasMaximized)
{
__range_valid(lpC);
if(m_pZ->tqfindRef(lpC) == -1)return;
if(m_pZ->findRef(lpC) == -1)return;
if(m_pZ->count() > 1)
{
m_pZ->setAutoDelete(false);
@ -930,7 +930,7 @@ void KviMdiManager::restoreAll()
while(!list.isEmpty())
{
KviMdiChild *lpC=list.first();
if(lpC->state() != KviMdiChild::Normal && (!(lpC->plainCaption()).tqcontains("CONSOLE") ))
if(lpC->state() != KviMdiChild::Normal && (!(lpC->plainCaption()).contains("CONSOLE") ))
lpC->restore();
list.removeFirst();
}

@ -266,7 +266,7 @@ void KviMenuBar::newConnectionToServer(int id)
{
KviKvsScript::run("options.edit KviServerOptionsWidget",m_pFrm->firstConsole());
} else {
text.tqreplace(TQString("&"),TQString(""));
text.replace(TQString("&"),TQString(""));
KviStr szCommand;
if(KviIrcUrl::parse(text.utf8().data(),szCommand,KVI_IRCURL_CONTEXT_NEW))
KviKvsScript::run(szCommand.ptr(),m_pFrm->firstConsole());

@ -125,7 +125,7 @@ KviModeEditor::KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,cons
KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground);
cb->setEnabled(isEnabled);
m_pCheckBoxes->append(cb);
cb->setChecked(m_szMode.tqcontains((char)ccc.tqunicode()));
cb->setChecked(m_szMode.contains((char)ccc.tqunicode()));
i++;
g->addMultiCellWidget(cb,i,i,0,2);
}
@ -174,19 +174,19 @@ KviModeEditor::KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,cons
szModes = c->connection()->serverInfo()->supportedChannelModes();
}
int idx = szModes.tqfindRev(',');
int idx = szModes.findRev(',');
if(idx != -1)szModes.remove(0,idx+1);
szModes.tqreplace("p","");
szModes.tqreplace("s","");
szModes.tqreplace("t","");
szModes.tqreplace("n","");
szModes.tqreplace("m","");
szModes.tqreplace("i","");
szModes.tqreplace(",","");
szModes.tqreplace("b","");
szModes.tqreplace("k","");
szModes.tqreplace("l","");
szModes.replace("p","");
szModes.replace("s","");
szModes.replace("t","");
szModes.replace("n","");
szModes.replace("m","");
szModes.replace("i","");
szModes.replace(",","");
szModes.replace("b","");
szModes.replace("k","");
szModes.replace("l","");
while(!szModes.isEmpty())
{
@ -197,7 +197,7 @@ KviModeEditor::KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,cons
KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground);
cb->setEnabled(isEnabled);
m_pCheckBoxes->append(cb);
cb->setChecked(m_szMode.tqcontains((char)ccc.tqunicode()));
cb->setChecked(m_szMode.contains((char)ccc.tqunicode()));
i++;
g->addMultiCellWidget(cb,i,i,0,2);
}
@ -311,15 +311,15 @@ void KviModeEditor::commit()
for(KviStyledCheckBox * cb = m_pCheckBoxes->first();cb;cb = m_pCheckBoxes->next())
{
TQString sz = cb->text();
sz.tqreplace("&","");
sz.replace("&","");
if(sz.length() > 0)
{
TQChar ccc = sz[0];
if(cb->isChecked())
{
if(!m_szMode.tqcontains((char)ccc.tqunicode()))szPlusModes.append((char)ccc.tqunicode());
if(!m_szMode.contains((char)ccc.tqunicode()))szPlusModes.append((char)ccc.tqunicode());
} else {
if(m_szMode.tqcontains((char)ccc.tqunicode()))szMinusModes.append((char)ccc.tqunicode());
if(m_szMode.contains((char)ccc.tqunicode()))szMinusModes.append((char)ccc.tqunicode());
}
}
}

@ -143,7 +143,7 @@ void KviModeWidget::editorReturnPressed()
TQString szMinusModes;
for(int i=0; i<szCurModes.length(); i++)
{
if(szNewModes.tqcontains(szCurModes[i]))
if(szNewModes.contains(szCurModes[i]))
szNewModes.remove(szCurModes[i]);
else
szMinusModes+=szCurModes[i];
@ -165,8 +165,8 @@ void KviModeWidget::editorTextChanged( const TQString & text)
TQString szText=text;
for(i=0;i<szText.length();i++)
{
if( !m_pChannel->connection()->serverInfo()->supportedPlainModes().tqcontains(szText[i]) ||
szText.tqfind(szText[i])<i )
if( !m_pChannel->connection()->serverInfo()->supportedPlainModes().contains(szText[i]) ||
szText.find(szText[i])<i )
szText.remove(i,1);
}
m_pLineEdit->setText(szText);

@ -137,7 +137,7 @@ void KviQuery::updateLabelText()
TQString KviQuery::getInfoLabelTipText()
{
TQString txt;
KviIrcUserEntry * e = connection()->userDataBase()->tqfind(m_szName);
KviIrcUserEntry * e = connection()->userDataBase()->find(m_szName);
if(e)
{
TQString tmp;
@ -171,9 +171,9 @@ TQString KviQuery::getInfoLabelTipText()
else
tmp=__tr2qs("%1 is %2").tqarg(m_szName).tqarg(szMask);
tmp.tqreplace('&',"&amp;");
tmp.tqreplace('<',"&lt;");
tmp.tqreplace('>',"&gt;");
tmp.replace('&',"&amp;");
tmp.replace('<',"&lt;");
tmp.replace('>',"&gt;");
txt += tmp;
@ -199,9 +199,9 @@ TQString KviQuery::getInfoLabelTipText()
txt+="<tr><td>";
tmp=__tr2qs("Common channels with %1: %2").tqarg(m_szName).tqarg(szChans);
tmp.tqreplace('&',"&amp;");
tmp.tqreplace('<',"&lt;");
tmp.tqreplace('>',"&gt;");
tmp.replace('&',"&amp;");
tmp.replace('<',"&lt;");
tmp.replace('>',"&gt;");
txt+=tmp;
txt +="</td></tr>";
@ -221,7 +221,7 @@ TQString KviQuery::getInfoLabelText()
TQString tmp;
if(KVI_OPTION_BOOL(KviOption_boolShowExtendedInfoInQueryLabel))
{
KviIrcUserEntry * e = connection()->userDataBase()->tqfind(m_szName);
KviIrcUserEntry * e = connection()->userDataBase()->find(m_szName);
if(e)
{
TQString szMask;

@ -259,7 +259,7 @@ void KviStatusBar::recalcMinimumHeight()
bool KviStatusBar::appletExists(KviStatusBarApplet * pApplet)
{
return (m_pAppletList->tqfindRef(pApplet) != -1);
return (m_pAppletList->findRef(pApplet) != -1);
}
KviStatusBarApplet * KviStatusBar::appletAt(const TQPoint &pnt,bool bBestMatch)
@ -394,7 +394,7 @@ void KviStatusBar::appletsPopupAboutToShow()
KviStatusBarApplet * KviStatusBar::createApplet(const TQString &szInternalName)
{
KviStatusBarAppletDescriptor * d = m_pAppletDescriptors->tqfind(szInternalName);
KviStatusBarAppletDescriptor * d = m_pAppletDescriptors->find(szInternalName);
if(!d)return 0;
return d->create(this);
}
@ -419,7 +419,7 @@ void KviStatusBar::appletsPopupActivated(int id)
{
if(m_pClickedApplet)
{
int idx = m_pAppletList->tqfindRef(m_pClickedApplet);
int idx = m_pAppletList->findRef(m_pClickedApplet);
if(idx != -1)
{
// try to put the new applet just after the clicked one
@ -444,7 +444,7 @@ void KviStatusBar::appletsPopupActivated(int id)
void KviStatusBar::registerAppletDescriptor(KviStatusBarAppletDescriptor * d)
{
m_pAppletDescriptors->tqreplace(d->internalName(),d);
m_pAppletDescriptors->replace(d->internalName(),d);
}
void KviStatusBar::registerApplet(KviStatusBarApplet * a)
@ -518,7 +518,7 @@ void KviStatusBar::mouseMoveEvent(TQMouseEvent * e)
}
m_pAppletList->removeRef(m_pClickedApplet);
int idx = m_pAppletList->tqfindRef(a);
int idx = m_pAppletList->findRef(a);
if(idx == -1)m_pAppletList->append(m_pClickedApplet); // uhg ?
else {
TQPoint p = a->mapFromGlobal(g);

@ -777,7 +777,7 @@ inline KviTaskBarItem * KviClassicTaskBar::prevItem(void)
inline bool KviClassicTaskBar::setIterationPointer(KviTaskBarItem * it)
{
return (m_pButtonList->tqfindRef((const KviTaskBarButton *)it) != -1);
return (m_pButtonList->findRef((const KviTaskBarButton *)it) != -1);
}

@ -44,7 +44,7 @@ private:
TQWidget * m_pOwner;
TQString m_szTypedSeq;
TQString m_szCurFullSeq;
bool m_bAltMode; // in alt mode the itemSelected() string tqcontains
bool m_bAltMode; // in alt mode the itemSelected() string contains
// also the CTRL+I escape code
int m_iTimerId;
public:

@ -499,9 +499,9 @@ void KviTopicWidget::updateToolTip()
TQString tmp = m_szTopic;
tmp.tqreplace('&',"&amp;");
tmp.tqreplace('<',"&lt;");
tmp.tqreplace('>',"&gt;");
tmp.replace('&',"&amp;");
tmp.replace('<',"&lt;");
tmp.replace('>',"&gt;");
tmp = convertToHtml(tmp);
txt += tmp;
@ -563,7 +563,7 @@ void KviTopicWidget::mouseDoubleClickEvent(TQMouseEvent *)
KviChannel *chan = ((KviChannel *)w);
maxlen=chan->connection()->serverInfo()->maxTopicLen();
chan->getChannelModeString(szModes);
if(szModes.tqcontains('t') && !( chan->isMeHalfOp() || chan->isMeOp() || chan->isMeChanOwner() || chan->isMeChanAdmin() || chan->connection()->userInfo()->hasUserMode('o') || chan->connection()->userInfo()->hasUserMode('O')) ) {
if(szModes.contains('t') && !( chan->isMeHalfOp() || chan->isMeOp() || chan->isMeChanOwner() || chan->isMeChanAdmin() || chan->connection()->userInfo()->hasUserMode('o') || chan->connection()->userInfo()->hasUserMode('O')) ) {
bCanEdit=false;
}
break;
@ -643,13 +643,13 @@ bool KviTopicWidget::eventFilter(TQObject *object,TQEvent *e)
{
switch( e->type() ) {
case TQEvent::MouseButtonPress:
if ( TQT_TQRECT_OBJECT(m_pCompletionBox->rect()).tqcontains( ((TQMouseEvent*)e)->pos() ) ) {
if ( TQT_TQRECT_OBJECT(m_pCompletionBox->rect()).contains( ((TQMouseEvent*)e)->pos() ) ) {
complete(m_pCompletionBox->index(m_pCompletionBox->itemAt(((TQMouseEvent*)e)->pos())));
return TRUE;
}
break;
case TQEvent::MouseButtonRelease:
if ( TQT_TQRECT_OBJECT(m_pCompletionBox->rect()).tqcontains( ((TQMouseEvent*)e)->pos() ) ) {
if ( TQT_TQRECT_OBJECT(m_pCompletionBox->rect()).contains( ((TQMouseEvent*)e)->pos() ) ) {
TQMouseEvent tmp( TQEvent::MouseButtonDblClick,
((TQMouseEvent*)e)->pos(), ((TQMouseEvent*)e)->button(), ((TQMouseEvent*)e)->state() ) ;
// will hide popup

@ -605,7 +605,7 @@ KviUserListEntry * KviUserListView::join(const TQString &nick,const TQString &us
const TQString &host,int iFlags)
{
// Ok..an user joins the channel
KviUserListEntry * it = m_pEntryDict->tqfind(nick);
KviUserListEntry * it = m_pEntryDict->find(nick);
if(it == 0)
{
// add an entry to the global dict
@ -648,7 +648,7 @@ void KviUserListView::triggerUpdate()
bool KviUserListView::avatarChanged(const TQString &nick)
{
KviUserListEntry * it = m_pEntryDict->tqfind(nick);
KviUserListEntry * it = m_pEntryDict->find(nick);
if(it)
{
int oldH = it->m_iHeight;
@ -704,7 +704,7 @@ bool KviUserListView::userActionVerifyMask(const TQString &nick,const TQString &
// change (unless they were not known at all)
// This will also update the username and hostname
// if needed.
KviUserListEntry * it = m_pEntryDict->tqfind(TQString(nick));
KviUserListEntry * it = m_pEntryDict->find(TQString(nick));
if(it)
{
it->m_lastActionTime = kvi_unixTime();
@ -750,7 +750,7 @@ void KviUserListView::userAction(const TQString &nick,const TQString &user,const
// on the channel, so we can keep track of his channeel
// idle time. This will also update the username and hostname
// if needed.
KviUserListEntry * it = m_pEntryDict->tqfind(TQString(nick));
KviUserListEntry * it = m_pEntryDict->find(TQString(nick));
if(it)
{
it->m_lastActionTime = kvi_unixTime();
@ -773,7 +773,7 @@ void KviUserListView::userAction(KviIrcMask *user,int actionTemperature)
// on the channel, so we can keep track of his channeel
// idle time. This will also update the username and hostname
// if needed.
KviUserListEntry * it = m_pEntryDict->tqfind(TQString(user->nick()));
KviUserListEntry * it = m_pEntryDict->find(TQString(user->nick()));
if(it)
{
it->m_lastActionTime = kvi_unixTime();
@ -793,7 +793,7 @@ void KviUserListView::userAction(const TQString &nick,int actionTemperature)
// on the channel, so we can keep track of his channeel
// idle time. This will also update the username and hostname
// if needed.
KviUserListEntry * it = m_pEntryDict->tqfind(nick);
KviUserListEntry * it = m_pEntryDict->find(nick);
if(it)
{
it->m_lastActionTime = kvi_unixTime();