diff options
Diffstat (limited to 'src/kvilib/irc')
-rw-r--r-- | src/kvilib/irc/kvi_avatar.cpp | 16 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_avatar.h | 24 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_avatarcache.cpp | 50 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_avatarcache.h | 14 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircmask.cpp | 196 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircmask.h | 76 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircserver.cpp | 146 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircserver.h | 170 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircserverdb.cpp | 168 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircserverdb.h | 36 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircuserdb.cpp | 62 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircuserdb.h | 59 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_mirccntrl.cpp | 22 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_mirccntrl.h | 12 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_nickserv.cpp | 98 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_nickserv.h | 68 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_useridentity.cpp | 58 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_useridentity.h | 120 | ||||
-rw-r--r-- | src/kvilib/irc/moc_kvi_ircuserdb.cpp | 116 |
19 files changed, 756 insertions, 755 deletions
diff --git a/src/kvilib/irc/kvi_avatar.cpp b/src/kvilib/irc/kvi_avatar.cpp index 1642560a..680e7978 100644 --- a/src/kvilib/irc/kvi_avatar.cpp +++ b/src/kvilib/irc/kvi_avatar.cpp @@ -27,7 +27,7 @@ #include "kvi_avatar.h" #include "kvi_qstring.h" -#include <qimage.h> +#include <tqimage.h> /* @@ -95,13 +95,13 @@ The "preferred" image size may grow with time, as the network transmission speed grows. */ -KviAvatar::KviAvatar(const QString &szLocalPath,const QString &szName,QPixmap * pix) +KviAvatar::KviAvatar(const TQString &szLocalPath,const TQString &szName,TQPixmap * pix) { m_pPixmap = pix; m_pScaledPixmap = 0; - if(m_pPixmap == 0)m_pPixmap = new QPixmap(32,32); // cool memory map :) + if(m_pPixmap == 0)m_pPixmap = new TQPixmap(32,32); // cool memory map :) - m_bRemote = KviQString::equalCIN("http://",szName,7); + m_bRemote = KviTQString::equalCIN("http://",szName,7); m_szLocalPath = szLocalPath; m_szName = szName; @@ -113,7 +113,7 @@ KviAvatar::~KviAvatar() if(m_pScaledPixmap)delete m_pScaledPixmap; } -QPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h) +TQPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h) { if(((unsigned int)(m_pPixmap->width())) == w) { @@ -154,11 +154,11 @@ QPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h) } #ifdef COMPILE_USE_QT4 - m_pScaledPixmap = new QPixmap(m_pPixmap->scaled(scaleW,scaleH)); + m_pScaledPixmap = new TQPixmap(m_pPixmap->scaled(scaleW,scaleH)); #else - QImage img = m_pPixmap->convertToImage(); + TQImage img = m_pPixmap->convertToImage(); - m_pScaledPixmap = new QPixmap(); + m_pScaledPixmap = new TQPixmap(); m_pScaledPixmap->convertFromImage(img.smoothScale(scaleW,scaleH)); #endif return m_pScaledPixmap; diff --git a/src/kvilib/irc/kvi_avatar.h b/src/kvilib/irc/kvi_avatar.h index ba8edbc5..fddecf4d 100644 --- a/src/kvilib/irc/kvi_avatar.h +++ b/src/kvilib/irc/kvi_avatar.h @@ -29,37 +29,37 @@ #include "kvi_heapobject.h" #include "kvi_settings.h" -#include <qpixmap.h> +#include <tqpixmap.h> class KVILIB_API KviAvatar : public KviHeapObject { public: - KviAvatar(const QString &szLocalPath,const QString &szName,QPixmap * pix); + KviAvatar(const TQString &szLocalPath,const TQString &szName,TQPixmap * pix); ~KviAvatar(); private: - QString m_szLocalPath; - QString m_szName; + TQString m_szLocalPath; + TQString m_szName; bool m_bRemote; - QPixmap * m_pPixmap; - QPixmap * m_pScaledPixmap; + TQPixmap * m_pPixmap; + TQPixmap * m_pScaledPixmap; unsigned int m_uLastScaleWidth; unsigned int m_uLastScaleHeight; public: - QPixmap * pixmap(){ return m_pPixmap; }; - QPixmap * scaledPixmap(unsigned int w,unsigned int h); + TQPixmap * pixmap(){ return m_pPixmap; }; + TQPixmap * scaledPixmap(unsigned int w,unsigned int h); bool isRemote(){ return m_bRemote; }; - const QString &localPath(){ return m_szLocalPath; }; - const QString &name(){ return m_szName; }; + const TQString &localPath(){ return m_szLocalPath; }; + const TQString &name(){ return m_szName; }; // string that uniquely identifies this avatar // for remote avatars that have name starting with http:// // the name is used. // for local avatars the localPath is used instead - const QString &identificationString(){ return m_bRemote ? m_szName : m_szLocalPath; }; + const TQString &identificationString(){ return m_bRemote ? m_szName : m_szLocalPath; }; // if name is http://xxxx @@ -76,7 +76,7 @@ public: // ex: /home/pragma/.kvirc/avatars/pragma.png // local path->name : strip leading path informations - // name->local path : replace : / and + // name->local path : tqreplace : / and }; diff --git a/src/kvilib/irc/kvi_avatarcache.cpp b/src/kvilib/irc/kvi_avatarcache.cpp index d24562ea..59c0ed61 100644 --- a/src/kvilib/irc/kvi_avatarcache.cpp +++ b/src/kvilib/irc/kvi_avatarcache.cpp @@ -66,7 +66,7 @@ void KviAvatarCache::done() KviAvatarCache::KviAvatarCache() { - m_pAvatarDict = new KviPointerHashTable<QString,KviAvatarCacheEntry>(CACHE_DICT_SIZE,false); + m_pAvatarDict = new KviPointerHashTable<TQString,KviAvatarCacheEntry>(CACHE_DICT_SIZE,false); m_pAvatarDict->setAutoDelete(true); } @@ -76,19 +76,19 @@ KviAvatarCache::~KviAvatarCache() } -void KviAvatarCache::replace(const QString &szIdString,const KviIrcMask &mask,const QString &szNetwork) +void KviAvatarCache::tqreplace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork) { - QString szKey; + TQString szKey; - mask.mask(szKey,KviIrcMask::NickCleanUserSmartNet); - szKey.append(QChar('+')); + tqmask.tqmask(szKey,KviIrcMask::NickCleanUserSmartNet); + szKey.append(TQChar('+')); szKey.append(szNetwork); KviAvatarCacheEntry * e = new KviAvatarCacheEntry; e->szIdString = szIdString; e->tLastAccess = kvi_unixTime(); - m_pAvatarDict->replace(szKey,e); + m_pAvatarDict->tqreplace(szKey,e); if(m_pAvatarDict->count() > MAX_AVATARS_IN_CACHE) { @@ -96,12 +96,12 @@ void KviAvatarCache::replace(const QString &szIdString,const KviIrcMask &mask,co } } -void KviAvatarCache::remove(const KviIrcMask &mask,const QString &szNetwork) +void KviAvatarCache::remove(const KviIrcMask &tqmask,const TQString &szNetwork) { - QString szKey; + TQString szKey; - mask.mask(szKey,KviIrcMask::NickCleanUserSmartNet); - szKey.append(QChar('+')); + tqmask.tqmask(szKey,KviIrcMask::NickCleanUserSmartNet); + szKey.append(TQChar('+')); szKey.append(szNetwork); m_pAvatarDict->remove(szKey); @@ -109,21 +109,21 @@ void KviAvatarCache::remove(const KviIrcMask &mask,const QString &szNetwork) -const QString & KviAvatarCache::lookup(const KviIrcMask &mask,const QString &szNetwork) +const TQString & KviAvatarCache::lookup(const KviIrcMask &tqmask,const TQString &szNetwork) { - QString szKey; + TQString szKey; - mask.mask(szKey,KviIrcMask::NickCleanUserSmartNet); - szKey.append(QChar('+')); + tqmask.tqmask(szKey,KviIrcMask::NickCleanUserSmartNet); + szKey.append(TQChar('+')); szKey.append(szNetwork); - KviAvatarCacheEntry * e = m_pAvatarDict->find(szKey); - if(!e)return KviQString::empty; + KviAvatarCacheEntry * e = m_pAvatarDict->tqfind(szKey); + if(!e)return KviTQString::empty; e->tLastAccess = kvi_unixTime(); return e->szIdString; } -void KviAvatarCache::load(const QString &szFileName) +void KviAvatarCache::load(const TQString &szFileName) { m_pAvatarDict->clear(); @@ -142,14 +142,14 @@ void KviAvatarCache::load(const QString &szFileName) kvi_time_t tLastAccess = cfg.readUIntEntry("LastAccess",0); if((tNow - tLastAccess) < MAX_UNACCESSED_TIME) { - QString szIdString = cfg.readQStringEntry("Avatar",""); + TQString szIdString = cfg.readTQStringEntry("Avatar",""); if(!szIdString.isEmpty()) { KviAvatarCacheEntry * e = new KviAvatarCacheEntry; e->tLastAccess = tLastAccess; e->szIdString = szIdString; - m_pAvatarDict->replace(it.currentKey(),e); + m_pAvatarDict->tqreplace(it.currentKey(),e); cnt++; if(cnt >= MAX_AVATARS_IN_CACHE)return; // done } @@ -158,12 +158,12 @@ void KviAvatarCache::load(const QString &szFileName) } } -void KviAvatarCache::save(const QString &szFileName) +void KviAvatarCache::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); // cfg.clear(); // not needed with KviConfig::Write - KviPointerHashTableIterator<QString,KviAvatarCacheEntry> it(*m_pAvatarDict); + KviPointerHashTableIterator<TQString,KviAvatarCacheEntry> it(*m_pAvatarDict); while(KviAvatarCacheEntry * e = it.current()) { @@ -180,11 +180,11 @@ void KviAvatarCache::save(const QString &szFileName) void KviAvatarCache::cleanup() { // first do a quick run deleting the avatars really too old - KviPointerHashTableIterator<QString,KviAvatarCacheEntry> it(*m_pAvatarDict); + KviPointerHashTableIterator<TQString,KviAvatarCacheEntry> it(*m_pAvatarDict); kvi_time_t tNow = kvi_unixTime(); - KviPointerList<QString> l; + KviPointerList<TQString> l; l.setAutoDelete(false); KviAvatarCacheEntry * e; @@ -193,12 +193,12 @@ void KviAvatarCache::cleanup() { if((tNow - e->tLastAccess) > MAX_UNACCESSED_TIME) { - l.append(new QString(it.currentKey())); + l.append(new TQString(it.currentKey())); } ++it; } - for(QString *s = l.first();s;s = l.next())m_pAvatarDict->remove(*s); + for(TQString *s = l.first();s;s = l.next())m_pAvatarDict->remove(*s); if(m_pAvatarDict->count() < CACHE_GUARD_LEVEL)return; diff --git a/src/kvilib/irc/kvi_avatarcache.h b/src/kvilib/irc/kvi_avatarcache.h index 7d715256..7f2ff822 100644 --- a/src/kvilib/irc/kvi_avatarcache.h +++ b/src/kvilib/irc/kvi_avatarcache.h @@ -34,7 +34,7 @@ typedef struct _KviAvatarCacheEntry { - QString szIdString; + TQString szIdString; kvi_time_t tLastAccess; } KviAvatarCacheEntry; @@ -46,7 +46,7 @@ protected: KviAvatarCache(); ~KviAvatarCache(); public: - KviPointerHashTable<QString,KviAvatarCacheEntry> * m_pAvatarDict; + KviPointerHashTable<TQString,KviAvatarCacheEntry> * m_pAvatarDict; protected: static KviAvatarCache * m_pAvatarCacheInstance; public: @@ -55,14 +55,14 @@ public: static KviAvatarCache * instance(){ return m_pAvatarCacheInstance; }; - void replace(const QString &szIdString,const KviIrcMask &mask,const QString &szNetwork); - void remove(const KviIrcMask &mask,const QString &szNetwork); - const QString & lookup(const KviIrcMask &mask,const QString &szNetwork); + void tqreplace(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); void cleanup(); - void load(const QString &szFileName); - void save(const QString &szFileName); + void load(const TQString &szFileName); + void save(const TQString &szFileName); }; diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp index dbdc1b6c..4460cba6 100644 --- a/src/kvilib/irc/kvi_ircmask.cpp +++ b/src/kvilib/irc/kvi_ircmask.cpp @@ -29,18 +29,18 @@ #include "kvi_ircmask.h" /* - @doc: irc_masks + @doc: irc_tqmasks @title: - Irc masks + Irc tqmasks @type: generic @short: - Decription of the standard IRC masks + Decription of the standard IRC tqmasks @keyterms: - irc masks , nickname , username , hostname , wildcard + irc tqmasks , nickname , username , hostname , wildcard @body: - [big]Simple masks[/big][br] - An irc mask is a string in a special format that identifies an user on irc.[br] + [big]Simple tqmasks[/big][br] + An irc tqmask is a string in a special format that identifies an user on irc.[br] The standard basic format is:[br] [b]<nick>!<username>@<host>[/b][br] The <nick> part contains the nickname with that the user is widely known across the network.[br] @@ -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 find <username> strings like "~pragma" or "^pragma", where "pragma" + So finally you can tqfind <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 @@ -68,23 +68,23 @@ The IP address can be either in IPV4 format or in IPV6 format.[br] Some (weird from my point of view) servers hide certain parts of the IP address to prevent attacks to the user's machine.[br] - Here are some examples of full irc-masks:[br] + Here are some examples of full irc-tqmasks:[br] Pragma!^[email protected][br] [jazz][email protected][br] HAN!^solo@ff0f:a0a0:1011::ea80:1[br] - The irc-masks are [b]case insensitive[/b].[br] + The irc-tqmasks are [b]case insensitive[/b].[br] [br] - [big]Wildcard masks[/big][br] - In some contexts the irc-masks can contain '*' and '?' wildcards.[br] - The wild masks are used to "match" an user within a set of them.[br] + [big]Wildcard tqmasks[/big][br] + In some contexts the irc-tqmasks can contain '*' and '?' wildcards.[br] + The wild tqmasks are used to "match" an user within a set of them.[br] '*' matches any sequence (eventually empty) of characters and '?' matches a single character.[br] Wildcards are allowed only in the <nick> , <user> and <host> part: so the - "wildest" mask possible is:[br] + "wildest" tqmask possible is:[br] [b]*!*@*[/b][br] that designates "any nickname, any username on any host".[br] - Here are some examples of wild masks:[br] + Here are some examples of wild tqmasks:[br] Pragma!*[email protected].*: matches any user with nickname "Pragma" , username that ends with "pragma" and coming from any machine on the 212.101.102 network.[br] *!solo@*.starwars.org: matches any nick with username solo (no prefix!) coming from any machine in @@ -225,15 +225,15 @@ KviIrcMask::KviIrcMask() m_szNick = m_szWild; } -KviIrcMask::KviIrcMask(const QString &szMask) +KviIrcMask::KviIrcMask(const TQString &szMask) { - static QString szWild("*"); - const QChar * b = KviQString::nullTerminatedArray(szMask); + static TQString szWild("*"); + const TQChar * b = KviTQString::nullTerminatedArray(szMask); if(b) { - const QChar * p = b; - while(p->unicode() && (p->unicode() != '!'))p++; - if(p->unicode()) + const TQChar * p = b; + while(p->tqunicode() && (p->tqunicode() != '!'))p++; + if(p->tqunicode()) { if(p != b) { @@ -250,8 +250,8 @@ KviIrcMask::KviIrcMask(const QString &szMask) } p++; b = p; - while(p->unicode() && (p->unicode() != '@'))p++; - if(p->unicode()) + while(p->tqunicode() && (p->tqunicode() != '@'))p++; + if(p->tqunicode()) { if(p != b) { @@ -267,7 +267,7 @@ KviIrcMask::KviIrcMask(const QString &szMask) } p++; b=p; - while(p->unicode())p++; + while(p->tqunicode())p++; if(p != b) { m_szHost.setUnicode(b,p-b); @@ -282,27 +282,27 @@ KviIrcMask::KviIrcMask(const QString &szMask) } } -QString KviIrcMask::m_szWild("*"); +TQString KviIrcMask::m_szWild("*"); bool KviIrcMask::hasNumericHost() const { - const QChar * p = KviQString::nullTerminatedArray(m_szHost); + const TQChar * p = KviTQString::nullTerminatedArray(m_szHost); if(!p)return false; int nPoints = 0; int nDoublePoints = 0; unsigned short uc; - while((uc = p->unicode())) + while((uc = p->tqunicode())) { - if(uc == '.')nPoints++; // ipv6 masks can contain dots too! + if(uc == '.')nPoints++; // ipv6 tqmasks can contain dots too! else { if(uc == ':')nDoublePoints++; else { if((uc < '0') || (uc > '9')) { #ifdef COMPILE_USE_QT4 - uc = p->toUpper().unicode(); + uc = p->toUpper().tqunicode(); #else - uc = p->upper().unicode(); + uc = p->upper().tqunicode(); #endif if((uc < 'A') || (uc > 'F'))return false; } @@ -315,8 +315,8 @@ bool KviIrcMask::hasNumericHost() const /** -* Retuns in szMask the specified (if possible) mask of this user.<br> -* If the host or username are not known , the mask may contain less information +* Retuns in szMask the specified (if possible) tqmask of this user.<br> +* If the host or username are not known , the tqmask may contain less information * than requested.<br> * Mask types:<br> * 0 : [email protected] ([email protected]) (default)<br> @@ -341,7 +341,7 @@ bool KviIrcMask::hasNumericHost() const * 19: *!~user@*.host.top (*[email protected].*) * 20: nick!*user@*.host.top (nick!*[email protected].*) * 21: *!*user@*.host.top (*!user@*XXX.XXX.*) -* smart versions of the masks 17-21 that try take care of masked ip addresses +* smart versions of the tqmasks 17-21 that try take care of tqmasked ip addresses * in the form xxx.xxx.INVALID-TOP-MASK * 22: nick!~user@*.host.top ([email protected].*) * 23: nick!*@*.host.top (nick!*@XXX.XXX.*) @@ -349,7 +349,7 @@ bool KviIrcMask::hasNumericHost() const * 25: nick!*user@*.host.top (nick!*[email protected].*) * 26: *!*user@*.host.top (*!user@*XXX.XXX.*) * If some data is missing , these types may change:<br> -* For example , if hostname is missing , the mask type 3 or 4 may be reduced to type 5 +* For example , if hostname is missing , the tqmask type 3 or 4 may be reduced to type 5 */ /* @@ -363,13 +363,13 @@ bool KviIrcMask::hasNumericHost() const ** - i line, no ident */ -static unsigned char maskTable[27][3] = { +static unsigned char tqmaskTable[27][3] = { { 0 , 0 , 0 }, //0 means normal block - { 0 , 0 , 2 }, //2 in the third field means type *.abc.host.top (or XXX.XXX.XXX.*) host mask + { 0 , 0 , 2 }, //2 in the third field means type *.abc.host.top (or XXX.XXX.XXX.*) host tqmask { 0 , 0 , 1 }, //2 in the second field means *user (strip prefixes) { 0 , 1 , 0 }, //1 means * - { 0 , 1 , 2 }, //3 in the third field means type *.host.top (or XXX.XXX.*) host mask - { 0 , 1 , 1 }, //4 in the third field is like 3 but tries to detect masked ip addresses too + { 0 , 1 , 2 }, //3 in the third field means type *.host.top (or XXX.XXX.*) host tqmask + { 0 , 1 , 1 }, //4 in the third field is like 3 but tries to detect tqmasked ip addresses too { 1 , 0 , 0 }, { 1 , 0 , 2 }, { 1 , 0 , 1 }, @@ -393,12 +393,12 @@ static unsigned char maskTable[27][3] = { { 1 , 2 , 4 } }; -void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const +void KviIrcMask::tqmask(TQString &szMask,MaskType eMaskType) const { if((((int)eMaskType) > 26)||(((int)eMaskType) < 0))eMaskType = NickUserHost; - szMask = maskTable[((int)eMaskType)][0] ? m_szWild : m_szNick; + szMask = tqmaskTable[((int)eMaskType)][0] ? m_szWild : m_szNick; szMask.append("!"); - switch(maskTable[((int)eMaskType)][1]) + switch(tqmaskTable[((int)eMaskType)][1]) { case 0: szMask.append(m_szUser); @@ -408,20 +408,20 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const break; default: if (m_szUser.length() > 0) { - if(m_szUser[0].unicode() != '*') + if(m_szUser[0].tqunicode() != '*') szMask.append(m_szWild); - if ((m_szUser[0].unicode() == '~') || - (m_szUser[0].unicode() == '^') || - (m_szUser[0].unicode() == '+') || - (m_szUser[0].unicode() == '-') || - (m_szUser[0].unicode() == '='))szMask.append(m_szUser.right(m_szUser.length() - 1)); + if ((m_szUser[0].tqunicode() == '~') || + (m_szUser[0].tqunicode() == '^') || + (m_szUser[0].tqunicode() == '+') || + (m_szUser[0].tqunicode() == '-') || + (m_szUser[0].tqunicode() == '='))szMask.append(m_szUser.right(m_szUser.length() - 1)); else szMask.append(m_szUser); } break; } szMask.append('@'); - switch(maskTable[((int)eMaskType)][2]) + switch(tqmaskTable[((int)eMaskType)][2]) { case 0: szMask.append(m_szHost); @@ -434,7 +434,7 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const { if(hasNumericHost()) { - QString szHost(m_szHost.left(getIpDomainMaskLen())); + TQString szHost(m_szHost.left(getIpDomainMaskLen())); szMask.append(szHost); szMask.append(m_szWild); } else { @@ -450,7 +450,7 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const { if(hasNumericHost()) { - QString szHost(m_szHost.left(getLargeIpDomainMaskLen())); + TQString szHost(m_szHost.left(getLargeIpDomainMaskLen())); szMask.append(szHost); szMask.append(m_szWild); } else { @@ -466,7 +466,7 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const { if(hasNumericHost() || hasMaskedIp()) { - QString szHost(m_szHost.left(getLargeIpDomainMaskLen())); + TQString szHost(m_szHost.left(getLargeIpDomainMaskLen())); szMask.append(szHost); szMask.append(m_szWild); } else { @@ -532,7 +532,7 @@ bool KviIrcMask::matchesFixed(const char *szMask) const */ /* -bool KviIrcMask::matchedBy(const QString &szMask) const +bool KviIrcMask::matchedBy(const TQString &szMask) const { const char * ret1; const char * ret2; @@ -556,25 +556,25 @@ bool KviIrcMask::matchedBy(const QString &szMask) const } */ -bool KviIrcMask::matches(const KviIrcMask &mask) const +bool KviIrcMask::matches(const KviIrcMask &tqmask) const { - if(KviQString::matchWildExpressionsCI(m_szNick,mask.m_szNick)) + if(KviTQString::matchWildExpressionsCI(m_szNick,tqmask.m_szNick)) { - if(KviQString::matchWildExpressionsCI(m_szUser,mask.m_szUser)) + if(KviTQString::matchWildExpressionsCI(m_szUser,tqmask.m_szUser)) { - if(KviQString::matchWildExpressionsCI(m_szHost,mask.m_szHost))return true; + if(KviTQString::matchWildExpressionsCI(m_szHost,tqmask.m_szHost))return true; } } return false; } -bool KviIrcMask::matchesFixed(const KviIrcMask &mask) const +bool KviIrcMask::matchesFixed(const KviIrcMask &tqmask) const { - if(KviQString::matchStringCI(m_szNick,mask.m_szNick,0,1)) + if(KviTQString::matchStringCI(m_szNick,tqmask.m_szNick,0,1)) { - if(KviQString::matchStringCI(m_szUser,mask.m_szUser,0,1)) + if(KviTQString::matchStringCI(m_szUser,tqmask.m_szUser,0,1)) { - if(KviQString::matchStringCI(m_szHost,mask.m_szHost,0,1))return true; + if(KviTQString::matchStringCI(m_szHost,tqmask.m_szHost,0,1))return true; } } return false; @@ -601,26 +601,26 @@ bool KviIrcMask::matches(const char * nick,const char * user,const char * host) } */ -bool KviIrcMask::matchesFixed(const QString &nick,const QString &user,const QString &host) const +bool KviIrcMask::matchesFixed(const TQString &nick,const TQString &user,const TQString &host) const { - if(!KviQString::matchStringCI(m_szNick,nick,0,1))return false; - if(!KviQString::matchStringCI(m_szUser,user,0,1))return false; - if(!KviQString::matchStringCI(m_szHost,host,0,1))return false; + if(!KviTQString::matchStringCI(m_szNick,nick,0,1))return false; + if(!KviTQString::matchStringCI(m_szUser,user,0,1))return false; + if(!KviTQString::matchStringCI(m_szHost,host,0,1))return false; return true; } -//Internals for mask() +//Internals for tqmask() int KviIrcMask::getIpDomainMaskLen() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; p += len; if(b < p) { p--; - while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; + while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--; } // 000.000.000.000 // p @@ -632,17 +632,17 @@ int KviIrcMask::getIpDomainMaskLen() const int KviIrcMask::getLargeIpDomainMaskLen() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; p += len; if(b < p) { p--; - while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; + while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--; if(b < p) { p--; - while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; + while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--; } } // 000.000.000.000 @@ -651,40 +651,40 @@ int KviIrcMask::getLargeIpDomainMaskLen() const return (p == b) ? 0 : ((p-b) + 1); } -QString KviIrcMask::getHostDomainMask() const +TQString KviIrcMask::getHostDomainMask() const { int len = m_szHost.length(); - const QChar *p=KviQString::nullTerminatedArray(m_szHost); - if(!p)return QString::null; - const QChar *b = p; - while(p->unicode() && p->unicode() != '.')p++; - QString ret(p,len - (p - b)); + const TQChar *p=KviTQString::nullTerminatedArray(m_szHost); + if(!p)return TQString(); + const TQChar *b = p; + while(p->tqunicode() && p->tqunicode() != '.')p++; + TQString ret(p,len - (p - b)); return ret; } -QString KviIrcMask::getLargeHostDomainMask() const +TQString KviIrcMask::getLargeHostDomainMask() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; p += len; if(b < p) { p--; - while((b < p) && (p->unicode() != '.'))p--; + while((b < p) && (p->tqunicode() != '.'))p--; if(b < p) { p--; - while((b < p) && (p->unicode() != '.'))p--; + while((b < p) && (p->tqunicode() != '.'))p--; } } // xyz.klm.abc.host.top // p - QString ret(p,len - (p - b)); + TQString ret(p,len - (p - b)); return ret; } @@ -692,25 +692,25 @@ QString KviIrcMask::getLargeHostDomainMask() const bool KviIrcMask::hasMaskedIp() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; if(len == 0)return false; //run to the end p += len; - const QChar *e = p; + const TQChar *e = p; p--; - while((b < p) && (p->unicode() != '.'))p--; + while((b < p) && (p->tqunicode() != '.'))p--; return ((e - p) > 4); // at the moment 4 should be enough : the largest top part is "name" } bool KviIrcMask::operator==(const KviIrcMask &user) { - if(KviQString::equalCI(m_szNick,user.m_szNick)) + if(KviTQString::equalCI(m_szNick,user.m_szNick)) { - if(KviQString::equalCI(m_szUser,user.m_szUser)) + if(KviTQString::equalCI(m_szUser,user.m_szUser)) { - if(KviQString::equalCI(m_szHost,user.m_szHost))return true; + if(KviTQString::equalCI(m_szHost,user.m_szHost))return true; } } return false; @@ -718,10 +718,10 @@ bool KviIrcMask::operator==(const KviIrcMask &user) bool KviIrcMask::hasWildNick() { - const QChar * aux = KviQString::nullTerminatedArray(m_szNick); + const TQChar * aux = KviTQString::nullTerminatedArray(m_szNick); if(!aux)return false; unsigned short uc; - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc == '*') || (uc == '?'))return true; aux++; @@ -732,26 +732,26 @@ bool KviIrcMask::hasWildNick() int KviIrcMask::nonWildChars() { int iCnt = 0; - const QChar * aux = KviQString::nullTerminatedArray(m_szNick); + const TQChar * aux = KviTQString::nullTerminatedArray(m_szNick); if(!aux)return 0; unsigned short uc; - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; } - aux = KviQString::nullTerminatedArray(m_szUser); - while((uc = aux->unicode())) + aux = KviTQString::nullTerminatedArray(m_szUser); + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; } - aux = KviQString::nullTerminatedArray(m_szHost); - while((uc = aux->unicode())) + aux = KviTQString::nullTerminatedArray(m_szHost); + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; diff --git a/src/kvilib/irc/kvi_ircmask.h b/src/kvilib/irc/kvi_ircmask.h index 3c9ccf5d..18d6d70b 100644 --- a/src/kvilib/irc/kvi_ircmask.h +++ b/src/kvilib/irc/kvi_ircmask.h @@ -3,7 +3,7 @@ //============================================================================= // -// File : kvi_ircmask.h +// File : kvi_irctqmask.h // Creation date : Fri Jan 8 1999 19:50:35 by Szymon Stefanek // // This file is part of the KVirc irc client distribution @@ -33,7 +33,7 @@ #include "kvi_qstring.h" //============================================================================= -// Irc user mask abstraction +// Irc user tqmask abstraction //============================================================================= class KVILIB_API KviIrcMask : public KviHeapObject @@ -41,47 +41,47 @@ class KVILIB_API KviIrcMask : public KviHeapObject friend class KviIrcUserList; friend class KviIrcUserChanList; private: - QString m_szNick; - QString m_szUser; - QString m_szHost; - static QString m_szWild; + TQString m_szNick; + TQString m_szUser; + TQString m_szHost; + static TQString m_szWild; public: // Sets the nick for this user.<br> // If szNick is NULL or it points to an empty string the nick is set to "*".<br> - void setNick(const QString &szNick){ m_szNick = szNick.isEmpty() ? m_szWild : szNick; }; + void setNick(const TQString &szNick){ m_szNick = szNick.isEmpty() ? m_szWild : szNick; }; // Sets the username for this user.<br> // If szUsername is NULL or it points to an empty string the username is set to "*".<br> - void setUsername(const QString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; - void setUser(const QString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; + void setUsername(const TQString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; + void setUser(const TQString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; // Sets the host for this user.<br> // If szHost is NULL or it points to an empty string the host is set to "*".<br> - void setHost(const QString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; }; - // Sets the host , nick and username extracting it from an irc mask:<br> + void setHost(const TQString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; }; + // Sets the host , nick and username extracting it from an irc tqmask:<br> // nick!user@host<br> - // The mask is terminated by end-of string null character or a character equal to c in the string.<br> - // Returns the pointer to the end of the mask in the szMask string.(c or null-terminator)<br> - //const char * setMask(const QString &szMask,char c=' '); - // Sets the host , nick and username extracting it from an userhost mask:<br> + // The tqmask is terminated by end-of string null character or a character equal to c in the string.<br> + // Returns the pointer to the end of the tqmask in the szMask string.(c or null-terminator)<br> + //const char * setMask(const TQString &szMask,char c=' '); + // Sets the host , nick and username extracting it from an userhost tqmask:<br> // nick[*]=<+|->user@host<br> - // The mask is terminated by end-of string null char or a space character.<br> + // The tqmask is terminated by end-of string null char or a space character.<br> // Returns the pointer to the next non-space char in the szMask string or to the null-terminator<br> - // If there are no more masks avaiable. + // If there are no more tqmasks avaiable. // WARNING : the szMask pointer can NOT be NULL - //const char *setUserhostMask(const QString &szMask); + //const char *setUserhostMask(const TQString &szMask); // Returns the nick of this user.<br> // In the worst case you get a string == "*"<br> - const QString &nick() const { return m_szNick; }; + const TQString &nick() const { return m_szNick; }; // DEPRECATED! - const QString &username() const { return m_szUser; }; - const QString &user() const { return m_szUser; }; - const QString &host() const { return m_szHost; }; + const TQString &username() const { return m_szUser; }; + const TQString &user() const { return m_szUser; }; + const TQString &host() const { return m_szHost; }; bool hasUser() const { return !(m_szUser.isEmpty() || (m_szUser == m_szWild)); }; bool hasHost() const { return !(m_szHost.isEmpty() || (m_szHost == m_szWild)); }; bool hasNumericHost() const; - // Retuns in szMask the specified (if possible) mask of this user.<br> - // If the host or username are not known , the mask may contain less information + // Retuns in szMask the specified (if possible) tqmask of this user.<br> + // If the host or username are not known , the tqmask may contain less information // than requested.<br> enum MaskType @@ -108,7 +108,7 @@ public: UserLargeNet = 19, // 19 : *!~user@*.host.top (*[email protected].*) NickCleanUserLargeNet = 20, // 20 : nick!*user@*.host.top (nick!*[email protected].*) CleanUserLargeNet = 21, // 21 : *!*user@*.host.top (*!user@*XXX.XXX.*) - // smart versions of the masks 17-21 that try take care of masked ip addresses + // smart versions of the tqmasks 17-21 that try take care of tqmasked ip addresses // in the form xxx.xxx.INVALID-TOP-MASK NickUserSmartNet = 22, // 22 : nick!~user@*.host.top ([email protected].*) NickSmartNet = 23, // 23 : nick!*@*.host.top (nick!*@XXX.XXX.*) @@ -117,7 +117,7 @@ public: CleanUserSmartNet = 26 // 26 : *!*user@*.host.top (*!user@*XXX.XXX.*) }; - void mask(QString &szMask,MaskType eMaskType = NickCleanUserHost) const; + void tqmask(TQString &szMask,MaskType eMaskType = NickCleanUserHost) const; bool hasWildNick(); // Wild external matches (this and external are wild) @@ -125,35 +125,35 @@ public: // bool matches(const char *szMask); // // passing 0 as one of params here means that it is a match by default // bool matches(const char *nick,const char *user,const char *host); - bool matches(const KviIrcMask &mask) const; + bool matches(const KviIrcMask &tqmask) const; // Fixed external matches (this is wild , external is fixed) - bool matchesFixed(const QString &nick,const QString &user,const QString &host) const; -// bool matchesFixed(const QString &szMask) const; - bool matchesFixed(const KviIrcMask &mask) const; + bool matchesFixed(const TQString &nick,const TQString &user,const TQString &host) const; +// bool matchesFixed(const TQString &szMask) const; + bool matchesFixed(const KviIrcMask &tqmask) const; // Fixed internal matches (this is fixed , external is wild) - //bool matchedBy(const QString &szMask) const; - bool matchedBy(const KviIrcMask &mask) const { return mask.matchesFixed(*this); }; + //bool matchedBy(const TQString &szMask) const; + bool matchedBy(const KviIrcMask &tqmask) const { return tqmask.matchesFixed(*this); }; int nonWildChars(); bool operator==(const KviIrcMask &user); public: - // Constructs an empty mask (*!*@*) + // Constructs an empty tqmask (*!*@*) KviIrcMask(); - // Constructs this KviIrcMask object from a string mask - KviIrcMask(const QString &szMask); + // Constructs this KviIrcMask object from a string tqmask + KviIrcMask(const TQString &szMask); // Carbon copy KviIrcMask(const KviIrcMask &ircUser) : m_szNick(ircUser.m_szNick), m_szUser(ircUser.m_szUser), m_szHost(ircUser.m_szHost) {}; - KviIrcMask(const QString &nick,const QString &user,const QString &host) + KviIrcMask(const TQString &nick,const TQString &user,const TQString &host) : m_szNick(nick), m_szUser(user), m_szHost(host) {}; private: int getIpDomainMaskLen() const; - QString getHostDomainMask() const; + TQString getHostDomainMask() const; int getLargeIpDomainMaskLen() const; - QString getLargeHostDomainMask() const; + TQString getLargeHostDomainMask() const; // this is just a GUESS and must be called AFTER making sure that it is NOT a plain numeric IP bool hasMaskedIp() const; }; diff --git a/src/kvilib/irc/kvi_ircserver.cpp b/src/kvilib/irc/kvi_ircserver.cpp index 5f03fb5e..8e1898fa 100644 --- a/src/kvilib/irc/kvi_ircserver.cpp +++ b/src/kvilib/irc/kvi_ircserver.cpp @@ -89,7 +89,7 @@ KviIrcServer::KviIrcServer(const KviIrcServer &serv) m_iProxy = serv.m_iProxy; m_szUserIdentityId = serv.m_szUserIdentityId; if(serv.m_pChannelList) - m_pChannelList = new QStringList(*(serv.m_pChannelList)); + m_pChannelList = new TQStringList(*(serv.m_pChannelList)); else m_pChannelList = 0; m_bAutoConnect = serv.m_bAutoConnect; } @@ -115,7 +115,7 @@ void KviIrcServer::operator=(const KviIrcServer &serv) m_iProxy = serv.m_iProxy; if(m_pChannelList)delete m_pChannelList; if(serv.m_pChannelList) - m_pChannelList = new QStringList(*(serv.m_pChannelList)); + m_pChannelList = new TQStringList(*(serv.m_pChannelList)); else m_pChannelList = 0; m_bAutoConnect = serv.m_bAutoConnect; } @@ -131,12 +131,12 @@ void KviIrcServer::generateUniqueId() { struct timeval tv; kvi_gettimeofday(&tv,0); - KviQString::sprintf(m_szId,"myserver%d%d%d",tv.tv_usec,rand() % 1000,rand() % 1000); + KviTQString::sprintf(m_szId,"myserver%d%d%d",tv.tv_usec,rand() % 1000,rand() % 1000); } -QString KviIrcServer::ircUri() +TQString KviIrcServer::ircUri() { - QString uri("irc"); + TQString uri("irc"); if(useSSL())uri += "s"; if(isIpV6())uri += "6"; uri += "://"; @@ -145,171 +145,171 @@ QString KviIrcServer::ircUri() if(m_uPort!=6667) { uri += ":"; - QString num; + TQString num; num.setNum(m_uPort); uri += num; } return uri; } -void KviIrcServer::setAutoJoinChannelList(QStringList * pNewChannelList) +void KviIrcServer::setAutoJoinChannelList(TQStringList * pNewChannelList) { if(m_pChannelList)delete m_pChannelList; m_pChannelList = pNewChannelList; } -bool KviIrcServer::load(KviConfig * cfg,const QString &prefix) +bool KviIrcServer::load(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QHostname",&prefix); - m_szHostname = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QIp",&prefix); - m_szIp = cfg->readQStringEntry(tmp); + TQString tmp; + KviTQString::sprintf(tmp,"%TQHostname",&prefix); + m_szHostname = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQIp",&prefix); + m_szIp = cfg->readTQStringEntry(tmp); if(m_szHostname.isEmpty() && m_szIp.isEmpty())return false; - KviQString::sprintf(tmp,"%QDescription",&prefix); - m_szDescription = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QUser",&prefix); - m_szUser = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QPass",&prefix); - m_szPass = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QNick",&prefix); - m_szNick = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QRealName",&prefix); - m_szRealName = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QInitUmode",&prefix); - m_szInitUMode = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QAutoJoinChannels",&prefix); - QStringList l = cfg->readStringListEntry(tmp,QStringList()); - if(l.count() > 0)setAutoJoinChannelList(new QStringList(l)); - KviQString::sprintf(tmp,"%QAutoConnect",&prefix); + KviTQString::sprintf(tmp,"%TQDescription",&prefix); + m_szDescription = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQUser",&prefix); + m_szUser = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQPass",&prefix); + m_szPass = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQNick",&prefix); + m_szNick = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQRealName",&prefix); + m_szRealName = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQInitUmode",&prefix); + m_szInitUMode = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQAutoJoinChannels",&prefix); + TQStringList l = cfg->readStringListEntry(tmp,TQStringList()); + if(l.count() > 0)setAutoJoinChannelList(new TQStringList(l)); + KviTQString::sprintf(tmp,"%TQAutoConnect",&prefix); m_bAutoConnect = cfg->readBoolEntry(tmp,false); - KviQString::sprintf(tmp,"%QEncoding",&prefix); - m_szEncoding = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QOnConnectCommand",&prefix); - m_szOnConnectCommand = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QOnLoginCommand",&prefix); - m_szOnLoginCommand = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QLinkFilter",&prefix); - m_szLinkFilter = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QPort",&prefix); + KviTQString::sprintf(tmp,"%TQEncoding",&prefix); + m_szEncoding = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQOnConnectCommand",&prefix); + m_szOnConnectCommand = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQOnLoginCommand",&prefix); + m_szOnLoginCommand = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQLinkFilter",&prefix); + m_szLinkFilter = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQPort",&prefix); m_uPort = cfg->readUIntEntry(tmp,6667); - KviQString::sprintf(tmp,"%QId",&prefix); - m_szId = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQId",&prefix); + m_szId = cfg->readTQStringEntry(tmp); if(m_szId.isEmpty())generateUniqueId(); - KviQString::sprintf(tmp,"%QIpV6",&prefix); + KviTQString::sprintf(tmp,"%TQIpV6",&prefix); setIpV6(cfg->readBoolEntry(tmp,false)); - KviQString::sprintf(tmp,"%QCacheIp",&prefix); + KviTQString::sprintf(tmp,"%TQCacheIp",&prefix); setCacheIp(cfg->readBoolEntry(tmp,false)); // true ? - KviQString::sprintf(tmp,"%QSSL",&prefix); + KviTQString::sprintf(tmp,"%TQSSL",&prefix); setUseSSL(cfg->readBoolEntry(tmp,false)); - KviQString::sprintf(tmp,"%QProxy",&prefix); + KviTQString::sprintf(tmp,"%TQProxy",&prefix); setProxy(cfg->readIntEntry(tmp,-2)); - KviQString::sprintf(tmp,"%QUserIdentityId",&prefix); - m_szUserIdentityId = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQUserIdentityId",&prefix); + m_szUserIdentityId = cfg->readTQStringEntry(tmp); return true; } -void KviIrcServer::save(KviConfig * cfg,const QString &prefix) +void KviIrcServer::save(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QHostname",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQHostname",&prefix); cfg->writeEntry(tmp,m_szHostname); - KviQString::sprintf(tmp,"%QId",&prefix); + KviTQString::sprintf(tmp,"%TQId",&prefix); cfg->writeEntry(tmp,m_szId); if(!m_szIp.isEmpty()) { - KviQString::sprintf(tmp,"%QIp",&prefix); + KviTQString::sprintf(tmp,"%TQIp",&prefix); cfg->writeEntry(tmp,m_szIp); } if(!m_szDescription.isEmpty()) { - KviQString::sprintf(tmp,"%QDescription",&prefix); + KviTQString::sprintf(tmp,"%TQDescription",&prefix); cfg->writeEntry(tmp,m_szDescription); } if(!m_szUser.isEmpty()) { - KviQString::sprintf(tmp,"%QUser",&prefix); + KviTQString::sprintf(tmp,"%TQUser",&prefix); cfg->writeEntry(tmp,m_szUser); } if(!m_szPass.isEmpty()) { - KviQString::sprintf(tmp,"%QPass",&prefix); + KviTQString::sprintf(tmp,"%TQPass",&prefix); cfg->writeEntry(tmp,m_szPass); } if(!m_szNick.isEmpty()) { - KviQString::sprintf(tmp,"%QNick",&prefix); + KviTQString::sprintf(tmp,"%TQNick",&prefix); cfg->writeEntry(tmp,m_szNick); } if(!m_szRealName.isEmpty()) { - KviQString::sprintf(tmp,"%QRealName",&prefix); + KviTQString::sprintf(tmp,"%TQRealName",&prefix); cfg->writeEntry(tmp,m_szRealName); } if(!m_szInitUMode.isEmpty()) { - KviQString::sprintf(tmp,"%QInitUMode",&prefix); + KviTQString::sprintf(tmp,"%TQInitUMode",&prefix); cfg->writeEntry(tmp,m_szInitUMode); } if(autoJoinChannelList()) { - KviQString::sprintf(tmp,"%QAutoJoinChannels",&prefix); + KviTQString::sprintf(tmp,"%TQAutoJoinChannels",&prefix); cfg->writeEntry(tmp,*(autoJoinChannelList())); } if(autoConnect()) // otherwise it defaults to false anyway { - KviQString::sprintf(tmp,"%QAutoConnect",&prefix); + KviTQString::sprintf(tmp,"%TQAutoConnect",&prefix); cfg->writeEntry(tmp,autoConnect()); } if(!m_szEncoding.isEmpty()) { - KviQString::sprintf(tmp,"%QEncoding",&prefix); + KviTQString::sprintf(tmp,"%TQEncoding",&prefix); cfg->writeEntry(tmp,m_szEncoding); } if(!m_szOnConnectCommand.isEmpty()) { - KviQString::sprintf(tmp,"%QOnConnectCommand",&prefix); + KviTQString::sprintf(tmp,"%TQOnConnectCommand",&prefix); cfg->writeEntry(tmp,m_szOnConnectCommand); } if(!m_szOnLoginCommand.isEmpty()) { - KviQString::sprintf(tmp,"%QOnLoginCommand",&prefix); + KviTQString::sprintf(tmp,"%TQOnLoginCommand",&prefix); cfg->writeEntry(tmp,m_szOnLoginCommand); } if(!m_szLinkFilter.isEmpty()) { - KviQString::sprintf(tmp,"%QLinkFilter",&prefix); + KviTQString::sprintf(tmp,"%TQLinkFilter",&prefix); cfg->writeEntry(tmp,m_szLinkFilter); } if(m_uPort != 6667) { - KviQString::sprintf(tmp,"%QPort",&prefix); + KviTQString::sprintf(tmp,"%TQPort",&prefix); cfg->writeEntry(tmp,m_uPort); } if(isIpV6()) { - KviQString::sprintf(tmp,"%QIpV6",&prefix); + KviTQString::sprintf(tmp,"%TQIpV6",&prefix); cfg->writeEntry(tmp,isIpV6()); } if(cacheIp()) { - KviQString::sprintf(tmp,"%QCacheIp",&prefix); + KviTQString::sprintf(tmp,"%TQCacheIp",&prefix); cfg->writeEntry(tmp,cacheIp()); } if(useSSL()) { - KviQString::sprintf(tmp,"%QSSL",&prefix); + KviTQString::sprintf(tmp,"%TQSSL",&prefix); cfg->writeEntry(tmp,useSSL()); } if(proxy()!=-2) { - KviQString::sprintf(tmp,"%QProxy",&prefix); + KviTQString::sprintf(tmp,"%TQProxy",&prefix); cfg->writeEntry(tmp,proxy()); } if(!m_szUserIdentityId.isEmpty()) { - KviQString::sprintf(tmp,"%QUserIdentityId",&prefix); + KviTQString::sprintf(tmp,"%TQUserIdentityId",&prefix); cfg->writeEntry(tmp,m_szUserIdentityId); } } @@ -323,13 +323,13 @@ KviIrcNetwork::KviIrcNetwork(const KviIrcNetwork &src) copyFrom(src); } -KviIrcNetwork::KviIrcNetwork(const QString &name) +KviIrcNetwork::KviIrcNetwork(const TQString &name) { m_szName = name; m_pChannelList = 0; m_pNickServRuleSet = 0; m_bAutoConnect = false; - // m_szEncoding = QString::null; // set by default + // m_szEncoding = TQString(); // set by default } KviIrcNetwork::~KviIrcNetwork() @@ -338,7 +338,7 @@ KviIrcNetwork::~KviIrcNetwork() if(m_pNickServRuleSet)delete m_pNickServRuleSet; } -void KviIrcNetwork::setAutoJoinChannelList(QStringList * pNewChannelList) +void KviIrcNetwork::setAutoJoinChannelList(TQStringList * pNewChannelList) { if(m_pChannelList)delete m_pChannelList; m_pChannelList = pNewChannelList; @@ -364,7 +364,7 @@ void KviIrcNetwork::copyFrom(const KviIrcNetwork &src) m_szOnConnectCommand = src.m_szOnConnectCommand; m_szOnLoginCommand = src.m_szOnLoginCommand; if(m_pChannelList)delete m_pChannelList; - if(src.m_pChannelList)m_pChannelList = new QStringList(*(src.m_pChannelList)); + if(src.m_pChannelList)m_pChannelList = new TQStringList(*(src.m_pChannelList)); else m_pChannelList = 0; if(m_pNickServRuleSet)delete m_pNickServRuleSet; if(src.m_pNickServRuleSet)m_pNickServRuleSet = new KviNickServRuleSet(*(src.m_pNickServRuleSet)); diff --git a/src/kvilib/irc/kvi_ircserver.h b/src/kvilib/irc/kvi_ircserver.h index 4c0ca54d..13876b3e 100644 --- a/src/kvilib/irc/kvi_ircserver.h +++ b/src/kvilib/irc/kvi_ircserver.h @@ -30,7 +30,7 @@ #include "kvi_qstring.h" #include "kvi_pointerlist.h" -#include <qstringlist.h> +#include <tqstringlist.h> class KviConfig; class KviNickServRuleSet; @@ -44,10 +44,10 @@ class KviIrcServer; class KVILIB_API KviIrcServerReconnectInfo { public: - QString m_szNick; - QString m_szAwayReason; - QString m_szJoinChannels; - QStringList m_szOpenQueryes; + TQString m_szNick; + TQString m_szAwayReason; + TQString m_szJoinChannels; + TQStringList m_szOpenQueryes; bool m_bIsAway; }; @@ -59,73 +59,73 @@ public: ~KviIrcServer(); public: KviIrcServerReconnectInfo *m_pReconnectInfo; - QString m_szHostname; // the server hostname (or ip eventually) - QString m_szIp; // the server's cached ip (if we're caching) - QString m_szDescription; // the server description + TQString m_szHostname; // the server hostname (or ip eventually) + TQString m_szIp; // the server's cached ip (if we're caching) + TQString m_szDescription; // the server description kvi_u32_t m_uPort; // the server's port unsigned short int m_uFlags; // flags // Extended data - QString m_szUserIdentityId; // The user identity to use for this server: if empty + TQString m_szUserIdentityId; // The user identity to use for this server: if empty // Then use the network identity instead - QString m_szUser; // special username - QString m_szPass; // special password - QString m_szNick; // special nickname - QString m_szRealName; // special real name - QString m_szInitUMode; // special user mode - QString m_szOnConnectCommand; // the command to run on connect - QString m_szOnLoginCommand; // the command to run after login - QString m_szLinkFilter; // the link filter object - QString m_szEncoding; // if empty, use network encoding - QStringList * m_pChannelList; // Channels to auto join + TQString m_szUser; // special username + TQString m_szPass; // special password + TQString m_szNick; // special nickname + TQString m_szRealName; // special real name + TQString m_szInitUMode; // special user mode + TQString m_szOnConnectCommand; // the command to run on connect + TQString m_szOnLoginCommand; // the command to run after login + TQString m_szLinkFilter; // the link filter object + TQString m_szEncoding; // if empty, use network encoding + TQStringList * m_pChannelList; // Channels to auto join bool m_bAutoConnect; // autoconnect - QString m_szId; // the server's may-be-unique id, may be auto-generated + TQString m_szId; // the server's may-be-unique id, may be auto-generated int m_iProxy; // proxy server's id public: int proxy() { return m_iProxy; }; KviProxy* proxyServer(KviProxyDataBase * pDb); kvi_u32_t port() const { return m_uPort; }; - const QString & ipAddress() const { return m_szIp; }; - const QString & password() const { return m_szPass; }; - const QString & nickName() const { return m_szNick; }; - const QString & initUMode() const { return m_szInitUMode; }; - const QString & hostName() const { return m_szHostname; }; - const QString & ip() const { return m_szIp; }; - const QString & onLoginCommand() const { return m_szOnLoginCommand; }; - const QString & onConnectCommand() const { return m_szOnConnectCommand; }; - const QString & userName() const { return m_szUser; }; - const QString & realName() const { return m_szRealName; }; - const QString & linkFilter() const { return m_szLinkFilter; }; - const QString & description() const { return m_szDescription; }; - const QString & encoding() const { return m_szEncoding; }; - const QString & id() const { return m_szId; }; - const QString & userIdentityId() const { return m_szUserIdentityId; }; + const TQString & ipAddress() const { return m_szIp; }; + const TQString & password() const { return m_szPass; }; + const TQString & nickName() const { return m_szNick; }; + const TQString & initUMode() const { return m_szInitUMode; }; + const TQString & hostName() const { return m_szHostname; }; + const TQString & ip() const { return m_szIp; }; + const TQString & onLoginCommand() const { return m_szOnLoginCommand; }; + const TQString & onConnectCommand() const { return m_szOnConnectCommand; }; + const TQString & userName() const { return m_szUser; }; + const TQString & realName() const { return m_szRealName; }; + const TQString & linkFilter() const { return m_szLinkFilter; }; + const TQString & description() const { return m_szDescription; }; + const TQString & encoding() const { return m_szEncoding; }; + const TQString & id() const { return m_szId; }; + const TQString & userIdentityId() const { return m_szUserIdentityId; }; bool autoConnect() const { return m_bAutoConnect; }; - QStringList* autoJoinChannelList(){ return m_pChannelList; }; + TQStringList* autoJoinChannelList(){ return m_pChannelList; }; bool isIpV6() const { return (m_uFlags & KVI_IRCSERVER_FLAG_IPV6); }; bool useSSL() const { return (m_uFlags & KVI_IRCSERVER_FLAG_SSL); }; bool cacheIp() const { return (m_uFlags & KVI_IRCSERVER_FLAG_CACHEIP); }; void setProxy(int p){ m_iProxy = p; }; - void setIpAddress(const QString &a){ m_szIp = a; }; + void setIpAddress(const TQString &a){ m_szIp = a; }; void setPort(kvi_u32_t p){ m_uPort = p; }; - void setHostName(const QString &n){ m_szHostname = n; }; - void setDescription(const QString &d){ m_szDescription = d; }; - void setUserName(const QString &u){ m_szUser = u; }; - void setPassword(const QString &p){ m_szPass = p; }; - void setNickName(const QString &n){ m_szNick = n; }; - void setRealName(const QString &r){ m_szRealName = r; }; - void setEncoding(const QString &e){ m_szEncoding = e; }; - void setInitUMode(const QString &u){ m_szInitUMode = u; }; - void setOnConnectCommand(const QString &cmd){ m_szOnConnectCommand = cmd; }; - void setOnLoginCommand(const QString &cmd){ m_szOnLoginCommand = cmd; }; - void setLinkFilter(const QString &f){ m_szLinkFilter = f; }; + void setHostName(const TQString &n){ m_szHostname = n; }; + void setDescription(const TQString &d){ m_szDescription = d; }; + void setUserName(const TQString &u){ m_szUser = u; }; + void setPassword(const TQString &p){ m_szPass = p; }; + void setNickName(const TQString &n){ m_szNick = n; }; + void setRealName(const TQString &r){ m_szRealName = r; }; + void setEncoding(const TQString &e){ m_szEncoding = e; }; + void setInitUMode(const TQString &u){ m_szInitUMode = u; }; + void setOnConnectCommand(const TQString &cmd){ m_szOnConnectCommand = cmd; }; + void setOnLoginCommand(const TQString &cmd){ m_szOnLoginCommand = cmd; }; + void setLinkFilter(const TQString &f){ m_szLinkFilter = f; }; // the channel list must be allocated with new! - void setAutoJoinChannelList(QStringList * pNewChannelList); + void setAutoJoinChannelList(TQStringList * pNewChannelList); void setAutoConnect(bool autoconnect) { m_bAutoConnect = autoconnect; }; - void setUserIdentityId(const QString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; + void setUserIdentityId(const TQString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; void setIpV6(bool bSet) { if(bSet)m_uFlags |= KVI_IRCSERVER_FLAG_IPV6; @@ -143,13 +143,13 @@ public: }; void operator =(const KviIrcServer &s); - bool load(KviConfig * cfg,const QString &prefix); - void save(KviConfig * cfg,const QString &prefix); + bool load(KviConfig * cfg,const TQString &prefix); + void save(KviConfig * cfg,const TQString &prefix); void generateUniqueId(); - void setId(const QString &szId){ m_szId = szId; if(m_szId.isEmpty())generateUniqueId(); }; + void setId(const TQString &szId){ m_szId = szId; if(m_szId.isEmpty())generateUniqueId(); }; - QString ircUri(); + TQString ircUri(); }; class KVILIB_API KviIrcNetwork : public KviHeapObject @@ -157,48 +157,48 @@ class KVILIB_API KviIrcNetwork : public KviHeapObject friend class KviIrcServerDataBase; public: KviIrcNetwork(const KviIrcNetwork &src); - KviIrcNetwork(const QString &name); + KviIrcNetwork(const TQString &name); ~KviIrcNetwork(); protected: - QString m_szName; - QString m_szDescription; - QString m_szEncoding; // if empty, use system default - QString m_szNickName; // preferred nick name - QString m_szUserName; // preferred user name - QString m_szRealName; // preferred real name - QString m_szOnConnectCommand; // the command to run on connect - QString m_szOnLoginCommand; // the command to run after login - QStringList * m_pChannelList; // Channels to auto join + TQString m_szName; + TQString m_szDescription; + TQString m_szEncoding; // if empty, use system default + TQString m_szNickName; // preferred nick name + TQString m_szUserName; // preferred user name + TQString m_szRealName; // preferred real name + TQString m_szOnConnectCommand; // the command to run on connect + TQString m_szOnLoginCommand; // the command to run after login + TQStringList * m_pChannelList; // Channels to auto join KviNickServRuleSet * m_pNickServRuleSet; // set of nick serv rules bool m_bAutoConnect; // autoconnect - QString m_szUserIdentityId; // The user identity to use for this server: if empty + TQString m_szUserIdentityId; // The user identity to use for this server: if empty // Then use the global primary identity public: - const QString & name() const { return m_szName; }; - const QString & encoding() const { return m_szEncoding; }; - const QString & description() const { return m_szDescription; }; - const QString & nickName() const { return m_szNickName; }; - const QString & realName() const { return m_szRealName; }; - const QString & userName() const { return m_szUserName; }; - const QString & onLoginCommand() const { return m_szOnLoginCommand; }; - const QString & onConnectCommand() const { return m_szOnConnectCommand; }; - const QString & userIdentityId() const { return m_szUserIdentityId; }; + const TQString & name() const { return m_szName; }; + const TQString & encoding() const { return m_szEncoding; }; + const TQString & description() const { return m_szDescription; }; + const TQString & nickName() const { return m_szNickName; }; + const TQString & realName() const { return m_szRealName; }; + const TQString & userName() const { return m_szUserName; }; + const TQString & onLoginCommand() const { return m_szOnLoginCommand; }; + const TQString & onConnectCommand() const { return m_szOnConnectCommand; }; + const TQString & userIdentityId() const { return m_szUserIdentityId; }; bool autoConnect() const { return m_bAutoConnect; }; - QStringList* autoJoinChannelList(){ return m_pChannelList; }; + TQStringList* autoJoinChannelList(){ return m_pChannelList; }; KviNickServRuleSet * nickServRuleSet(){ return m_pNickServRuleSet; }; void setNickServRuleSet(KviNickServRuleSet * s); void copyFrom(const KviIrcNetwork &d); - void setName(const QString &szName){ m_szName = szName; }; - void setEncoding(const QString &szEncoding){ m_szEncoding = szEncoding; }; - void setDescription(const QString &szDescription){ m_szDescription = szDescription; }; - void setOnConnectCommand(const QString &cmd){ m_szOnConnectCommand = cmd; }; - void setOnLoginCommand(const QString &cmd){ m_szOnLoginCommand = cmd; }; - void setNickName(const QString &n){ m_szNickName = n; }; - void setRealName(const QString &r){ m_szRealName = r; }; - void setUserName(const QString &u){ m_szUserName = u; }; - void setAutoJoinChannelList(QStringList * pNewChannelList); + void setName(const TQString &szName){ m_szName = szName; }; + void setEncoding(const TQString &szEncoding){ m_szEncoding = szEncoding; }; + void setDescription(const TQString &szDescription){ m_szDescription = szDescription; }; + void setOnConnectCommand(const TQString &cmd){ m_szOnConnectCommand = cmd; }; + void setOnLoginCommand(const TQString &cmd){ m_szOnLoginCommand = cmd; }; + void setNickName(const TQString &n){ m_szNickName = n; }; + void setRealName(const TQString &r){ m_szRealName = r; }; + void setUserName(const TQString &u){ m_szUserName = u; }; + void setAutoJoinChannelList(TQStringList * pNewChannelList); void setAutoConnect(bool bAutoConnect){ m_bAutoConnect = bAutoConnect; }; - void setUserIdentityId(const QString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; + void setUserIdentityId(const TQString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; }; diff --git a/src/kvilib/irc/kvi_ircserverdb.cpp b/src/kvilib/irc/kvi_ircserverdb.cpp index 88198b12..172da1f6 100644 --- a/src/kvilib/irc/kvi_ircserverdb.cpp +++ b/src/kvilib/irc/kvi_ircserverdb.cpp @@ -25,10 +25,10 @@ #define __KVILIB__ -#include <qapplication.h> -#include <qlayout.h> -#include <qmessagebox.h> -#include <qcheckbox.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqmessagebox.h> +#include <tqcheckbox.h> #include "kvi_ircserverdb.h" #include "kvi_config.h" @@ -59,7 +59,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::findServer(const KviIrcServer * pServ { for(KviIrcServer *s=m_pServerList->first();s;s=m_pServerList->next()) { - if(KviQString::equalCI(s->m_szHostname,pServer->m_szHostname) && + if(KviTQString::equalCI(s->m_szHostname,pServer->m_szHostname) && (s->m_uPort == pServer->m_uPort) && (s->useSSL() == pServer->useSSL()) && (s->isIpV6() == pServer->isIpV6()))return s; @@ -69,7 +69,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::findServer(const KviIrcServer * pServ void KviIrcServerDataBaseRecord::setCurrentServer(KviIrcServer *srv) { - if(m_pServerList->findRef(srv) != -1)m_pCurrentServer = srv; + if(m_pServerList->tqfindRef(srv) != -1)m_pCurrentServer = srv; } KviIrcServer * KviIrcServerDataBaseRecord::currentServer() @@ -90,7 +90,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::currentServer() KviIrcServerDataBase::KviIrcServerDataBase() { - m_pRecords = new KviPointerHashTable<QString,KviIrcServerDataBaseRecord>(17,false); + m_pRecords = new KviPointerHashTable<TQString,KviIrcServerDataBaseRecord>(17,false); m_pRecords->setAutoDelete(true); m_pAutoConnectOnStartupServers = 0; m_pAutoConnectOnStartupNetworks = 0; @@ -126,19 +126,19 @@ void KviIrcServerDataBase::clear() KviIrcServerDataBaseRecord * KviIrcServerDataBase::insertNetwork(KviIrcNetwork *n) { KviIrcServerDataBaseRecord * r = new KviIrcServerDataBaseRecord(n); - m_pRecords->replace(n->name(),r); + m_pRecords->tqreplace(n->name(),r); return r; } -KviIrcServerDataBaseRecord * KviIrcServerDataBase::findRecord(const QString &szNetName) +KviIrcServerDataBaseRecord * KviIrcServerDataBase::findRecord(const TQString &szNetName) { - return m_pRecords->find(szNetName); + return m_pRecords->tqfind(szNetName); } -KviIrcNetwork * KviIrcServerDataBase::findNetwork(const QString &szName) +KviIrcNetwork * KviIrcServerDataBase::findNetwork(const TQString &szName) { - KviIrcServerDataBaseRecord * r = m_pRecords->find(szName); + KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(szName); if(!r)return 0; return r->network(); } @@ -146,19 +146,19 @@ KviIrcNetwork * KviIrcServerDataBase::findNetwork(const QString &szName) KviIrcServerDataBaseRecord * KviIrcServerDataBase::currentRecord() { KviIrcServerDataBaseRecord * r = 0; - if(!m_szCurrentNetwork.isEmpty())r = m_pRecords->find(m_szCurrentNetwork); + if(!m_szCurrentNetwork.isEmpty())r = m_pRecords->tqfind(m_szCurrentNetwork); if(r)return r; - KviPointerHashTableIterator<QString,KviIrcServerDataBaseRecord> it(*m_pRecords); + KviPointerHashTableIterator<TQString,KviIrcServerDataBaseRecord> it(*m_pRecords); r = it.current(); if(!r)return 0; m_szCurrentNetwork = r->network()->name(); return r; } -void KviIrcServerDataBase::updateServerIp(KviIrcServer * pServer,const QString & ip) +void KviIrcServerDataBase::updateServerIp(KviIrcServer * pServer,const TQString & ip) { - KviPointerHashTableIterator<QString,KviIrcServerDataBaseRecord> it(*m_pRecords); + KviPointerHashTableIterator<TQString,KviIrcServerDataBaseRecord> it(*m_pRecords); while(KviIrcServerDataBaseRecord * r = it.current()) { KviIrcServer * srv = r->findServer(pServer); @@ -171,7 +171,7 @@ void KviIrcServerDataBase::updateServerIp(KviIrcServer * pServer,const QString & } } -bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetName,KviIrcServerDataBaseRecord * r,QString &szError) +bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const TQString &szNetName,KviIrcServerDataBaseRecord * r,TQString &szError) { m_szCurrentNetwork = szNetName; // find a round-robin server in that network @@ -185,11 +185,11 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetNa for(KviIrcServer * s = r->m_pServerList->first();s;s = r->m_pServerList->next()) { #ifdef COMPILE_USE_QT4 - if(s->m_szDescription.contains("random",Qt::CaseInsensitive) || - (s->m_szDescription.contains("round",Qt::CaseInsensitive) && s->m_szDescription.contains("robin",Qt::CaseInsensitive))) + if(s->m_szDescription.tqcontains("random",TQt::CaseInsensitive) || + (s->m_szDescription.tqcontains("round",TQt::CaseInsensitive) && s->m_szDescription.tqcontains("robin",TQt::CaseInsensitive))) #else - if(s->m_szDescription.contains("random",false) || - (s->m_szDescription.contains("round",false) && s->m_szDescription.contains("robin",false))) + if(s->m_szDescription.tqcontains("random",false) || + (s->m_szDescription.tqcontains("round",false) && s->m_szDescription.tqcontains("robin",false))) #endif { r->setCurrentServer(s); @@ -199,17 +199,17 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetNa // no explicit round robin... try some common names - QString tryAlso1,tryAlso2,tryAlso3; + TQString tryAlso1,tryAlso2,tryAlso3; - KviQString::sprintf(tryAlso1,"irc.%Q.org",&szNetName); - KviQString::sprintf(tryAlso2,"irc.%Q.net",&szNetName); - KviQString::sprintf(tryAlso3,"irc.%Q.com",&szNetName); + KviTQString::sprintf(tryAlso1,"irc.%Q.org",&szNetName); + KviTQString::sprintf(tryAlso2,"irc.%Q.net",&szNetName); + KviTQString::sprintf(tryAlso3,"irc.%Q.com",&szNetName); for(KviIrcServer * ss = r->m_pServerList->first();ss;ss = r->m_pServerList->next()) { - if(KviQString::equalCI(ss->m_szHostname,tryAlso1) || - KviQString::equalCI(ss->m_szHostname,tryAlso2) || - KviQString::equalCI(ss->m_szHostname,tryAlso3)) + if(KviTQString::equalCI(ss->m_szHostname,tryAlso1) || + KviTQString::equalCI(ss->m_szHostname,tryAlso2) || + KviTQString::equalCI(ss->m_szHostname,tryAlso3)) { r->setCurrentServer(ss); return true; @@ -221,36 +221,36 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetNa } -bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString &szError) +bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,TQString &szError) { KviIrcServer * pServer = 0; - KviPointerHashTableIterator<QString,KviIrcServerDataBaseRecord> it(*m_pRecords); + KviPointerHashTableIterator<TQString,KviIrcServerDataBaseRecord> it(*m_pRecords); KviIrcServerDataBaseRecord * r = 0; KviIrcServer * srv; - if(KviQString::equalCIN(d->szServer,"net:",4)) + if(KviTQString::equalCIN(d->szServer,"net:",4)) { // net:networkname form - QString szNet = d->szServer; + TQString szNet = d->szServer; szNet.remove(0,4); - KviIrcServerDataBaseRecord * r = m_pRecords->find(szNet); + KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(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; } - if(KviQString::equalCIN(d->szServer,"id:",3)) + if(KviTQString::equalCIN(d->szServer,"id:",3)) { // id:serverid form - QString szId = d->szServer; + TQString szId = d->szServer; szId.remove(0,3); while((r = it.current())) { for(srv = r->serverList()->first();srv && (!pServer);srv = r->serverList()->next()) { - if(KviQString::equalCI(srv->id(),szId)) + if(KviTQString::equalCI(srv->id(),szId)) { pServer = srv; goto search_finished; @@ -268,7 +268,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString { for(srv = r->serverList()->first();srv && (!pServer);srv = r->serverList()->next()) { - if(KviQString::equalCI(srv->hostName(),d->szServer)) + if(KviTQString::equalCI(srv->hostName(),d->szServer)) { if(d->bIpV6 == srv->isIpV6()) { @@ -283,7 +283,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString if(!d->szLinkFilter.isEmpty()) { // must match the link filter - if(KviQString::equalCI(d->szLinkFilter,srv->linkFilter())) + if(KviTQString::equalCI(d->szLinkFilter,srv->linkFilter())) { // link filter matches pServer = srv; @@ -300,7 +300,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString if(!d->szLinkFilter.isEmpty()) { // must match the link filter - if(KviQString::equalCI(d->szLinkFilter,srv->linkFilter())) + if(KviTQString::equalCI(d->szLinkFilter,srv->linkFilter())) { // link filter matches pServer = srv; @@ -344,13 +344,13 @@ search_finished: { // is it a valid hostname ? (must contain at least one dot) #ifdef COMPILE_USE_QT4 - if(!d->szServer.contains('.')) + if(!d->szServer.tqcontains('.')) #else - if(d->szServer.contains('.') < 1) + if(d->szServer.tqcontains('.') < 1) #endif { // assume it is a network name! - KviIrcServerDataBaseRecord * r = m_pRecords->find(d->szServer); + KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(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->find(__tr2qs("Standalone Servers")); + r = m_pRecords->tqfind(__tr2qs("Standalone Servers")); if(!r) { r = new KviIrcServerDataBaseRecord(new KviIrcNetwork(__tr2qs("Standalone Servers"))); - m_pRecords->replace(r->network()->name(),r); + m_pRecords->tqreplace(r->network()->name(),r); } KviIrcServer * s = new KviIrcServer(); @@ -397,11 +397,11 @@ search_finished: return true; } -void parseMircServerRecord(QString entry,QString& szNet, - QString& szDescription,QString& szHost,QString& szPort,bool& bSsl,kvi_u32_t& uPort) +void parseMircServerRecord(TQString entry,TQString& szNet, + TQString& szDescription,TQString& szHost,TQString& szPort,bool& bSsl,kvi_u32_t& uPort) { bSsl = false; - int idx = KviQString::find(entry,"SERVER:"); + int idx = KviTQString::tqfind(entry,"SERVER:"); if(idx != -1) { szDescription = entry.left(idx); @@ -409,7 +409,7 @@ void parseMircServerRecord(QString entry,QString& szNet, szDescription=szDescription.section(':',1,1); entry.remove(0,idx + 7); - idx = KviQString::find(entry,"GROUP:"); + idx = KviTQString::tqfind(entry,"GROUP:"); if(idx != -1) { szHost = entry.left(idx); @@ -431,35 +431,35 @@ void parseMircServerRecord(QString entry,QString& szNet, } } -void KviIrcServerDataBase::loadFromMircIni(const QString & filename, const QString & szMircIni, QStringList& recentServers) +void KviIrcServerDataBase::loadFromMircIni(const TQString & filename, const TQString & szMircIni, TQStringList& recentServers) { clear(); recentServers.clear(); - QString szDefaultServer; + TQString szDefaultServer; KviConfig mircCfg(szMircIni,KviConfig::Read,true); if(mircCfg.hasGroup("mirc")) { mircCfg.setGroup("mirc"); - szDefaultServer = mircCfg.readQStringEntry("host"); + szDefaultServer = mircCfg.readTQStringEntry("host"); } KviConfig cfg(filename,KviConfig::Read,true); int i = 0; - QString entry; - QString key; + TQString entry; + TQString key; if(cfg.hasGroup("recent")) { cfg.setGroup("recent"); do { - KviQString::sprintf(key,"n%d",i); + KviTQString::sprintf(key,"n%d",i); entry = cfg.readEntry(key); if(!entry.isEmpty()) { - QString szNet; - QString szDescription; - QString szHost; - QString szPort; + TQString szNet; + TQString szDescription; + TQString szHost; + TQString szPort; bool bSsl = false; kvi_u32_t uPort = 0; @@ -477,15 +477,15 @@ void KviIrcServerDataBase::loadFromMircIni(const QString & filename, const QStri { cfg.setGroup("servers"); do { - KviQString::sprintf(key,"n%d",i); + KviTQString::sprintf(key,"n%d",i); entry = cfg.readEntry(key); if(!entry.isEmpty()) { bool bDefault = false; - QString szNet; - QString szDescription; - QString szHost; - QString szPort; + TQString szNet; + TQString szDescription; + TQString szHost; + TQString szPort; bool bSsl = false; kvi_u32_t uPort = 0; // <net>:<description>SERVER:<server:port>GROUP:<group???> @@ -520,14 +520,14 @@ void KviIrcServerDataBase::loadFromMircIni(const QString & filename, const QStri } -void KviIrcServerDataBase::load(const QString & filename) +void KviIrcServerDataBase::load(const TQString & filename) { clear(); KviConfig cfg(filename,KviConfig::Read); KviConfigIterator it(*(cfg.dict())); - QString tmp; + TQString tmp; while(it.current()) { @@ -536,16 +536,16 @@ void KviIrcServerDataBase::load(const QString & filename) KviIrcNetwork * n = new KviIrcNetwork(it.currentKey()); KviIrcServerDataBaseRecord * r = insertNetwork(n); cfg.setGroup(it.currentKey()); - n->m_szEncoding = cfg.readQStringEntry("Encoding"); - n->m_szDescription = cfg.readQStringEntry("Description"); - n->m_szNickName = cfg.readQStringEntry("NickName"); - n->m_szRealName = cfg.readQStringEntry("RealName"); - n->m_szUserName = cfg.readQStringEntry("UserName"); - n->m_szOnConnectCommand = cfg.readQStringEntry("OnConnectCommand"); - n->m_szOnLoginCommand = cfg.readQStringEntry("OnLoginCommand"); - n->m_pNickServRuleSet = KviNickServRuleSet::load(&cfg,QString::null); + n->m_szEncoding = cfg.readTQStringEntry("Encoding"); + n->m_szDescription = cfg.readTQStringEntry("Description"); + n->m_szNickName = cfg.readTQStringEntry("NickName"); + n->m_szRealName = cfg.readTQStringEntry("RealName"); + n->m_szUserName = cfg.readTQStringEntry("UserName"); + n->m_szOnConnectCommand = cfg.readTQStringEntry("OnConnectCommand"); + n->m_szOnLoginCommand = cfg.readTQStringEntry("OnLoginCommand"); + n->m_pNickServRuleSet = KviNickServRuleSet::load(&cfg,TQString()); n->m_bAutoConnect = cfg.readBoolEntry("AutoConnect",false); - n->m_szUserIdentityId = cfg.readQStringEntry("UserIdentityId"); + n->m_szUserIdentityId = cfg.readTQStringEntry("UserIdentityId"); if(n->m_bAutoConnect) { if(!m_pAutoConnectOnStartupNetworks) @@ -555,8 +555,8 @@ void KviIrcServerDataBase::load(const QString & filename) } m_pAutoConnectOnStartupNetworks->append(r); } - QStringList l = cfg.readStringListEntry("AutoJoinChannels",QStringList()); - if(l.count() > 0)n->setAutoJoinChannelList(new QStringList(l)); + TQStringList l = cfg.readStringListEntry("AutoJoinChannels",TQStringList()); + if(l.count() > 0)n->setAutoJoinChannelList(new TQStringList(l)); if(cfg.readBoolEntry("Current",false))m_szCurrentNetwork = it.currentKey(); @@ -564,11 +564,11 @@ void KviIrcServerDataBase::load(const QString & filename) for(int i=0;i < nServers;i++) { KviIrcServer *s = new KviIrcServer(); - KviQString::sprintf(tmp,"%d_",i); + KviTQString::sprintf(tmp,"%d_",i); if(s->load(&cfg,tmp)) { r->m_pServerList->append(s); - KviQString::sprintf(tmp,"%d_Current",i); + KviTQString::sprintf(tmp,"%d_Current",i); if(cfg.readBoolEntry(tmp,false))r->m_pCurrentServer = s; if(s->autoConnect()) { @@ -587,15 +587,15 @@ void KviIrcServerDataBase::load(const QString & filename) } } -void KviIrcServerDataBase::save(const QString &filename) +void KviIrcServerDataBase::save(const TQString &filename) { KviConfig cfg(filename,KviConfig::Write); cfg.clear(); // clear any old entry - KviPointerHashTableIterator<QString,KviIrcServerDataBaseRecord> it(*m_pRecords); + KviPointerHashTableIterator<TQString,KviIrcServerDataBaseRecord> it(*m_pRecords); - QString tmp; + TQString tmp; while(KviIrcServerDataBaseRecord * r = it.current()) { @@ -618,7 +618,7 @@ void KviIrcServerDataBase::save(const QString &filename) cfg.writeEntry("OnConnectCommand",n->m_szOnConnectCommand); if(!n->m_szOnLoginCommand.isEmpty()) cfg.writeEntry("OnLoginCommand",n->m_szOnLoginCommand); - if(n->m_pNickServRuleSet)n->m_pNickServRuleSet->save(&cfg,QString::null); + if(n->m_pNickServRuleSet)n->m_pNickServRuleSet->save(&cfg,TQString()); if(n->autoJoinChannelList()) cfg.writeEntry("AutoJoinChannels",*(n->autoJoinChannelList())); if(n->m_szName == m_szCurrentNetwork)cfg.writeEntry("Current",true); @@ -627,12 +627,12 @@ void KviIrcServerDataBase::save(const QString &filename) int i=0; for(KviIrcServer *s = r->m_pServerList->first();s;s = r->m_pServerList->next()) { - KviQString::sprintf(tmp,"%d_",i); + KviTQString::sprintf(tmp,"%d_",i); s->save(&cfg,tmp); if(s == r->m_pCurrentServer) { - KviQString::sprintf(tmp,"%d_Current",i); + KviTQString::sprintf(tmp,"%d_Current",i); cfg.writeEntry(tmp,true); } diff --git a/src/kvilib/irc/kvi_ircserverdb.h b/src/kvilib/irc/kvi_ircserverdb.h index b5d55231..ad3b9529 100644 --- a/src/kvilib/irc/kvi_ircserverdb.h +++ b/src/kvilib/irc/kvi_ircserverdb.h @@ -32,15 +32,15 @@ typedef struct _KviIrcServerDefinition { - QString szServer; + TQString szServer; kvi_u32_t uPort; bool bPortIsValid; bool bIpV6; bool bSSL; - QString szLinkFilter; - QString szPass; - QString szNick; - QString szInitUMode; + TQString szLinkFilter; + TQString szPass; + TQString szNick; + TQString szInitUMode; } KviIrcServerDefinition; @@ -75,8 +75,8 @@ public: KviIrcServerDataBase(); ~KviIrcServerDataBase(); private: - KviPointerHashTable<QString,KviIrcServerDataBaseRecord> * m_pRecords; - QString m_szCurrentNetwork; + KviPointerHashTable<TQString,KviIrcServerDataBaseRecord> * m_pRecords; + TQString m_szCurrentNetwork; // This list is computed when the data are loaded from disk // during the startup and is used by KviApp to // start the connections. @@ -89,23 +89,23 @@ private: KviPointerList<KviIrcServerDataBaseRecord> * m_pAutoConnectOnStartupNetworks; public: void clear(); - KviPointerHashTable<QString,KviIrcServerDataBaseRecord> * recordDict(){ return m_pRecords; }; + KviPointerHashTable<TQString,KviIrcServerDataBaseRecord> * recordDict(){ return m_pRecords; }; KviPointerList<KviIrcServer> * autoConnectOnStartupServers(){ return m_pAutoConnectOnStartupServers; }; KviPointerList<KviIrcServerDataBaseRecord> * autoConnectOnStartupNetworks(){ return m_pAutoConnectOnStartupNetworks; }; void clearAutoConnectOnStartupServers(); void clearAutoConnectOnStartupNetworks(); - void setCurrentNetwork(const QString &szNetName){ m_szCurrentNetwork = szNetName; }; - const QString & currentNetworkName(){ return m_szCurrentNetwork; }; + void setCurrentNetwork(const TQString &szNetName){ m_szCurrentNetwork = szNetName; }; + const TQString & currentNetworkName(){ return m_szCurrentNetwork; }; KviIrcServerDataBaseRecord * currentRecord(); - KviIrcServerDataBaseRecord * findRecord(const QString &szNetName); - KviIrcNetwork * findNetwork(const QString &name); - void loadFromMircIni(const QString & filename, const QString & szMircIni, QStringList& recentServers); - void load(const QString & filename); - void save(const QString & filename); + KviIrcServerDataBaseRecord * findRecord(const TQString &szNetName); + KviIrcNetwork * findNetwork(const TQString &name); + void loadFromMircIni(const TQString & filename, const TQString & szMircIni, TQStringList& recentServers); + void load(const TQString & filename); + void save(const TQString & filename); KviIrcServerDataBaseRecord * insertNetwork(KviIrcNetwork * n); - void updateServerIp(KviIrcServer * pServer,const QString &ip); - bool makeCurrentServer(KviIrcServerDefinition * d,QString &szError); - bool makeCurrentBestServerInNetwork(const QString &szNetName,KviIrcServerDataBaseRecord * d,QString &szError); + void updateServerIp(KviIrcServer * pServer,const TQString &ip); + bool makeCurrentServer(KviIrcServerDefinition * d,TQString &szError); + bool makeCurrentBestServerInNetwork(const TQString &szNetName,KviIrcServerDataBaseRecord * d,TQString &szError); }; diff --git a/src/kvilib/irc/kvi_ircuserdb.cpp b/src/kvilib/irc/kvi_ircuserdb.cpp index 38b52522..bfc1c615 100644 --- a/src/kvilib/irc/kvi_ircuserdb.cpp +++ b/src/kvilib/irc/kvi_ircuserdb.cpp @@ -34,7 +34,7 @@ //static int cacheHit = 0; //static int cacheMiss = 0; -KviIrcUserEntry::KviIrcUserEntry(const QString &user,const QString &host) +KviIrcUserEntry::KviIrcUserEntry(const TQString &user,const TQString &host) { m_szUser = user; m_szHost = host; @@ -48,15 +48,15 @@ KviIrcUserEntry::KviIrcUserEntry(const QString &user,const QString &host) m_bUseCustomColor=false; } -void KviIrcUserEntry::setRealName(const QString &rn) +void KviIrcUserEntry::setRealName(const TQString &rn) { m_szRealName = rn; - m_szRealName = KviQString::trimmed(m_szRealName); + m_szRealName = KviTQString::trimmed(m_szRealName); if(m_szRealName.length()>=3) { - if( (m_szRealName[0].unicode()==KVI_TEXT_COLOR) && (m_szRealName[2].unicode()==KVI_TEXT_RESET) ) + if( (m_szRealName[0].tqunicode()==KVI_TEXT_COLOR) && (m_szRealName[2].tqunicode()==KVI_TEXT_RESET) ) { - switch(m_szRealName[1].unicode()) + switch(m_szRealName[1].tqunicode()) { case '1': // hum.. encoded as hidden color code eh ? publish is somewhere, so others might implement this... setGender(Male); @@ -92,7 +92,7 @@ KviAvatar * KviIrcUserEntry::forgetAvatar() } KviIrcUserDataBase::KviIrcUserDataBase() -: QObject() +: TQObject() { // we expect a maximum of ~4000 users (= ~16 KB array on a 32 bit machine) // ...after that we will loose in performance @@ -102,7 +102,7 @@ KviIrcUserDataBase::KviIrcUserDataBase() // the performance increase since kvirc versions < 3.0.0 // is really big anyway (there was a linear list instead of a hash!!!) - m_pDict = new KviPointerHashTable<QString,KviIrcUserEntry>(4001,false); + m_pDict = new KviPointerHashTable<TQString,KviIrcUserEntry>(4001,false); m_pDict->setAutoDelete(true); setupConnectionWithReguserDb(); } @@ -112,9 +112,9 @@ KviIrcUserDataBase::~KviIrcUserDataBase() delete m_pDict; } -bool KviIrcUserDataBase::haveCustomColor(const QString & nick) +bool KviIrcUserDataBase::haveCustomColor(const TQString & nick) { - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return false; if( u->m_szLastRegisteredMatchNick!=nick) registeredUser(nick); @@ -125,9 +125,9 @@ bool KviIrcUserDataBase::haveCustomColor(const QString & nick) return false; } -QColor* KviIrcUserDataBase::customColor(const QString & nick) +TQColor* KviIrcUserDataBase::customColor(const TQString & nick) { - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return 0; if( u->m_szLastRegisteredMatchNick!=nick) registeredUser(nick); @@ -140,10 +140,10 @@ QColor* KviIrcUserDataBase::customColor(const QString & nick) } -KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick,const QString & user,const QString & host) +KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick,const TQString & user,const TQString & host) { if(nick.isEmpty()) return 0; - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return g_pRegisteredUserDataBase->findMatchingUser(nick,user,host); KviRegisteredUser* pUser=0; @@ -171,7 +171,7 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick,const u->m_szRegisteredUserName=pUser->name(); u->m_bUseCustomColor=pUser->getBoolProperty("useCustomColor"); - QString szTmp=pUser->getProperty("customColor"); + TQString szTmp=pUser->getProperty("customColor"); KviStringConversion::fromString(szTmp,u->m_cachedColor); u->m_bNotFoundRegUserLoockup=false; //to be shure @@ -186,10 +186,10 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick,const return pUser; } -KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick) +KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick) { if(nick.isEmpty()) return 0; - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return 0; return registeredUser(nick,u->user(),u->host()); } @@ -197,13 +197,13 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick) void KviIrcUserDataBase::clear() { delete m_pDict; - m_pDict = new KviPointerHashTable<QString,KviIrcUserEntry>(4001,false); + m_pDict = new KviPointerHashTable<TQString,KviIrcUserEntry>(4001,false); m_pDict->setAutoDelete(true); } -KviIrcUserEntry * KviIrcUserDataBase::insertUser(const QString &nick,const QString &user,const QString &hostname) +KviIrcUserEntry * KviIrcUserDataBase::insertUser(const TQString &nick,const TQString &user,const TQString &hostname) { - KviIrcUserEntry * e = m_pDict->find(nick); + KviIrcUserEntry * e = m_pDict->tqfind(nick); if(e) { e->m_nRefs++; @@ -219,7 +219,7 @@ KviIrcUserEntry * KviIrcUserDataBase::insertUser(const QString &nick,const QStri return e; } -void KviIrcUserDataBase::removeUser(const QString &nick,KviIrcUserEntry * e) +void KviIrcUserDataBase::removeUser(const TQString &nick,KviIrcUserEntry * e) { e->m_nRefs--; if(e->m_nRefs == 0)m_pDict->remove(nick); @@ -227,17 +227,17 @@ void KviIrcUserDataBase::removeUser(const QString &nick,KviIrcUserEntry * e) void KviIrcUserDataBase::setupConnectionWithReguserDb() { - connect(g_pRegisteredUserDataBase,SIGNAL(userRemoved(const QString&)),this,SLOT(registeredUserRemoved(const QString&))); - connect(g_pRegisteredUserDataBase,SIGNAL(userChanged(const QString&)),this,SLOT(registeredUserChanged(const QString&))); - connect(g_pRegisteredUserDataBase,SIGNAL(userAdded(const QString&)),this,SLOT(registeredUserAdded(const QString&))); - connect(g_pRegisteredUserDataBase,SIGNAL(databaseCleared()),this,SLOT(registeredDatabaseCleared())); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(userRemoved(const TQString&)),this,TQT_SLOT(registeredUserRemoved(const TQString&))); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(userChanged(const TQString&)),this,TQT_SLOT(registeredUserChanged(const TQString&))); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(userAdded(const TQString&)),this,TQT_SLOT(registeredUserAdded(const TQString&))); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(databaseCleared()),this,TQT_SLOT(registeredDatabaseCleared())); } -void KviIrcUserDataBase::registeredUserRemoved(const QString& user) +void KviIrcUserDataBase::registeredUserRemoved(const TQString& user) { - KviPointerHashTableIterator<QString,KviIrcUserEntry> it( *m_pDict ); + KviPointerHashTableIterator<TQString,KviIrcUserEntry> it( *m_pDict ); for( ; it.current(); ++it ) { if(it.current()->m_szRegisteredUserName==user) @@ -248,10 +248,10 @@ void KviIrcUserDataBase::registeredUserRemoved(const QString& user) } } -void KviIrcUserDataBase::registeredUserChanged(const QString& user) +void KviIrcUserDataBase::registeredUserChanged(const TQString& user) { //the same as above - KviPointerHashTableIterator<QString,KviIrcUserEntry> it( *m_pDict ); + KviPointerHashTableIterator<TQString,KviIrcUserEntry> it( *m_pDict ); for( ; it.current(); ++it ) { if(it.current()->m_szRegisteredUserName==user) @@ -262,9 +262,9 @@ void KviIrcUserDataBase::registeredUserChanged(const QString& user) } } -void KviIrcUserDataBase::registeredUserAdded(const QString& user) +void KviIrcUserDataBase::registeredUserAdded(const TQString& user) { - KviPointerHashTableIterator<QString,KviIrcUserEntry> it( *m_pDict ); + KviPointerHashTableIterator<TQString,KviIrcUserEntry> it( *m_pDict ); for( ; it.current(); ++it ) { if(it.current()->m_szRegisteredUserName.isEmpty()) @@ -276,7 +276,7 @@ void KviIrcUserDataBase::registeredUserAdded(const QString& user) void KviIrcUserDataBase::registeredDatabaseCleared() { - KviPointerHashTableIterator<QString,KviIrcUserEntry> it( *m_pDict ); + KviPointerHashTableIterator<TQString,KviIrcUserEntry> it( *m_pDict ); for( ; it.current(); ++it ) { it.current()->m_szRegisteredUserName=""; diff --git a/src/kvilib/irc/kvi_ircuserdb.h b/src/kvilib/irc/kvi_ircuserdb.h index bdf7c51c..ec967331 100644 --- a/src/kvilib/irc/kvi_ircuserdb.h +++ b/src/kvilib/irc/kvi_ircuserdb.h @@ -39,7 +39,7 @@ class KVILIB_API KviIrcUserEntry { friend class KviIrcUserDataBase; public: - KviIrcUserEntry(const QString &user,const QString &host); + KviIrcUserEntry(const TQString &user,const TQString &host); ~KviIrcUserEntry(); enum Gender { @@ -49,11 +49,11 @@ public: }; protected: - QString m_szUser; - QString m_szHost; + TQString m_szUser; + TQString m_szHost; - QString m_szServer; - QString m_szRealName; + TQString m_szServer; + TQString m_szRealName; int m_iHops; Gender m_eGender; @@ -65,29 +65,29 @@ protected: bool m_bBot; bool m_bNotFoundRegUserLoockup; - QString m_szRegisteredUserName; - QString m_szLastRegisteredMatchNick; + TQString m_szRegisteredUserName; + TQString m_szLastRegisteredMatchNick; - QColor m_cachedColor; + TQColor m_cachedColor; bool m_bUseCustomColor; public: Gender gender() { return m_eGender; }; void setBot(bool bIsBot) { m_bBot = bIsBot; }; bool isBot() { return m_bBot; }; void setGender(Gender g) { m_eGender=g; }; - void setUser(const QString &user) { m_szUser = user; }; + void setUser(const TQString &user) { m_szUser = user; }; bool hasUser() { return (!m_szUser.isEmpty()); }; - void setHost(const QString &host) { m_szHost = host; }; + void setHost(const TQString &host) { m_szHost = host; }; bool hasHost() { return (!m_szHost.isEmpty()); }; - void setServer(const QString &serv) { m_szServer = serv; }; - void setRealName(const QString &rn); + void setServer(const TQString &serv) { m_szServer = serv; }; + void setRealName(const TQString &rn); void setHops(int hops) { m_iHops = hops; }; - const QString &user() { return m_szUser; }; - const QString &host() { return m_szHost; }; + const TQString &user() { return m_szUser; }; + const TQString &host() { return m_szHost; }; bool hasServer() { return (!m_szServer.isEmpty()); }; - const QString &server() { return m_szServer; }; + const TQString &server() { return m_szServer; }; bool hasRealName() { return (!m_szRealName.isEmpty()); }; - const QString &realName() { return m_szRealName; }; + const TQString &realName() { return m_szRealName; }; bool hasHops() { return m_iHops >= 0; }; int hops() { return m_iHops; }; KviAvatar * avatar() { return m_pAvatar; }; @@ -113,32 +113,33 @@ public: #define KVI_USERFLAG_MODEMASK KVI_USERFLAG_MASK -class KVILIB_API KviIrcUserDataBase : public QObject +class KVILIB_API KviIrcUserDataBase : public TQObject { Q_OBJECT + TQ_OBJECT public: KviIrcUserDataBase(); ~KviIrcUserDataBase(); private: - KviPointerHashTable<QString,KviIrcUserEntry> * m_pDict; + KviPointerHashTable<TQString,KviIrcUserEntry> * m_pDict; public: void clear(); - KviIrcUserEntry * insertUser(const QString &nick,const QString &user,const QString &hostname); - KviIrcUserEntry * find(const QString &nick){ return m_pDict->find(nick); }; - void removeUser(const QString &nick,KviIrcUserEntry * e); - KviPointerHashTable<QString,KviIrcUserEntry> * dict(){ return m_pDict; }; + KviIrcUserEntry * insertUser(const TQString &nick,const TQString &user,const TQString &hostname); + KviIrcUserEntry * tqfind(const TQString &nick){ return m_pDict->tqfind(nick); }; + void removeUser(const TQString &nick,KviIrcUserEntry * e); + KviPointerHashTable<TQString,KviIrcUserEntry> * dict(){ return m_pDict; }; - KviRegisteredUser* registeredUser(const QString & nick); - KviRegisteredUser* registeredUser(const QString & nick,const QString & user,const QString & host); + KviRegisteredUser* registeredUser(const TQString & nick); + KviRegisteredUser* registeredUser(const TQString & nick,const TQString & user,const TQString & host); - bool haveCustomColor(const QString & nick); - QColor* customColor(const QString & nick); + bool haveCustomColor(const TQString & nick); + TQColor* customColor(const TQString & nick); void setupConnectionWithReguserDb(); protected slots: - void registeredUserRemoved(const QString&); - void registeredUserChanged(const QString&); - void registeredUserAdded (const QString&); + void registeredUserRemoved(const TQString&); + void registeredUserChanged(const TQString&); + void registeredUserAdded (const TQString&); void registeredDatabaseCleared(); }; diff --git a/src/kvilib/irc/kvi_mirccntrl.cpp b/src/kvilib/irc/kvi_mirccntrl.cpp index fbf3c2d3..21b5258a 100644 --- a/src/kvilib/irc/kvi_mirccntrl.cpp +++ b/src/kvilib/irc/kvi_mirccntrl.cpp @@ -155,7 +155,7 @@ KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsign } } -KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2) +KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2) { // // Scans the szData for a mIrc color code XX,XX @@ -169,7 +169,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int return charIdx; } - unsigned short c = szData[(int)charIdx].unicode(); + unsigned short c = szData[(int)charIdx].tqunicode(); //First we can have a digit or a coma if(((c < '0') || (c > '9'))) @@ -189,7 +189,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int return charIdx; } - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); if(((c < '0') || (c > '9')) && (c != ',')) { @@ -207,7 +207,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int (*byte_2)=KVI_NOCHANGE; return charIdx; } - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); } if(c == ',') @@ -218,7 +218,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int (*byte_2)=KVI_NOCHANGE; return charIdx; } - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); } else { (*byte_2)=KVI_NOCHANGE; return charIdx; @@ -227,7 +227,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int if((c < '0') || (c > '9')) { (*byte_2)=KVI_NOCHANGE; - if(szData[(int)(charIdx-1)].unicode()==',') + if(szData[(int)(charIdx-1)].tqunicode()==',') return charIdx-1; else return charIdx; @@ -237,7 +237,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int (*byte_2)=c-'0'; charIdx++; if(charIdx >= szData.length())return charIdx; - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); if((c >= '0') && (c <='9')) { @@ -251,9 +251,9 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int namespace KviMircCntrl { - QString stripControlBytes(const QString &szData) + TQString stripControlBytes(const TQString &szData) { - QString ret; + TQString ret; int i = 0; int l = szData.length(); @@ -262,7 +262,7 @@ namespace KviMircCntrl unsigned char b2; while(i < l) { - switch(szData[i].unicode()) + switch(szData[i].tqunicode()) { case KVI_TEXT_UNDERLINE: case KVI_TEXT_BOLD: @@ -288,7 +288,7 @@ namespace KviMircCntrl i++; while(i < l) { - if(szData[i].unicode() == ' ')break; + if(szData[i].tqunicode() == ' ')break; else i++; } begin = i; diff --git a/src/kvilib/irc/kvi_mirccntrl.h b/src/kvilib/irc/kvi_mirccntrl.h index c3028568..b02165d0 100644 --- a/src/kvilib/irc/kvi_mirccntrl.h +++ b/src/kvilib/irc/kvi_mirccntrl.h @@ -91,9 +91,9 @@ // 006 ACK Acknowledge (Not so good, but can be used as last resource) // 007 BEL Bell ( Recognized as bell by terminals and IRCII ) (Used also by some IRC servers) // 008 BS Backspace (Should not be assigned: terminal control) -// 009 HT Horizontal tabulation (Should not be assigned: terminal control) +// 009 HT Qt::Horizontal tabulation (Should not be assigned: terminal control) // 010 LF Line feed (Should not be assigned: terminal control) -// 011 VT Vertical tabulation (Should not be assigned: terminal control) +// 011 VT Qt::Vertical tabulation (Should not be assigned: terminal control) // 012 FF Form feed (Should not be assigned: terminal control) // 013 CR Carriage return (Should not be assigned: terminal control) // 014 SO Shift out (Should not be assigned: terminal control) @@ -148,15 +148,15 @@ #ifndef _KVI_MIRCCNTRL_CPP_ extern KVILIB_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1,unsigned char *byte_2); extern KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsigned char *byte_1,unsigned char *byte_2); - extern KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2); - inline const QChar * getUnicodeColorBytes(const QChar *pData,unsigned char *byte_1,unsigned char *byte_2) - { return (QChar *)getColorBytesW((const kvi_wchar_t *)pData,byte_1,byte_2); }; + extern KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2); + inline const TQChar * getUnicodeColorBytes(const TQChar *pData,unsigned char *byte_1,unsigned char *byte_2) + { return (TQChar *)getColorBytesW((const kvi_wchar_t *)pData,byte_1,byte_2); }; #endif namespace KviMircCntrl { - KVILIB_API QString stripControlBytes(const QString &szData); + KVILIB_API TQString stripControlBytes(const TQString &szData); } diff --git a/src/kvilib/irc/kvi_nickserv.cpp b/src/kvilib/irc/kvi_nickserv.cpp index a1809f84..24a50e96 100644 --- a/src/kvilib/irc/kvi_nickserv.cpp +++ b/src/kvilib/irc/kvi_nickserv.cpp @@ -29,7 +29,7 @@ #include "kvi_config.h" #include "kvi_ircmask.h" -#include <qregexp.h> +#include <tqregexp.h> @@ -85,31 +85,31 @@ KviNickServRuleSet::~KviNickServRuleSet() if(m_pRules)delete m_pRules; } -void KviNickServRuleSet::save(KviConfig * cfg,const QString &prefix) +void KviNickServRuleSet::save(KviConfig * cfg,const TQString &prefix) { if(!m_pRules)return; // nothing to save if(m_pRules->isEmpty())return; // should never happen anyway - QString tmp; + TQString tmp; if(m_bEnabled) { - KviQString::sprintf(tmp,"%QNSEnabled",&prefix); + KviTQString::sprintf(tmp,"%TQNSEnabled",&prefix); cfg->writeEntry(tmp,m_bEnabled); } - KviQString::sprintf(tmp,"%QNSRules",&prefix); + KviTQString::sprintf(tmp,"%TQNSRules",&prefix); cfg->writeEntry(tmp,m_pRules->count()); int idx = 0; for(KviNickServRule * r = m_pRules->first();r;r = m_pRules->next()) { - KviQString::sprintf(tmp,"%QNSRule%d_",&prefix,idx); + KviTQString::sprintf(tmp,"%TQNSRule%d_",&prefix,idx); r->save(cfg,tmp); idx++; } } -KviNickServRuleSet * KviNickServRuleSet::load(KviConfig * cfg,const QString &prefix) +KviNickServRuleSet * KviNickServRuleSet::load(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QNSRules",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQNSRules",&prefix); unsigned int cnt = cfg->readUIntEntry(tmp,0); if(cnt == 0)return 0; KviNickServRuleSet * s = new KviNickServRuleSet(); @@ -118,26 +118,26 @@ KviNickServRuleSet * KviNickServRuleSet::load(KviConfig * cfg,const QString &pre return 0; } -void KviNickServRuleSet::load(const QString &szConfigFile) +void KviNickServRuleSet::load(const TQString &szConfigFile) { clear(); KviConfig cfg(szConfigFile,KviConfig::Read); - QString tmp; - KviQString::sprintf(tmp,"NSRules"); + TQString tmp; + KviTQString::sprintf(tmp,"NSRules"); unsigned int cnt = cfg.readUIntEntry(tmp,0); if(cnt == 0)return; - loadPrivate(&cfg,QString(""),cnt); + loadPrivate(&cfg,TQString(""),cnt); } -void KviNickServRuleSet::save(const QString &szConfigFile) +void KviNickServRuleSet::save(const TQString &szConfigFile) { KviConfig cfg(szConfigFile,KviConfig::Write); cfg.clear(); - save(&cfg,QString("")); + save(&cfg,TQString("")); } -bool KviNickServRuleSet::loadPrivate(KviConfig * cfg,const QString &prefix,unsigned int nEntries) +bool KviNickServRuleSet::loadPrivate(KviConfig * cfg,const TQString &prefix,unsigned int nEntries) { if(m_pRules)m_pRules->clear(); else { @@ -147,12 +147,12 @@ bool KviNickServRuleSet::loadPrivate(KviConfig * cfg,const QString &prefix,unsig if(nEntries != 0) { - QString tmp; - KviQString::sprintf(tmp,"%QNSEnabled",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQNSEnabled",&prefix); m_bEnabled = cfg->readBoolEntry(tmp,false); for(unsigned int u=0;u<nEntries;u++) { - KviQString::sprintf(tmp,"%QNSRule%u_",&prefix,u); + KviTQString::sprintf(tmp,"%TQNSRule%u_",&prefix,u); KviNickServRule * r = new KviNickServRule(); if(!r->load(cfg,tmp))delete r; else m_pRules->append(r); @@ -195,26 +195,26 @@ KviNickServRuleSet * KviNickServRuleSet::createInstance() } -KviNickServRule * KviNickServRuleSet::matchRule(const QString &szNick,const KviIrcMask *nickServ,const QString &szMsg,const QString &szServer) +KviNickServRule * KviNickServRuleSet::matchRule(const TQString &szNick,const KviIrcMask *nickServ,const TQString &szMsg,const TQString &szServer) { if(!m_pRules)return 0; for(KviNickServRule *r = m_pRules->first();r;r = m_pRules->next()) { - if(!KviQString::matchStringCI(r->registeredNick(),szNick,false,true)) continue; + if(!KviTQString::matchStringCI(r->registeredNick(),szNick,false,true)) continue; if(!szServer.isEmpty()) { #ifdef COMPILE_USE_QT4 - QRegExp res(r->serverMask(),Qt::CaseInsensitive,QRegExp::Wildcard); + TQRegExp res(r->serverMask(),TQt::CaseInsensitive,TQRegExp::Wildcard); #else - QRegExp res(r->serverMask(),false,true); + TQRegExp res(r->serverMask(),false,true); #endif if(!res.exactMatch(szServer))continue; } if(!nickServ->matchedBy(KviIrcMask(r->nickServMask())))continue; #ifdef COMPILE_USE_QT4 - QRegExp re(r->messageRegexp(),Qt::CaseInsensitive,QRegExp::Wildcard); + TQRegExp re(r->messageRegexp(),TQt::CaseInsensitive,TQRegExp::Wildcard); #else - QRegExp re(r->messageRegexp(),false,true); + TQRegExp re(r->messageRegexp(),false,true); #endif if(re.exactMatch(szMsg))return r; } @@ -264,45 +264,45 @@ void KviNickServRule::copyFrom(const KviNickServRule &src) m_szServerMask = src.m_szServerMask; } -void KviNickServRule::save(KviConfig * cfg,const QString &prefix) +void KviNickServRule::save(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QRegisteredNick",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQRegisteredNick",&prefix); cfg->writeEntry(tmp,m_szRegisteredNick); - KviQString::sprintf(tmp,"%QNickServMask",&prefix); + KviTQString::sprintf(tmp,"%TQNickServMask",&prefix); cfg->writeEntry(tmp,m_szNickServMask); - KviQString::sprintf(tmp,"%QMessageRegexp",&prefix); + KviTQString::sprintf(tmp,"%TQMessageRegexp",&prefix); cfg->writeEntry(tmp,m_szMessageRegexp); - KviQString::sprintf(tmp,"%QIdentifyCommand",&prefix); + KviTQString::sprintf(tmp,"%TQIdentifyCommand",&prefix); cfg->writeEntry(tmp,m_szIdentifyCommand); - KviQString::sprintf(tmp,"%QServerMask",&prefix); + KviTQString::sprintf(tmp,"%TQServerMask",&prefix); cfg->writeEntry(tmp,m_szServerMask); } -bool KviNickServRule::load(KviConfig * cfg,const QString &prefix) +bool KviNickServRule::load(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QRegisteredNick",&prefix); - m_szRegisteredNick = KviQString::trimmed(cfg->readQStringEntry(tmp)); + TQString tmp; + KviTQString::sprintf(tmp,"%TQRegisteredNick",&prefix); + m_szRegisteredNick = KviTQString::trimmed(cfg->readTQStringEntry(tmp)); if(m_szRegisteredNick.isEmpty())return false; - KviQString::sprintf(tmp,"%QNickServMask",&prefix); - m_szNickServMask = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQNickServMask",&prefix); + m_szNickServMask = cfg->readTQStringEntry(tmp); if(m_szNickServMask.isEmpty())return false; - KviQString::sprintf(tmp,"%QServerMask",&prefix); - m_szServerMask = cfg->readQStringEntry(tmp,QString::null); - KviQString::sprintf(tmp,"%QMessageRegexp",&prefix); - m_szMessageRegexp = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQServerMask",&prefix); + m_szServerMask = cfg->readTQStringEntry(tmp,TQString()); + KviTQString::sprintf(tmp,"%TQMessageRegexp",&prefix); + m_szMessageRegexp = cfg->readTQStringEntry(tmp); if(m_szMessageRegexp.isEmpty())return false; - KviQString::sprintf(tmp,"%QIdentifyCommand",&prefix); - m_szIdentifyCommand = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQIdentifyCommand",&prefix); + m_szIdentifyCommand = cfg->readTQStringEntry(tmp); return !m_szIdentifyCommand.isEmpty(); } -KviNickServRule * KviNickServRule::createInstance(const QString &szRegisteredNick, - const QString &szNickServMask, - const QString &szMessageRegexp, - const QString &szIdentifyCommand, - const QString &szServerMask) +KviNickServRule * KviNickServRule::createInstance(const TQString &szRegisteredNick, + const TQString &szNickServMask, + const TQString &szMessageRegexp, + const TQString &szIdentifyCommand, + const TQString &szServerMask) { return new KviNickServRule(szRegisteredNick,szNickServMask,szMessageRegexp,szIdentifyCommand,szServerMask); } diff --git a/src/kvilib/irc/kvi_nickserv.h b/src/kvilib/irc/kvi_nickserv.h index 105eed1c..f259f1f5 100644 --- a/src/kvilib/irc/kvi_nickserv.h +++ b/src/kvilib/irc/kvi_nickserv.h @@ -35,19 +35,19 @@ class KviIrcMask; class KVILIB_API KviNickServRule : public KviHeapObject { protected: - QString m_szRegisteredNick; // my registered nickname - QString m_szNickServMask; // the NickServ service mask - QString m_szMessageRegexp; // the NickServ message regexp - QString m_szIdentifyCommand; // the IDENTIFY command to send to server - QString m_szServerMask; // the mask that the server must match (not used in per-network rules) + TQString m_szRegisteredNick; // my registered nickname + TQString m_szNickServMask; // the NickServ service tqmask + TQString m_szMessageRegexp; // the NickServ message regexp + TQString m_szIdentifyCommand; // the IDENTIFY command to send to server + TQString m_szServerMask; // the tqmask that the server must match (not used in per-network rules) public: KviNickServRule() : KviHeapObject() {}; KviNickServRule( - const QString &szRegisteredNick, - const QString &szNickServMask, - const QString &szMessageRegexp, - const QString &szIdentifyCommand, - const QString &szServerMask = QString::null) + const TQString &szRegisteredNick, + const TQString &szNickServMask, + const TQString &szMessageRegexp, + const TQString &szIdentifyCommand, + const TQString &szServerMask = TQString()) : KviHeapObject(), m_szRegisteredNick(szRegisteredNick), m_szNickServMask(szNickServMask), @@ -56,27 +56,27 @@ public: m_szServerMask(szServerMask) {}; public: - const QString & registeredNick() const { return m_szRegisteredNick; }; - const QString & nickServMask() const { return m_szNickServMask; }; - const QString & messageRegexp() const { return m_szMessageRegexp; }; - const QString & identifyCommand() const { return m_szIdentifyCommand; }; - const QString & serverMask() const { return m_szServerMask; }; - void setRegisteredNick(const QString &szRegisteredNick){ m_szRegisteredNick = szRegisteredNick; }; - void setNickServMask(const QString &szNickServMask){ m_szNickServMask = szNickServMask; }; - void setMessageRegexp(const QString &szMessageRegexp){ m_szMessageRegexp = szMessageRegexp; }; - void setIdentifyCommand(const QString &szIdentifyCommand){ m_szIdentifyCommand = szIdentifyCommand; }; - void setServerMask(const QString &szServerMask){ m_szServerMask = szServerMask; }; + const TQString & registeredNick() const { return m_szRegisteredNick; }; + const TQString & nickServMask() const { return m_szNickServMask; }; + const TQString & messageRegexp() const { return m_szMessageRegexp; }; + const TQString & identifyCommand() const { return m_szIdentifyCommand; }; + const TQString & serverMask() const { return m_szServerMask; }; + void setRegisteredNick(const TQString &szRegisteredNick){ m_szRegisteredNick = szRegisteredNick; }; + void setNickServMask(const TQString &szNickServMask){ m_szNickServMask = szNickServMask; }; + void setMessageRegexp(const TQString &szMessageRegexp){ m_szMessageRegexp = szMessageRegexp; }; + void setIdentifyCommand(const TQString &szIdentifyCommand){ m_szIdentifyCommand = szIdentifyCommand; }; + void setServerMask(const TQString &szServerMask){ m_szServerMask = szServerMask; }; public: // avoid crashes under windows - static KviNickServRule * createInstance(const QString &szRegisteredNick, - const QString &szNickServMask, - const QString &szMessageRegexp, - const QString &szIdentifyCommand, - const QString &szServerMask = QString::null); + static KviNickServRule * createInstance(const TQString &szRegisteredNick, + const TQString &szNickServMask, + const TQString &szMessageRegexp, + const TQString &szIdentifyCommand, + const TQString &szServerMask = TQString()); - void save(KviConfig * cfg,const QString &prefix); + void save(KviConfig * cfg,const TQString &prefix); // returns false if the loaded data has no sense - bool load(KviConfig * cfg,const QString &prefix); + bool load(KviConfig * cfg,const TQString &prefix); void copyFrom(const KviNickServRule &src); }; @@ -87,7 +87,7 @@ public: KviNickServRuleSet(const KviNickServRuleSet &s); ~KviNickServRuleSet(); protected: - KviPointerList<KviNickServRule> * m_pRules; // FIXME: Replace with KviPointerHashTable<QString,KviPointerList> + KviPointerList<KviNickServRule> * m_pRules; // FIXME: Replace with KviPointerHashTable<TQString,KviPointerList> bool m_bEnabled; public: // avoid crashes under windows @@ -97,15 +97,15 @@ public: void setEnabled(bool bEnabled){ m_bEnabled = bEnabled; }; bool isEmpty(){ return m_pRules ? m_pRules->isEmpty() : true; }; void addRule(KviNickServRule * r); - KviNickServRule * matchRule(const QString &szNick,const KviIrcMask *nickServ,const QString &szMsg,const QString &szServer = QString::null); + KviNickServRule * matchRule(const TQString &szNick,const KviIrcMask *nickServ,const TQString &szMsg,const TQString &szServer = TQString()); void copyFrom(const KviNickServRuleSet &src); - void load(const QString &szConfigFile); - void save(const QString &szConfigFile); - void save(KviConfig * cfg,const QString &prefix); + void load(const TQString &szConfigFile); + void save(const TQString &szConfigFile); + void save(KviConfig * cfg,const TQString &prefix); KviPointerList<KviNickServRule> * rules(){ return m_pRules; }; - static KviNickServRuleSet * load(KviConfig * cfg,const QString &prefix); + static KviNickServRuleSet * load(KviConfig * cfg,const TQString &prefix); protected: - bool loadPrivate(KviConfig * cfg,const QString &prefix,unsigned int nEntries); + bool loadPrivate(KviConfig * cfg,const TQString &prefix,unsigned int nEntries); }; diff --git a/src/kvilib/irc/kvi_useridentity.cpp b/src/kvilib/irc/kvi_useridentity.cpp index d4791333..67887e9c 100644 --- a/src/kvilib/irc/kvi_useridentity.cpp +++ b/src/kvilib/irc/kvi_useridentity.cpp @@ -33,25 +33,25 @@ bool KviUserIdentity::load(KviConfig &cfg) { m_szId = cfg.group(); - m_szNickName = cfg.readQStringEntry("NickName"); - m_szAltNickName1 = cfg.readQStringEntry("AltNickName1"); - m_szAltNickName2 = cfg.readQStringEntry("AltNickName2"); - m_szAltNickName3 = cfg.readQStringEntry("AltNickName3"); - m_szUserName = cfg.readQStringEntry("UserName"); + m_szNickName = cfg.readTQStringEntry("NickName"); + m_szAltNickName1 = cfg.readTQStringEntry("AltNickName1"); + m_szAltNickName2 = cfg.readTQStringEntry("AltNickName2"); + m_szAltNickName3 = cfg.readTQStringEntry("AltNickName3"); + m_szUserName = cfg.readTQStringEntry("UserName"); // FIXME: At least scramble the pass ? - m_szPassword = cfg.readQStringEntry("Password"); + m_szPassword = cfg.readTQStringEntry("Password"); KviPixmap def; m_pixAvatar = cfg.readPixmapEntry("Avatar",def); - m_szPartMessage = cfg.readQStringEntry("PartMessage"); - m_szQuitMessage= cfg.readQStringEntry("QuitMessage"); - m_szAge = cfg.readQStringEntry("Age"); - m_szGender = cfg.readQStringEntry("Gender"); - m_szLocation = cfg.readQStringEntry("Location"); - m_szLanguages = cfg.readQStringEntry("Languages"); - m_szOtherInfo = cfg.readQStringEntry("OtherInfo"); - m_szUserMode = cfg.readQStringEntry("UserMode"); - m_szOnConnectCommand = cfg.readQStringEntry("OnConnectCommand"); - m_szOnLoginCommand = cfg.readQStringEntry("OnLoginCommand"); + m_szPartMessage = cfg.readTQStringEntry("PartMessage"); + m_szQuitMessage= cfg.readTQStringEntry("QuitMessage"); + m_szAge = cfg.readTQStringEntry("Age"); + m_szGender = cfg.readTQStringEntry("Gender"); + m_szLocation = cfg.readTQStringEntry("Location"); + m_szLanguages = cfg.readTQStringEntry("Languages"); + m_szOtherInfo = cfg.readTQStringEntry("OtherInfo"); + m_szUserMode = cfg.readTQStringEntry("UserMode"); + m_szOnConnectCommand = cfg.readTQStringEntry("OnConnectCommand"); + m_szOnLoginCommand = cfg.readTQStringEntry("OnLoginCommand"); return !(m_szId.isEmpty() || m_szNickName.isEmpty()); } @@ -121,7 +121,7 @@ KviUserIdentityManager * KviUserIdentityManager::m_pInstance = 0; KviUserIdentityManager::KviUserIdentityManager() : KviHeapObject() { - m_pIdentityDict = new KviPointerHashTable<QString,KviUserIdentity>(); + m_pIdentityDict = new KviPointerHashTable<TQString,KviUserIdentity>(); m_pIdentityDict->setAutoDelete(true); } @@ -148,13 +148,13 @@ const KviUserIdentity * KviUserIdentityManager::defaultIdentity() KviUserIdentity * ret; if(!m_szDefaultIdentity.isEmpty()) { - ret = m_pIdentityDict->find(m_szDefaultIdentity); + ret = m_pIdentityDict->tqfind(m_szDefaultIdentity); if(ret)return ret; } // the default identity is borken :/ // grab the first one - KviPointerHashTableIterator<QString,KviUserIdentity> it(*m_pIdentityDict); + KviPointerHashTableIterator<TQString,KviUserIdentity> it(*m_pIdentityDict); ret = it.current(); if(ret) { @@ -172,14 +172,14 @@ const KviUserIdentity * KviUserIdentityManager::defaultIdentity() ret->setUserName(KVI_DEFAULT_USERNAME); ret->setRealName(KVI_DEFAULT_REALNAME); ret->setPartMessage(KVI_DEFAULT_PART_MESSAGE); - ret->setQuitMessage(KVI_DEFAULT_QUIT_MESSAGE); + ret->setQuitMessage(KVI_DEFAULT_TQUIT_MESSAGE); - m_pIdentityDict->replace(ret->id(),ret); + m_pIdentityDict->tqreplace(ret->id(),ret); return ret; } -void KviUserIdentityManager::load(const QString &szFileName) +void KviUserIdentityManager::load(const TQString &szFileName) { m_pIdentityDict->clear(); @@ -187,18 +187,18 @@ void KviUserIdentityManager::load(const QString &szFileName) cfg.setGroup("KVIrc"); - m_szDefaultIdentity = cfg.readQStringEntry("DefaultIdentity",""); + m_szDefaultIdentity = cfg.readTQStringEntry("DefaultIdentity",""); KviConfigIterator it(*(cfg.dict())); while(KviConfigGroup * grp = it.current()) { - if(!KviQString::equalCI(it.currentKey(),"KVIrc")) + if(!KviTQString::equalCI(it.currentKey(),"KVIrc")) { cfg.setGroup(it.currentKey()); KviUserIdentity * id = new KviUserIdentity(); if(id->load(cfg)) - m_pIdentityDict->replace(id->id(),id); + m_pIdentityDict->tqreplace(id->id(),id); else delete id; } @@ -206,7 +206,7 @@ void KviUserIdentityManager::load(const QString &szFileName) } } -void KviUserIdentityManager::save(const QString &szFileName) +void KviUserIdentityManager::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); cfg.clear(); @@ -215,7 +215,7 @@ void KviUserIdentityManager::save(const QString &szFileName) cfg.writeEntry("DefaultIdentity",m_szDefaultIdentity); - KviPointerHashTableIterator<QString,KviUserIdentity> it(*m_pIdentityDict); + KviPointerHashTableIterator<TQString,KviUserIdentity> it(*m_pIdentityDict); while(KviUserIdentity * id = it.current()) { id->save(cfg); @@ -227,12 +227,12 @@ void KviUserIdentityManager::copyFrom(KviUserIdentityManager * pWorkingCopy) { m_pIdentityDict->clear(); m_szDefaultIdentity = pWorkingCopy->m_szDefaultIdentity; - KviPointerHashTableIterator<QString,KviUserIdentity> it(*(pWorkingCopy->m_pIdentityDict)); + KviPointerHashTableIterator<TQString,KviUserIdentity> it(*(pWorkingCopy->m_pIdentityDict)); while(KviUserIdentity * id = it.current()) { KviUserIdentity * pNew = new KviUserIdentity(); pNew->copyFrom(*id); - m_pIdentityDict->replace(pNew->id(),pNew); + m_pIdentityDict->tqreplace(pNew->id(),pNew); ++it; } } diff --git a/src/kvilib/irc/kvi_useridentity.h b/src/kvilib/irc/kvi_useridentity.h index c1018f1a..bcc5e1b4 100644 --- a/src/kvilib/irc/kvi_useridentity.h +++ b/src/kvilib/irc/kvi_useridentity.h @@ -42,71 +42,71 @@ public: { } protected: - QString m_szId; // the identity set name + TQString m_szId; // the identity set name - QString m_szNickName; + TQString m_szNickName; - QString m_szAltNickName1; - QString m_szAltNickName2; - QString m_szAltNickName3; + TQString m_szAltNickName1; + TQString m_szAltNickName2; + TQString m_szAltNickName3; - QString m_szUserName; - QString m_szRealName; - QString m_szPassword; + TQString m_szUserName; + TQString m_szRealName; + TQString m_szPassword; KviPixmap m_pixAvatar; - QString m_szPartMessage; - QString m_szQuitMessage; + TQString m_szPartMessage; + TQString m_szQuitMessage; - QString m_szAge; - QString m_szGender; - QString m_szLocation; - QString m_szLanguages; - QString m_szOtherInfo; + TQString m_szAge; + TQString m_szGender; + TQString m_szLocation; + TQString m_szLanguages; + TQString m_szOtherInfo; - QString m_szUserMode; + TQString m_szUserMode; - QString m_szOnConnectCommand; - QString m_szOnLoginCommand; + TQString m_szOnConnectCommand; + TQString m_szOnLoginCommand; public: - const QString & id() const { return m_szId; }; - const QString & nickName() const { return m_szNickName; }; - const QString & altNickName1() const { return m_szAltNickName1; }; - const QString & altNickName2() const { return m_szAltNickName2; }; - const QString & altNickName3() const { return m_szAltNickName3; }; - const QString & userName() const { return m_szUserName; }; - const QString & password() const { return m_szPassword; }; + const TQString & id() const { return m_szId; }; + const TQString & nickName() const { return m_szNickName; }; + const TQString & altNickName1() const { return m_szAltNickName1; }; + const TQString & altNickName2() const { return m_szAltNickName2; }; + const TQString & altNickName3() const { return m_szAltNickName3; }; + const TQString & userName() const { return m_szUserName; }; + const TQString & password() const { return m_szPassword; }; const KviPixmap & avatar() const { return m_pixAvatar; }; - const QString & partMessage() const { return m_szPartMessage; }; - const QString & quitMessage() const { return m_szQuitMessage; }; - const QString & age() const { return m_szAge; }; - const QString & gender() const { return m_szGender; }; - const QString & location() const { return m_szLocation; }; - const QString & languages() const { return m_szLanguages; }; - const QString & otherInfo() const { return m_szOtherInfo; }; - const QString & userMode() const { return m_szUserMode; }; - const QString & onConnectCommand() const { return m_szOnConnectCommand; }; - const QString & onLoginCommand() const { return m_szOnLoginCommand; }; - void setId(const QString &szId){ m_szId = szId; }; - void setNickName(const QString &szNickName){ m_szNickName = szNickName; }; - void setAltNickName1(const QString &szNickName){ m_szAltNickName1 = szNickName; }; - void setAltNickName2(const QString &szNickName){ m_szAltNickName2 = szNickName; }; - void setAltNickName3(const QString &szNickName){ m_szAltNickName3 = szNickName; }; - void setUserName(const QString &szUserName){ m_szUserName = szUserName; }; - void setRealName(const QString &szRealName){ m_szRealName = szRealName; }; - void setPassword(const QString &szPassword){ m_szPassword = szPassword; }; + const TQString & partMessage() const { return m_szPartMessage; }; + const TQString & quitMessage() const { return m_szQuitMessage; }; + const TQString & age() const { return m_szAge; }; + const TQString & gender() const { return m_szGender; }; + const TQString & location() const { return m_szLocation; }; + const TQString & languages() const { return m_szLanguages; }; + const TQString & otherInfo() const { return m_szOtherInfo; }; + const TQString & userMode() const { return m_szUserMode; }; + const TQString & onConnectCommand() const { return m_szOnConnectCommand; }; + const TQString & onLoginCommand() const { return m_szOnLoginCommand; }; + void setId(const TQString &szId){ m_szId = szId; }; + void setNickName(const TQString &szNickName){ m_szNickName = szNickName; }; + void setAltNickName1(const TQString &szNickName){ m_szAltNickName1 = szNickName; }; + void setAltNickName2(const TQString &szNickName){ m_szAltNickName2 = szNickName; }; + void setAltNickName3(const TQString &szNickName){ m_szAltNickName3 = szNickName; }; + void setUserName(const TQString &szUserName){ m_szUserName = szUserName; }; + void setRealName(const TQString &szRealName){ m_szRealName = szRealName; }; + void setPassword(const TQString &szPassword){ m_szPassword = szPassword; }; void setAvatar(const KviPixmap &pix){ m_pixAvatar = pix; }; - void setPartMessage(const QString &szMsg){ m_szPartMessage = szMsg; }; - void setQuitMessage(const QString &szMsg){ m_szQuitMessage = szMsg; }; - void setAge(const QString &szAge){ m_szAge = szAge; }; - void setGender(const QString &szGender){ m_szGender = szGender; }; - void setLocation(const QString &szLocation){ m_szLocation = szLocation; }; - void setLanguages(const QString &szLanguages){ m_szLanguages = szLanguages; }; - void setOtherInfo(const QString &szOtherInfo){ m_szOtherInfo = szOtherInfo; }; - void setUserMode(const QString &szUserMode){ m_szUserMode = szUserMode; }; - void setOnConnectCommand(const QString &szOnConnectCommand){ m_szOnConnectCommand = szOnConnectCommand; }; - void setOnLoginCommand(const QString &szOnLoginCommand){ m_szOnLoginCommand = szOnLoginCommand; }; + void setPartMessage(const TQString &szMsg){ m_szPartMessage = szMsg; }; + void setQuitMessage(const TQString &szMsg){ m_szQuitMessage = szMsg; }; + void setAge(const TQString &szAge){ m_szAge = szAge; }; + void setGender(const TQString &szGender){ m_szGender = szGender; }; + void setLocation(const TQString &szLocation){ m_szLocation = szLocation; }; + void setLanguages(const TQString &szLanguages){ m_szLanguages = szLanguages; }; + void setOtherInfo(const TQString &szOtherInfo){ m_szOtherInfo = szOtherInfo; }; + void setUserMode(const TQString &szUserMode){ m_szUserMode = szUserMode; }; + void setOnConnectCommand(const TQString &szOnConnectCommand){ m_szOnConnectCommand = szOnConnectCommand; }; + void setOnLoginCommand(const TQString &szOnLoginCommand){ m_szOnLoginCommand = szOnLoginCommand; }; protected: void copyFrom(const KviUserIdentity &src); bool save(KviConfig &cfg); @@ -120,26 +120,26 @@ protected: ~KviUserIdentityManager(); protected: static KviUserIdentityManager * m_pInstance; - KviPointerHashTable<QString,KviUserIdentity> * m_pIdentityDict; - QString m_szDefaultIdentity; + KviPointerHashTable<TQString,KviUserIdentity> * m_pIdentityDict; + TQString m_szDefaultIdentity; public: static void init(); static void done(); static KviUserIdentityManager * instance(){ return m_pInstance; }; - KviPointerHashTable<QString,KviUserIdentity> * identityDict(){ return m_pIdentityDict; }; - const KviUserIdentity * findIdentity(const QString &szId){ return m_pIdentityDict->find(szId); }; + KviPointerHashTable<TQString,KviUserIdentity> * identityDict(){ return m_pIdentityDict; }; + const KviUserIdentity * findIdentity(const TQString &szId){ return m_pIdentityDict->tqfind(szId); }; // NEVER NULL const KviUserIdentity * defaultIdentity(); - void setDefaultIdentity(const QString &szIdentityId){ m_szDefaultIdentity = szIdentityId; }; + void setDefaultIdentity(const TQString &szIdentityId){ m_szDefaultIdentity = szIdentityId; }; KviUserIdentityManager * createWorkingCopy(); void copyFrom(KviUserIdentityManager * pWorkingCopy); void releaseWorkingCopy(KviUserIdentityManager * pWorkingCopy); - void save(const QString &szFileName); - void load(const QString &szFileName); + void save(const TQString &szFileName); + void load(const TQString &szFileName); }; #endif //!_KVI_USERIDENTITY_H_ diff --git a/src/kvilib/irc/moc_kvi_ircuserdb.cpp b/src/kvilib/irc/moc_kvi_ircuserdb.cpp index 2b4d1482..92833beb 100644 --- a/src/kvilib/irc/moc_kvi_ircuserdb.cpp +++ b/src/kvilib/irc/moc_kvi_ircuserdb.cpp @@ -2,21 +2,21 @@ ** KviIrcUserDataBase meta object code from reading C++ file 'kvi_ircuserdb.h' ** ** Created: Sun Mar 23 20:56:18 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_ircuserdb.h" -#include <qmetaobject.h> -#include <qapplication.h> +#include <tqmetaobject.h> +#include <tqapplication.h> -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include <private/tqucomextra_p.h> +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcUserDataBase::className() const @@ -24,96 +24,96 @@ const char *KviIrcUserDataBase::className() const return "KviIrcUserDataBase"; } -QMetaObject *KviIrcUserDataBase::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcUserDataBase( "KviIrcUserDataBase", &KviIrcUserDataBase::staticMetaObject ); +TQMetaObject *KviIrcUserDataBase::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcUserDataBase( "KviIrcUserDataBase", &KviIrcUserDataBase::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcUserDataBase::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcUserDataBase::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcUserDataBase", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcUserDataBase", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcUserDataBase::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcUserDataBase::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcUserDataBase", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcUserDataBase", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcUserDataBase::staticMetaObject() +TQMetaObject* KviIrcUserDataBase::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_slot_0[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_slot_0[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod slot_0 = {"registeredUserRemoved", 1, param_slot_0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod slot_0 = {"registeredUserRemoved", 1, param_slot_0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"registeredUserChanged", 1, param_slot_1 }; - static const QUParameter param_slot_2[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod slot_1 = {"registeredUserChanged", 1, param_slot_1 }; + static const TQUParameter param_slot_2[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod slot_2 = {"registeredUserAdded", 1, param_slot_2 }; - static const QUMethod slot_3 = {"registeredDatabaseCleared", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "registeredUserRemoved(const QString&)", &slot_0, QMetaData::Protected }, - { "registeredUserChanged(const QString&)", &slot_1, QMetaData::Protected }, - { "registeredUserAdded(const QString&)", &slot_2, QMetaData::Protected }, - { "registeredDatabaseCleared()", &slot_3, QMetaData::Protected } + static const TQUMethod slot_2 = {"registeredUserAdded", 1, param_slot_2 }; + static const TQUMethod slot_3 = {"registeredDatabaseCleared", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "registeredUserRemoved(const TQString&)", &slot_0, TQMetaData::Protected }, + { "registeredUserChanged(const TQString&)", &slot_1, TQMetaData::Protected }, + { "registeredUserAdded(const TQString&)", &slot_2, TQMetaData::Protected }, + { "registeredDatabaseCleared()", &slot_3, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcUserDataBase", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcUserDataBase", tqparentObject, slot_tbl, 4, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcUserDataBase.setMetaObject( metaObj ); return metaObj; } -void* KviIrcUserDataBase::qt_cast( const char* clname ) +void* KviIrcUserDataBase::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcUserDataBase" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviIrcUserDataBase::qt_invoke( int _id, QUObject* _o ) +bool KviIrcUserDataBase::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: registeredUserRemoved((const QString&)static_QUType_QString.get(_o+1)); break; - case 1: registeredUserChanged((const QString&)static_QUType_QString.get(_o+1)); break; - case 2: registeredUserAdded((const QString&)static_QUType_QString.get(_o+1)); break; + case 0: registeredUserRemoved((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 1: registeredUserChanged((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 2: registeredUserAdded((const TQString&)static_TQUType_TQString.get(_o+1)); break; case 3: registeredDatabaseCleared(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcUserDataBase::qt_emit( int _id, QUObject* _o ) +bool KviIrcUserDataBase::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcUserDataBase::qt_property( int id, int f, QVariant* v) +bool KviIrcUserDataBase::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcUserDataBase::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcUserDataBase::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES |