summaryrefslogtreecommitdiffstats
path: root/src/kvilib/irc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit72aaee9802d447ee21340b011856b9b355a58f1a (patch)
treef97a68e4f75e6c25c8492e03fdfe6983fb0aa199 /src/kvilib/irc
parent5d03948cd3558c613fae1fad109635f860babcbb (diff)
downloadkvirc-72aaee9802d447ee21340b011856b9b355a58f1a.tar.gz
kvirc-72aaee9802d447ee21340b011856b9b355a58f1a.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/irc')
-rw-r--r--src/kvilib/irc/kvi_avatar.h2
-rw-r--r--src/kvilib/irc/kvi_avatarcache.cpp8
-rw-r--r--src/kvilib/irc/kvi_avatarcache.h2
-rw-r--r--src/kvilib/irc/kvi_ircmask.cpp2
-rw-r--r--src/kvilib/irc/kvi_ircserverdb.cpp34
-rw-r--r--src/kvilib/irc/kvi_ircuserdb.cpp10
-rw-r--r--src/kvilib/irc/kvi_ircuserdb.h2
-rw-r--r--src/kvilib/irc/kvi_useridentity.cpp8
-rw-r--r--src/kvilib/irc/kvi_useridentity.h2
9 files changed, 35 insertions, 35 deletions
diff --git a/src/kvilib/irc/kvi_avatar.h b/src/kvilib/irc/kvi_avatar.h
index fddecf4d..82754d08 100644
--- a/src/kvilib/irc/kvi_avatar.h
+++ b/src/kvilib/irc/kvi_avatar.h
@@ -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
};
diff --git a/src/kvilib/irc/kvi_avatarcache.cpp b/src/kvilib/irc/kvi_avatarcache.cpp
index 59c0ed61..57ab53f5 100644
--- a/src/kvilib/irc/kvi_avatarcache.cpp
+++ b/src/kvilib/irc/kvi_avatarcache.cpp
@@ -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
}
diff --git a/src/kvilib/irc/kvi_avatarcache.h b/src/kvilib/irc/kvi_avatarcache.h
index 7f2ff822..c245c3bc 100644
--- a/src/kvilib/irc/kvi_avatarcache.h
+++ b/src/kvilib/irc/kvi_avatarcache.h
@@ -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);
diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp
index cb90c009..d18e398d 100644
--- a/src/kvilib/irc/kvi_ircmask.cpp
+++ b/src/kvilib/irc/kvi_ircmask.cpp
@@ -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
diff --git a/src/kvilib/irc/kvi_ircserverdb.cpp b/src/kvilib/irc/kvi_ircserverdb.cpp
index 172da1f6..84bb5f39 100644
--- a/src/kvilib/irc/kvi_ircserverdb.cpp
+++ b/src/kvilib/irc/kvi_ircserverdb.cpp
@@ -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);
diff --git a/src/kvilib/irc/kvi_ircuserdb.cpp b/src/kvilib/irc/kvi_ircuserdb.cpp
index bfc1c615..7fda2d12 100644
--- a/src/kvilib/irc/kvi_ircuserdb.cpp
+++ b/src/kvilib/irc/kvi_ircuserdb.cpp
@@ -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++;
diff --git a/src/kvilib/irc/kvi_ircuserdb.h b/src/kvilib/irc/kvi_ircuserdb.h
index ec967331..d60f5087 100644
--- a/src/kvilib/irc/kvi_ircuserdb.h
+++ b/src/kvilib/irc/kvi_ircuserdb.h
@@ -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; };
diff --git a/src/kvilib/irc/kvi_useridentity.cpp b/src/kvilib/irc/kvi_useridentity.cpp
index 67887e9c..4e3468df 100644
--- a/src/kvilib/irc/kvi_useridentity.cpp
+++ b/src/kvilib/irc/kvi_useridentity.cpp
@@ -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;
}
}
diff --git a/src/kvilib/irc/kvi_useridentity.h b/src/kvilib/irc/kvi_useridentity.h
index bcc5e1b4..e35c4050 100644
--- a/src/kvilib/irc/kvi_useridentity.h
+++ b/src/kvilib/irc/kvi_useridentity.h
@@ -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();