diff options
Diffstat (limited to 'src/kvilib/irc/kvi_ircmask.cpp')
-rw-r--r-- | src/kvilib/irc/kvi_ircmask.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp index acc2de83..4552cc93 100644 --- a/src/kvilib/irc/kvi_ircmask.cpp +++ b/src/kvilib/irc/kvi_ircmask.cpp @@ -232,8 +232,8 @@ KviIrcMask::KviIrcMask(const TQString &szMask) if(b) { const TQChar * p = b; - while(p->unicode() && (p->unicode() != '!'))p++; - if(p->unicode()) + while(p->tqunicode() && (p->tqunicode() != '!'))p++; + if(p->tqunicode()) { if(p != b) { @@ -250,8 +250,8 @@ KviIrcMask::KviIrcMask(const TQString &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 TQString &szMask) } p++; b=p; - while(p->unicode())p++; + while(p->tqunicode())p++; if(p != b) { m_szHost.setUnicode(b,p-b); @@ -291,7 +291,7 @@ bool KviIrcMask::hasNumericHost() const 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! else { @@ -300,9 +300,9 @@ bool KviIrcMask::hasNumericHost() const 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; } @@ -408,13 +408,13 @@ void KviIrcMask::mask(TQString &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); } @@ -614,13 +614,13 @@ bool KviIrcMask::matchesFixed(const TQString &nick,const TQString &user,const TQ int KviIrcMask::getIpDomainMaskLen() const { int len = m_szHost.length(); - const TQChar *p = m_szHost.unicode(); + 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 TQChar *p = m_szHost.unicode(); + 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 @@ -657,7 +657,7 @@ TQString KviIrcMask::getHostDomainMask() const const TQChar *p=KviTQString::nullTerminatedArray(m_szHost); if(!p)return TQString(); const TQChar *b = p; - while(p->unicode() && p->unicode() != '.')p++; + while(p->tqunicode() && p->tqunicode() != '.')p++; TQString ret(p,len - (p - b)); return ret; } @@ -666,18 +666,18 @@ TQString KviIrcMask::getHostDomainMask() const TQString KviIrcMask::getLargeHostDomainMask() const { int len = m_szHost.length(); - const TQChar *p = m_szHost.unicode(); + 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--; } } @@ -692,14 +692,14 @@ TQString KviIrcMask::getLargeHostDomainMask() const bool KviIrcMask::hasMaskedIp() const { int len = m_szHost.length(); - const TQChar *p = m_szHost.unicode(); + const TQChar *p = m_szHost.tqunicode(); const TQChar *b = p; if(len == 0)return false; //run to the end p += len; 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" } @@ -721,7 +721,7 @@ bool KviIrcMask::hasWildNick() 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++; @@ -736,14 +736,14 @@ int KviIrcMask::nonWildChars() if(!aux)return 0; unsigned short uc; - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; } aux = KviTQString::nullTerminatedArray(m_szUser); - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; @@ -751,7 +751,7 @@ int KviIrcMask::nonWildChars() aux = KviTQString::nullTerminatedArray(m_szHost); - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; |