diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:20 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:20 -0600 |
commit | c6611272c2bc4a42580848946c8c5d81bb0409c7 (patch) | |
tree | 0fd5b58844663dfcd00fb2b79cf67dd0fd429c62 /src/kvilib | |
parent | 805c2821ceaddada48b346c6d11bd0dc1351a539 (diff) | |
download | kvirc-c6611272c2bc4a42580848946c8c5d81bb0409c7.tar.gz kvirc-c6611272c2bc4a42580848946c8c5d81bb0409c7.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 805c2821ceaddada48b346c6d11bd0dc1351a539.
Diffstat (limited to 'src/kvilib')
-rw-r--r-- | src/kvilib/config/kvi_wincfg.h | 2 | ||||
-rw-r--r-- | src/kvilib/core/kvi_pointerhashtable.h | 10 | ||||
-rw-r--r-- | src/kvilib/core/kvi_qstring.cpp | 162 | ||||
-rw-r--r-- | src/kvilib/core/kvi_string.cpp | 18 | ||||
-rw-r--r-- | src/kvilib/core/kvi_string.h | 4 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_osinfo.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_stringconversion.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/file/kvi_fileutils.cpp | 8 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircmask.cpp | 58 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircserverdb.cpp | 2 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircuserdb.cpp | 4 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_mirccntrl.cpp | 16 | ||||
-rw-r--r-- | src/kvilib/net/kvi_http.cpp | 66 | ||||
-rw-r--r-- | src/kvilib/net/kvi_http.h | 4 | ||||
-rw-r--r-- | src/kvilib/system/kvi_locale.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_listview.cpp | 54 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_listview_qt3.h | 2 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_listview_qt4.h | 2 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_textedit_qt3.h | 2 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_toolbar.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_wizard.cpp | 8 |
21 files changed, 223 insertions, 223 deletions
diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h index 1759e323..3441e7b2 100644 --- a/src/kvilib/config/kvi_wincfg.h +++ b/src/kvilib/config/kvi_wincfg.h @@ -132,7 +132,7 @@ /* define this if you are on a big endian machine */ /* #undef BIG_ENDIAN_MACHINE_BYTE_ORDER */ -/* define this if you want to use the unicode-local 8bit charset translation */ +/* define this if you want to use the tqunicode-local 8bit charset translation */ /* #undef COMPILE_USE_LOCAL_8BIT */ /* define this if you want to disable the inter-process communication support */ diff --git a/src/kvilib/core/kvi_pointerhashtable.h b/src/kvilib/core/kvi_pointerhashtable.h index 99e513f3..1c2bcab3 100644 --- a/src/kvilib/core/kvi_pointerhashtable.h +++ b/src/kvilib/core/kvi_pointerhashtable.h @@ -236,18 +236,18 @@ inline unsigned int kvi_hash_hash(const TQString &szKey,bool bCaseSensitive) if(!p)return 0; if(bCaseSensitive) { - while(p->unicode()) + while(p->tqunicode()) { - uResult += p->unicode(); + uResult += p->tqunicode(); p++; } } else { - while(p->unicode()) + while(p->tqunicode()) { #ifdef COMPILE_USE_QT4 - uResult += p->toLower().unicode(); + uResult += p->toLower().tqunicode(); #else - uResult += p->lower().unicode(); + uResult += p->lower().tqunicode(); #endif p++; } diff --git a/src/kvilib/core/kvi_qstring.cpp b/src/kvilib/core/kvi_qstring.cpp index 84beaa07..3b564c17 100644 --- a/src/kvilib/core/kvi_qstring.cpp +++ b/src/kvilib/core/kvi_qstring.cpp @@ -54,8 +54,8 @@ namespace KviTQString bool equalCSN(const TQString &sz1,const TQString &sz2,unsigned int len) { if(len == 0)return true; // assume equal - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); unsigned int lmin = MY_MIN(sz1.length(),sz2.length()); if(lmin < len)return false; const TQChar * c1e = c1 + len; @@ -64,7 +64,7 @@ namespace KviTQString while(c1 < c1e) { - if(c1->unicode() != c2->unicode())return false; + if(c1->tqunicode() != c2->tqunicode())return false; c1++; c2++; } @@ -74,8 +74,8 @@ namespace KviTQString bool equalCIN(const TQString &sz1,const TQString &sz2,unsigned int len) { if(len == 0)return true; // assume equal - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); unsigned int lmin = MY_MIN(sz1.length(),sz2.length()); if(lmin < len)return false; const TQChar * c1e = c1 + len; @@ -85,9 +85,9 @@ namespace KviTQString while(c1 < c1e) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != c2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != c2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != c2->lower().unicode())return false; + if(c1->lower().tqunicode() != c2->lower().tqunicode())return false; #endif c1++; c2++; @@ -98,7 +98,7 @@ namespace KviTQString bool equalCSN(const TQString &sz1,const char * sz2,unsigned int len) { if(len == 0)return true; // assume equal - const TQChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); if(sz1.length() < len)return false; const TQChar * c1e = c1 + len; @@ -107,7 +107,7 @@ namespace KviTQString while((c1 < c1e) && (*sz2)) { - if(c1->unicode() != *sz2)return false; + if(c1->tqunicode() != *sz2)return false; c1++; sz2++; } @@ -117,7 +117,7 @@ namespace KviTQString bool equalCIN(const TQString &sz1,const char * sz2,unsigned int len) { if(len == 0)return true; // assume equal - const TQChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); if(sz1.length() < len)return false; const TQChar * c1e = c1 + len; @@ -127,9 +127,9 @@ namespace KviTQString while((c1 < c1e) && (*sz2)) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != tolower(*sz2))return false; + if(c1->toLower().tqunicode() != tolower(*sz2))return false; #else - if(c1->lower().unicode() != tolower(*sz2))return false; + if(c1->lower().tqunicode() != tolower(*sz2))return false; #endif c1++; sz2++; @@ -141,19 +141,19 @@ namespace KviTQString bool equalCIN(const TQString &sz1,const TQChar *sz2,unsigned int len) { if(len == 0)return true; // assume equal - const TQChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); if(sz1.length() < len)return false; const TQChar * c1e = c1 + len; if(!sz2)return !c1; - if(!c1)return !(sz2->unicode()); + if(!c1)return !(sz2->tqunicode()); - while((c1 < c1e) && (sz2->unicode())) + while((c1 < c1e) && (sz2->tqunicode())) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != sz2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != sz2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != sz2->lower().unicode())return false; + if(c1->lower().tqunicode() != sz2->lower().tqunicode())return false; #endif c1++; sz2++; @@ -165,39 +165,39 @@ namespace KviTQString { double size = bytes; if(size<900) - return TQString(__tr2qs("%1 bytes")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 bytes")).tqarg(size,0,'f',3); size/=1024; if(size<900) - return TQString(__tr2qs("%1 KB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 KB")).tqarg(size,0,'f',3); size/=1024; if(size<900) - return TQString(__tr2qs("%1 MB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 MB")).tqarg(size,0,'f',3); //Pirated DVD?;) size/=1024; if(size<900) - return TQString(__tr2qs("%1 GB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 GB")).tqarg(size,0,'f',3); //Uhm.. We are downloading a whole internet:))) size/=1024; - return TQString(__tr2qs("%1 TB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 TB")).tqarg(size,0,'f',3); } bool equalCS(const TQString &sz1,const TQString &sz2) { if(sz1.length() != sz2.length())return false; - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); const TQChar * c1e = c1 + sz1.length(); if(!c1 || !c2)return (c1 == c2); while(c1 < c1e) { - if(c1->unicode() != c2->unicode())return false; + if(c1->tqunicode() != c2->tqunicode())return false; c1++; c2++; } @@ -208,8 +208,8 @@ namespace KviTQString { if(sz1.length() != sz2.length())return false; - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); const TQChar * c1e = c1 + sz1.length(); if(!c1 || !c2)return (c1 == c2); @@ -217,9 +217,9 @@ namespace KviTQString while(c1 < c1e) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != c2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != c2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != c2->lower().unicode())return false; + if(c1->lower().tqunicode() != c2->lower().tqunicode())return false; #endif c1++; c2++; @@ -230,35 +230,35 @@ namespace KviTQString // sz2 is assumed to be null terminated, sz1 is not! bool equalCI(const TQString &sz1,const TQChar *sz2) { - const TQChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); const TQChar * c1e = c1 + sz1.length(); if(!c1 || !sz2)return (c1 == sz2); while(c1 < c1e) { - if(!sz2->unicode())return false; // sz1 has at least another character + if(!sz2->tqunicode())return false; // sz1 has at least another character #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != sz2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != sz2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != sz2->lower().unicode())return false; + if(c1->lower().tqunicode() != sz2->lower().tqunicode())return false; #endif c1++; sz2++; } - return (c1 == c1e) && (!sz2->unicode()); + return (c1 == c1e) && (!sz2->tqunicode()); } bool equalCS(const TQString &sz1,const char * sz2) { - const TQChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); const TQChar * c1e = c1 + sz1.length(); if(!c1)return !sz2; while((c1 < c1e) && (*sz2)) { - if(c1->unicode() != *sz2)return false; + if(c1->tqunicode() != *sz2)return false; c1++; sz2++; } @@ -267,7 +267,7 @@ namespace KviTQString bool equalCI(const TQString &sz1,const char * sz2) { - const TQChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); const TQChar * c1e = c1 + sz1.length(); if(!c1)return !sz2; @@ -275,9 +275,9 @@ namespace KviTQString while((c1 < c1e) && (*sz2)) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != tolower(*sz2))return false; + if(c1->toLower().tqunicode() != tolower(*sz2))return false; #else - if(c1->lower().unicode() != tolower(*sz2))return false; + if(c1->lower().tqunicode() != tolower(*sz2))return false; #endif c1++; sz2++; @@ -287,8 +287,8 @@ namespace KviTQString int cmpCS(const TQString &sz1,const TQString &sz2) { - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); const TQChar * c1e = c1 + sz1.length(); const TQChar * c2e = c2 + sz2.length(); @@ -304,12 +304,12 @@ namespace KviTQString { if(c1 >= c1e) { - if(c2 < c2e)return /* 0 */ - (c2->unicode()); + if(c2 < c2e)return /* 0 */ - (c2->tqunicode()); return 0; } - if(c2 >= c2e)return c1->unicode() /* - 0 */; + if(c2 >= c2e)return c1->tqunicode() /* - 0 */; - int diff = c1->unicode() - c2->unicode(); + int diff = c1->tqunicode() - c2->tqunicode(); if(diff)return diff; c1++; @@ -321,8 +321,8 @@ namespace KviTQString int cmpCI(const TQString &sz1,const TQString &sz2) { - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); const TQChar * c1e = c1 + sz1.length(); const TQChar * c2e = c2 + sz2.length(); @@ -338,22 +338,22 @@ namespace KviTQString if(c1 >= c1e) { #ifdef COMPILE_USE_QT4 - if(c2 < c2e)return /* 0 */ - (c2->toLower().unicode()); + if(c2 < c2e)return /* 0 */ - (c2->toLower().tqunicode()); #else - if(c2 < c2e)return /* 0 */ - (c2->lower().unicode()); + if(c2 < c2e)return /* 0 */ - (c2->lower().tqunicode()); #endif return 0; } #ifdef COMPILE_USE_QT4 - if(c2 >= c2e)return c1->toLower().unicode() /* - 0 */; + if(c2 >= c2e)return c1->toLower().tqunicode() /* - 0 */; #else - if(c2 >= c2e)return c1->lower().unicode() /* - 0 */; + if(c2 >= c2e)return c1->lower().tqunicode() /* - 0 */; #endif #ifdef COMPILE_USE_QT4 - int diff = c1->toLower().unicode() - c2->toLower().unicode(); + int diff = c1->toLower().tqunicode() - c2->toLower().tqunicode(); #else - int diff = c1->lower().unicode() - c2->lower().unicode(); + int diff = c1->lower().tqunicode() - c2->lower().tqunicode(); #endif if(diff)return diff; @@ -370,8 +370,8 @@ namespace KviTQString unsigned int l1 = MY_MIN(len,sz1.length()); unsigned int l = MY_MIN(l1,sz2.length()); // FIXME: THIS IS NOT OK - const TQChar * c1 = sz1.unicode(); - const TQChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); const TQChar * c1e = c1 + l; if(!c1) @@ -384,9 +384,9 @@ namespace KviTQString int diff = 0; #ifdef COMPILE_USE_QT4 - while((c1 < c1e) && !(diff = (c1->toLower().unicode() - c2->toLower().unicode()))) + while((c1 < c1e) && !(diff = (c1->toLower().tqunicode() - c2->toLower().tqunicode()))) #else - while((c1 < c1e) && !(diff = (c1->lower().unicode() - c2->lower().unicode()))) + while((c1 < c1e) && !(diff = (c1->lower().tqunicode() - c2->lower().tqunicode()))) #endif { c1++; @@ -533,7 +533,7 @@ namespace KviTQString } TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize); - //TQChar * p = (TQChar *)s.unicode(); + //TQChar * p = (TQChar *)s.tqunicode(); char *argString; long argValue; @@ -561,12 +561,12 @@ namespace KviTQString } - for(; fmt->unicode() ; ++fmt) + for(; fmt->tqunicode() ; ++fmt) { if(reallen == allocsize)INCREMENT_MEM //copy up to a '%' - if(fmt->unicode() != '%') + if(fmt->tqunicode() != '%') { *p++ = *fmt; reallen++; @@ -574,7 +574,7 @@ namespace KviTQString } ++fmt; //skip this '%' - switch(fmt->unicode()) + switch(fmt->tqunicode()) { case 's': // char * string { @@ -583,7 +583,7 @@ namespace KviTQString TQString str(argString); if(str.isEmpty())continue; int len = str.length(); - const TQChar * ch = str.unicode(); + const TQChar * ch = str.tqunicode(); if(!ch)continue; if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) while(len--)*p++ = *ch++; @@ -606,7 +606,7 @@ namespace KviTQString if(!str)continue; if(str->isEmpty())continue; int len = str->length(); - const TQChar * ch = str->unicode(); + const TQChar * ch = str->tqunicode(); if(!ch)continue; if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) while(len--)*p++ = *ch++; @@ -721,7 +721,7 @@ namespace KviTQString { *p++ = '%'; //write it reallen++; - if(fmt->unicode()) + if(fmt->tqunicode()) { if(reallen == allocsize)INCREMENT_MEM *p++ = *fmt; @@ -789,21 +789,21 @@ namespace KviTQString const TQChar * m2 = (const TQChar *)szM2.ucs2(); #endif - if(!(m1 && m2 && (m1->unicode())))return false; + if(!(m1 && m2 && (m1->tqunicode())))return false; const TQChar * savePos1 = 0; const TQChar * savePos2 = m2; - while(m1->unicode()) + while(m1->tqunicode()) { //loop managed by m1 (initially first mask) - if(m1->unicode()=='*') + if(m1->tqunicode()=='*') { //Found a wildcard in m1 savePos1 = ++m1; //move to the next char and save the position...this is our jolly - if(!savePos1->unicode())return true; //last was a wildcard , matches everything ahead... + if(!savePos1->tqunicode())return true; //last was a wildcard , matches everything ahead... savePos2 = m2+1; //next return state for the second string continue; //and return } - if(!m2->unicode())return false; //m2 finished and we had something to match here! + if(!m2->tqunicode())return false; //m2 finished and we had something to match here! #ifdef COMPILE_USE_QT4 if(m1->toLower()==m2->toLower()) #else @@ -813,7 +813,7 @@ namespace KviTQString //chars matched m1++; //Go ahead in the two strings m2++; // - if((!(m1->unicode())) && m2->unicode() && savePos1) + if((!(m1->tqunicode())) && m2->tqunicode() && savePos1) { //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) @@ -822,7 +822,7 @@ namespace KviTQString savePos2++; //next savePos2 will be next char } } else { - if(m2->unicode() == '*') + if(m2->tqunicode() == '*') { //A wlidcard in the second string //Invert the game : mask1 <-> mask2 @@ -835,11 +835,11 @@ namespace KviTQString continue; //...and again } // m1 != m2 , m1 != * , m2 != * - if((m1->unicode() == '?') || (m2->unicode() == '?')) + if((m1->tqunicode() == '?') || (m2->tqunicode() == '?')) { m1++; m2++; - if((!(m1->unicode())) && m2->unicode() && savePos1) + if((!(m1->tqunicode())) && m2->tqunicode() && savePos1) { //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) @@ -858,7 +858,7 @@ namespace KviTQString } } } - return (!(m2->unicode())); //m1 surely finished , so for the match , m2 must be finished too + return (!(m2->tqunicode())); //m1 surely finished , so for the match , m2 must be finished too } bool matchStringCI(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact) @@ -870,9 +870,9 @@ namespace KviTQString TQChar* ptr=(TQChar*)szExp.ucs2(); #endif if(!ptr) return 0; - while(ptr->unicode()) + while(ptr->tqunicode()) { - if((ptr->unicode()=='[') || (ptr->unicode()==']')) + if((ptr->tqunicode()=='[') || (ptr->tqunicode()==']')) { szWildcard.append("["); szWildcard.append(*ptr); @@ -904,9 +904,9 @@ namespace KviTQString TQChar* ptr=(TQChar*)szExp.ucs2(); #endif if(!ptr) return 0; - while(ptr->unicode()) + while(ptr->tqunicode()) { - if((ptr->unicode()=='[')) // <-- hum ? + if((ptr->tqunicode()=='[')) // <-- hum ? { szWildcard.append("["); szWildcard.append(*ptr); @@ -1043,7 +1043,7 @@ namespace KviTQString } TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length()); TQChar * b = buffer; - unsigned short us = c->unicode(); + unsigned short us = c->tqunicode(); while(us) { if(us < 256) @@ -1052,7 +1052,7 @@ namespace KviTQString *b = *c; c++; b++; - us = c->unicode(); + us = c->tqunicode(); } TQString ret(buffer,szSrc.length()); kvi_free(buffer); @@ -1069,7 +1069,7 @@ namespace KviTQString } TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length()); TQChar * b = buffer; - unsigned short us = c->unicode(); + unsigned short us = c->tqunicode(); while(us) { if(us < 256) @@ -1079,7 +1079,7 @@ namespace KviTQString *b = *c; c++; b++; - us = c->unicode(); + us = c->tqunicode(); } TQString ret(buffer,szSrc.length()); kvi_free(buffer); diff --git a/src/kvilib/core/kvi_string.cpp b/src/kvilib/core/kvi_string.cpp index 54a1c4a6..525ad714 100644 --- a/src/kvilib/core/kvi_string.cpp +++ b/src/kvilib/core/kvi_string.cpp @@ -109,7 +109,7 @@ kvi_wslen_t kvi_wstrlen(const kvi_wchar_t * str) if(pString->length() > 0) \ { \ if(len <= ((int)(pString->length())))return (-1); \ - _WSTRING_WMEMCPY(p,pString->unicode(),pString->length()); \ + _WSTRING_WMEMCPY(p,pString->tqunicode(),pString->length()); \ p += pString->length(); \ len -= pString->length(); \ } \ @@ -192,8 +192,8 @@ int kvi_wvsnprintf(kvi_wchar_t *buffer,kvi_wslen_t len,const kvi_wchar_t *fmt,kv bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2) { - const TQChar * p1 = s1.unicode(); - const TQChar * p2 = s2.unicode(); + const TQChar * p1 = s1.tqunicode(); + const TQChar * p2 = s2.tqunicode(); int l = s1.length() < s2.length() ? s1.length() : s2.length(); #ifdef COMPILE_USE_QT4 while(l-- && (p1->toLower() == p2->toLower()))p1++,p2++; @@ -1141,23 +1141,23 @@ KviStr::KviStr(char c,int fillLen) } -KviStr::KviStr(const kvi_wchar_t * unicode) +KviStr::KviStr(const kvi_wchar_t * tqunicode) { - if(!unicode) + if(!tqunicode) { m_len = 0; m_ptr = (char *)kvi_malloc(1); *m_ptr = 0; } else { - m_len = kvi_wstrlen(unicode); + m_len = kvi_wstrlen(tqunicode); m_ptr = (char *)kvi_malloc(m_len + 1); register char * p = m_ptr; - while(*unicode)*p++ = *unicode++; + while(*tqunicode)*p++ = *tqunicode++; *p = 0; } } -KviStr::KviStr(const kvi_wchar_t * unicode,int len) +KviStr::KviStr(const kvi_wchar_t * tqunicode,int len) { m_len = len; m_ptr = (char *)kvi_malloc(m_len + 1); @@ -1165,7 +1165,7 @@ KviStr::KviStr(const kvi_wchar_t * unicode,int len) char * end = p + len; while(p != end) { - *p++ = *unicode++; + *p++ = *tqunicode++; } *p = 0; } diff --git a/src/kvilib/core/kvi_string.h b/src/kvilib/core/kvi_string.h index 9434e274..4e9a3acb 100644 --- a/src/kvilib/core/kvi_string.h +++ b/src/kvilib/core/kvi_string.h @@ -155,9 +155,9 @@ public: // Creates a string long fillLen characters filled with character c.<br> KviStr(char c,int fillLen = 1); - KviStr(const kvi_wchar_t * unicode); + KviStr(const kvi_wchar_t * tqunicode); - KviStr(const kvi_wchar_t * unicode,int len); + KviStr(const kvi_wchar_t * tqunicode,int len); // just free(m_ptr) ~KviStr(); diff --git a/src/kvilib/ext/kvi_osinfo.cpp b/src/kvilib/ext/kvi_osinfo.cpp index f2f39d29..9d443c0b 100644 --- a/src/kvilib/ext/kvi_osinfo.cpp +++ b/src/kvilib/ext/kvi_osinfo.cpp @@ -350,17 +350,17 @@ static TQString queryWinInfo( QueryInfo info) TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009"), 0, KEY_TQUERY_VALUE, &hKey ); if( lRet == ERROR_SUCCESS ) - szVersion+= TQString("Service Pack 6a (Build %1)").arg( osvi.dwBuildNumber & 0xFFFF ); + szVersion+= TQString("Service Pack 6a (Build %1)").tqarg( osvi.dwBuildNumber & 0xFFFF ); else // Windows NT 4.0 prior to SP6a { - szVersion+= TQString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); + szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF); } RegCloseKey( hKey ); } else // not Windows NT 4.0 { - szVersion+= TQString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); + szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF); } break; diff --git a/src/kvilib/ext/kvi_stringconversion.cpp b/src/kvilib/ext/kvi_stringconversion.cpp index f316fc2a..2836628c 100644 --- a/src/kvilib/ext/kvi_stringconversion.cpp +++ b/src/kvilib/ext/kvi_stringconversion.cpp @@ -234,17 +234,17 @@ namespace KviStringConversion bool fromString(const TQString & szValue,TQFont &buffer) { KviStr str = szValue; - KviStr family,pointSize,styleHint,weight,options; + KviStr family,pointSize,tqstyleHint,weight,options; str.getToken(family,','); str.getToken(pointSize,','); - str.getToken(styleHint,','); + str.getToken(tqstyleHint,','); str.getToken(weight,','); if(!family.isEmpty())buffer.setFamily(family.ptr()); int i; bool bOk; i = pointSize.toInt(&bOk); if(bOk && (i > 0))buffer.setPointSize(i); - i = styleHint.toInt(&bOk); + i = tqstyleHint.toInt(&bOk); if(bOk && (i >= 0))buffer.setStyleHint((TQFont::StyleHint)i); i = weight.toInt(&bOk); if(bOk && (i >= 0))buffer.setWeight(i); diff --git a/src/kvilib/file/kvi_fileutils.cpp b/src/kvilib/file/kvi_fileutils.cpp index 694255ef..1668999d 100644 --- a/src/kvilib/file/kvi_fileutils.cpp +++ b/src/kvilib/file/kvi_fileutils.cpp @@ -34,8 +34,8 @@ #include <tqdir.h> #include <tqfileinfo.h> #include <tqglobal.h> -#include <textcodec.h> -#include <textstream.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> namespace KviFileUtils @@ -60,7 +60,7 @@ namespace KviFileUtils if(tmp_buf[255] == '\r')cur_len--; //Ignore CR... int lastlen = szBuffer.length(); szBuffer.setLength(lastlen + cur_len); - TQChar *p1 = szBuffer.unicode() + lastlen; + TQChar *p1 = szBuffer.tqunicode() + lastlen; char * p2 = tmp_buf; for(int i=0;i<cur_len;i++)*p1++ = *p2++; cur_len = 0; @@ -76,7 +76,7 @@ namespace KviFileUtils if(tmp_buf[cur_len - 1] == '\r')cur_len--; //Ignore CR... int lastlen = szBuffer.length(); szBuffer.setLength(lastlen + cur_len); - TQChar *p1 = szBuffer.unicode() + lastlen; + TQChar *p1 = szBuffer.tqunicode() + lastlen; char * p2 = tmp_buf; for(int i=0;i<cur_len;i++)*p1++ = *p2++; } 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++; diff --git a/src/kvilib/irc/kvi_ircserverdb.cpp b/src/kvilib/irc/kvi_ircserverdb.cpp index cec8ad62..84bb5f39 100644 --- a/src/kvilib/irc/kvi_ircserverdb.cpp +++ b/src/kvilib/irc/kvi_ircserverdb.cpp @@ -26,7 +26,7 @@ #include <tqapplication.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmessagebox.h> #include <tqcheckbox.h> diff --git a/src/kvilib/irc/kvi_ircuserdb.cpp b/src/kvilib/irc/kvi_ircuserdb.cpp index 3394b047..7fda2d12 100644 --- a/src/kvilib/irc/kvi_ircuserdb.cpp +++ b/src/kvilib/irc/kvi_ircuserdb.cpp @@ -54,9 +54,9 @@ void KviIrcUserEntry::setRealName(const TQString &rn) 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); diff --git a/src/kvilib/irc/kvi_mirccntrl.cpp b/src/kvilib/irc/kvi_mirccntrl.cpp index e42f3165..21b5258a 100644 --- a/src/kvilib/irc/kvi_mirccntrl.cpp +++ b/src/kvilib/irc/kvi_mirccntrl.cpp @@ -169,7 +169,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &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 TQString &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 TQString &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 TQString &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 TQString &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 TQString &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')) { @@ -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/net/kvi_http.cpp b/src/kvilib/net/kvi_http.cpp index 9e87d78c..9986530a 100644 --- a/src/kvilib/net/kvi_http.cpp +++ b/src/kvilib/net/kvi_http.cpp @@ -55,24 +55,24 @@ KviHttpRequest::KviHttpRequest() m_bHeaderProcessed = false; m_pBuffer = new KviDataBuffer(); - resetStatus(); + resettqStatus(); resetData(); } KviHttpRequest::~KviHttpRequest() { - resetInternalStatus(); + resetInternaltqStatus(); delete m_pBuffer; } void KviHttpRequest::abort() { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Aborted"); emit terminated(false); } -void KviHttpRequest::resetInternalStatus() +void KviHttpRequest::resetInternaltqStatus() { if(m_pThread)delete m_pThread; if(m_pDns)delete m_pDns; @@ -91,7 +91,7 @@ void KviHttpRequest::resetInternalStatus() KviThreadManager::killPendingEvents(this); } -void KviHttpRequest::resetStatus() +void KviHttpRequest::resettqStatus() { m_szLastError = __tr2qs("No request"); m_uTotalSize = 0; @@ -114,9 +114,9 @@ void KviHttpRequest::resetData() void KviHttpRequest::reset() { - resetStatus(); + resettqStatus(); resetData(); - resetInternalStatus(); + resetInternaltqStatus(); } bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFileName) @@ -131,8 +131,8 @@ bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFile bool KviHttpRequest::start() { // ensure that the file is closed - resetInternalStatus(); - resetStatus(); + resetInternaltqStatus(); + resettqStatus(); if(m_eProcessingType == StoreToFile) { @@ -156,15 +156,15 @@ bool KviHttpRequest::start() if(m_url.host().isEmpty()) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Invalid URL: Missing hostname"); return false; } if((!kvi_strEqualCI(m_url.protocol().ptr(),"http")) && (!kvi_strEqualCI(m_url.protocol().ptr(),"https"))) { - resetInternalStatus(); - m_szLastError=__tr2qs("Unsupported protocol %1").arg(m_url.protocol().ptr()); + resetInternaltqStatus(); + m_szLastError=__tr2qs("Unsupported protocol %1").tqarg(m_url.protocol().ptr()); return false; } @@ -185,7 +185,7 @@ bool KviHttpRequest::startDnsLookup() if(!m_pDns->lookup(m_url.host().ptr(),KviDns::IpV4)) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Unable to start the DNS lookup"); return false; } @@ -212,7 +212,7 @@ void KviHttpRequest::dnsLookupDone(KviDns *d) haveServerIp(); } else { int iErr = d->error(); - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = KviError::getDescription(iErr); emit terminated(false); } @@ -242,7 +242,7 @@ void KviHttpRequest::haveServerIp() if(!m_pThread->start()) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Unable to start the request slave thread"); emit terminated(false); return; @@ -318,7 +318,7 @@ bool KviHttpRequest::event(TQEvent *e) // nothing... just make gcc happy break; } - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Success"); emit terminated(true); return true; @@ -328,7 +328,7 @@ bool KviHttpRequest::event(TQEvent *e) KviStr * err = ((KviThreadDataEvent<KviStr> *)e)->getData(); m_szLastError = __tr2qs_no_xgettext(err->ptr()); delete err; - resetInternalStatus(); + resetInternaltqStatus(); emit terminated(false); return true; } @@ -409,7 +409,7 @@ bool KviHttpRequest::openFile() TQString tmp = m_szFileName; do { i++; - m_szFileName = tmp + TQString(".kvirnm-%1").arg(i); + m_szFileName = tmp + TQString(".kvirnm-%1").tqarg(i); } while(KviFile::exists(m_szFileName)); } break; @@ -419,13 +419,13 @@ bool KviHttpRequest::openFile() TQString tmp; do { i++; - tmp = m_szFileName + TQString(".kvirnm-%1").arg(i); + tmp = m_szFileName + TQString(".kvirnm-%1").tqarg(i); } while(KviFile::exists(tmp)); TQDir d; if(!d.rename(m_szFileName,tmp)) { // fail :( - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Failed to rename the existing file, please rename manually and retry"); emit terminated(false); return false; @@ -443,7 +443,7 @@ bool KviHttpRequest::openFile() if(!m_pFile->openForWriting(bAppend)) { - resetInternalStatus(); + resetInternaltqStatus(); KviTQString::sprintf(m_szLastError,__tr2qs("Can't open file \"%Q\" for writing"),&m_szFileName); emit terminated(false); return false; @@ -473,7 +473,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) bool bValid = false; - unsigned int uStatus = 0; + unsigned int utqStatus = 0; // check the response value if(kvi_strEqualCSN(szResponse.ptr(),"HTTP",4)) @@ -486,15 +486,15 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if(idx != -1)szNumber = szR.left(idx); else szNumber = szR; bool bOk; - uStatus = szNumber.toUInt(&bOk); + utqStatus = szNumber.toUInt(&bOk); if(bOk)bValid = true; } if(!bValid) { // the response is invalid ? - resetInternalStatus(); - m_szLastError=__tr2qs("Invalid HTTP response: %s").arg(szResponse.ptr()); + resetInternaltqStatus(); + m_szLastError=__tr2qs("Invalid HTTP response: %s").tqarg(szResponse.ptr()); emit terminated(false); return false; } @@ -608,14 +608,14 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) // case 504: // Gateway timeout // case 505: // HTTP Version not supported - if((uStatus != 200) && (uStatus != 206)) + if((utqStatus != 200) && (utqStatus != 206)) { // this is not "OK" and not "Partial content" // Error , redirect or something confusing if(m_eProcessingType != HeadersOnly) { // this is an error then - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = szResponse.ptr(); emit terminated(false); return false; @@ -624,7 +624,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if((m_uMaxContentLength > 0) && (m_uTotalSize > ((unsigned int)m_uMaxContentLength))) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError=__tr2qs("Stream exceeding maximum length"); emit terminated(false); return false; @@ -657,7 +657,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // header not complete if(m_pBuffer->size() > 4096) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Header too long: exceeded 4096 bytes"); emit terminated(false); } @@ -706,7 +706,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError=__tr2qs("Stream exceeded expected length"); emit terminated(false); } @@ -794,7 +794,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) m_uRemainingChunkSize = szHexHeader.toLong(&bOk,16); if(!bOk) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Protocol error: invalid chunk size"); emit terminated(false); return; @@ -814,7 +814,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // chunk header not complete if(m_pBuffer->size() > 4096) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Chunk header too long: exceeded 4096 bytes"); emit terminated(false); return; @@ -848,7 +848,7 @@ check_stream_length: if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError=__tr2qs("Stream exceeded expected length"); emit terminated(false); } diff --git a/src/kvilib/net/kvi_http.h b/src/kvilib/net/kvi_http.h index 2eeec379..de4457d8 100644 --- a/src/kvilib/net/kvi_http.h +++ b/src/kvilib/net/kvi_http.h @@ -104,9 +104,9 @@ protected: bool openFile(); void emitLines(KviDataBuffer * pDataBuffer); - void resetStatus(); + void resettqStatus(); void resetData(); - void resetInternalStatus(); + void resetInternaltqStatus(); protected slots: void dnsLookupDone(KviDns *d); void haveServerIp(); diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp index d1b835c8..7bf7e348 100644 --- a/src/kvilib/system/kvi_locale.cpp +++ b/src/kvilib/system/kvi_locale.cpp @@ -34,7 +34,7 @@ #include "kvi_locale.h" #include <tqglobal.h> //for debug() -#include <textcodec.h> +#include <tqtextcodec.h> #include <tqdir.h> #ifdef COMPILE_USE_QT4 @@ -957,9 +957,9 @@ namespace KviLocale // first of all try to find out the current locale g_szLang=""; #ifdef COMPILE_USE_QT4 - TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homePath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homePath()); #else - TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homeDirPath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath()); #endif if(KviFileUtils::fileExists(szLangFile)) { diff --git a/src/kvilib/tal/kvi_tal_listview.cpp b/src/kvilib/tal/kvi_tal_listview.cpp index 68e69675..2d946a21 100644 --- a/src/kvilib/tal/kvi_tal_listview.cpp +++ b/src/kvilib/tal/kvi_tal_listview.cpp @@ -324,7 +324,7 @@ && d->exclusive && d->exclusive->d && d->exclusive->d->exclusive == this) d->exclusive->turnOffChild(); - d->exclusive = 0; // so the children won't try to access us. + d->exclusive = 0; // so the tqchildren won't try to access us. delete d; d = 0; } @@ -403,7 +403,7 @@ updateController(update, store); } else { - // if there are no children we simply set the CheckBoxController and update its parent + // if there are no tqchildren we simply set the CheckBoxController and update its parent setCurrentState(s); stateChange(state()); if (parent() && parent()->rtti() == 1 @@ -430,7 +430,7 @@ } stateChange(state()); } - repaint(); + tqrepaint(); } void KviTalCheckListItem::setCurrentState(ToggleState s) @@ -479,7 +479,7 @@ return; TQPoint pos; - int boxsize = lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); + int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (activatedPos(pos)) { bool parentControl = false; if (parent() && parent()->rtti() == 1 && @@ -551,13 +551,13 @@ case CheckBox: setCurrentState(storedState(key)); stateChange(state()); - repaint(); + tqrepaint(); break; case CheckBoxController: { KviTalListViewItem *item = firstChild(); int childCount = 0; while (item) { - // recursively calling restoreState for children of type CheckBox and CheckBoxController + // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController if (item->rtti() == 1 && (((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController)) { @@ -572,7 +572,7 @@ else updateController(false); } else { - // if there are no children we retrieve the CheckBoxController state directly. + // if there are no tqchildren we retrieve the CheckBoxController state directly. setState(storedState(key), true, false); } } @@ -622,7 +622,7 @@ if (update && controller) { controller->updateController(update, store); } - repaint(); + tqrepaint(); } } @@ -642,7 +642,7 @@ } item = item->nextSibling(); } - // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. + // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren. setStoredState(internalState() , key); } @@ -652,7 +652,7 @@ int h = height(); KviTalListView *lv = listView(); if (lv) - h = qMax(lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), + h = qMax(lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), h); h = qMax(h, TQApplication::globalStrut().height()); setHeight(h); @@ -666,7 +666,7 @@ if (myType == RadioButtonController && pixmap(0)) { // r += 0; } else { - r += lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; + r += lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; } } return qMax(r, TQApplication::globalStrut().width()); @@ -700,7 +700,7 @@ parentControl = true; TQFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->tqstyle()->pixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + int boxsize = lv->tqstyle()->tqpixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : TQStyle::PM_CheckListButtonSize, 0, lv); int marg = lv->itemMargin(); int r = marg; @@ -782,7 +782,7 @@ (lv->rootIsDecorated() || myType == RadioButton || (myType == CheckBox && parentControl))) { TQRect rect; - int boxsize = lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); + int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (lv->columnAlignment(0) == TQt::AlignCenter) { TQFontMetrics fm(lv->font()); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; @@ -1056,7 +1056,7 @@ && d->exclusive && d->exclusive->d && d->exclusive->d->exclusive == this ) d->exclusive->turnOffChild(); - d->exclusive = 0; // so the children won't try to access us. + d->exclusive = 0; // so the tqchildren won't try to access us. if ( d->statesDict ) delete d->statesDict; delete d; @@ -1137,7 +1137,7 @@ updateController( update, store ); } else { - // if there are no children we simply set the CheckBoxController and update its parent + // if there are no tqchildren we simply set the CheckBoxController and update its parent setCurrentState( s ); stateChange( state() ); if ( parent() && parent()->rtti() == 1 @@ -1164,7 +1164,7 @@ } stateChange( state() ); } - repaint(); + tqrepaint(); } void KviTalCheckListItem::setCurrentState( ToggleState s ) @@ -1216,7 +1216,7 @@ return; TQPoint pos; - int boxsize = lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( activatedPos( pos ) ) { bool parentControl = FALSE; if ( parent() && parent()->rtti() == 1 && @@ -1287,13 +1287,13 @@ case CheckBox: setCurrentState( storedState( key ) ); stateChange( state() ); - repaint(); + tqrepaint(); break; case CheckBoxController: { KviTalListViewItem *item = firstChild(); int childCount = 0; while ( item ) { - // recursively calling restoreState for children of type CheckBox and CheckBoxController + // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController if ( item->rtti() == 1 && ( ((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController ) ) { @@ -1308,7 +1308,7 @@ else updateController( FALSE ); } else { - // if there are no children we retrieve the CheckBoxController state directly. + // if there are no tqchildren we retrieve the CheckBoxController state directly. setState( storedState( key ), TRUE, FALSE ); } } @@ -1358,7 +1358,7 @@ if ( update && controller ) { controller->updateController( update, store ); } - repaint(); + tqrepaint(); } } @@ -1378,7 +1378,7 @@ } item = item->nextSibling(); } - // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. + // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren. setStoredState( internalState() , key ); } @@ -1388,7 +1388,7 @@ int h = height(); KviTalListView *lv = listView(); if ( lv ) - h = TQMAX( lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv), + h = TQMAX( lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv), h ); h = TQMAX( h, TQApplication::globalStrut().height() ); setHeight( h ); @@ -1402,7 +1402,7 @@ if ( myType == RadioButtonController && pixmap( 0 ) ) { // r += 0; } else { - r += lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; + r += lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; } } return TQMAX( r, TQApplication::globalStrut().width() ); @@ -1420,7 +1420,7 @@ const BackgroundMode bgmode = lv->viewport()->backgroundMode(); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) + if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); else lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); @@ -1437,7 +1437,7 @@ parentControl = TRUE; TQFontMetrics fm( lv->fontMetrics() ); - int boxsize = lv->tqstyle().pixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + int boxsize = lv->tqstyle().tqpixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : TQStyle::PM_CheckListButtonSize, lv); int marg = lv->itemMargin(); int r = marg; @@ -1519,7 +1519,7 @@ (lv->rootIsDecorated() || myType == RadioButton || (myType == CheckBox && parentControl) ) ) { TQRect rect; - int boxsize = lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( lv->columnAlignment(0) == AlignCenter ) { TQFontMetrics fm( lv->font() ); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; diff --git a/src/kvilib/tal/kvi_tal_listview_qt3.h b/src/kvilib/tal/kvi_tal_listview_qt3.h index 47d23fb5..cf72e9ff 100644 --- a/src/kvilib/tal/kvi_tal_listview_qt3.h +++ b/src/kvilib/tal/kvi_tal_listview_qt3.h @@ -143,7 +143,7 @@ public: KviTalCheckListItem( KviTalListView *parent, const TQString &text,const TQPixmap & ); ~KviTalCheckListItem(); - void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int alignment ); + void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int tqalignment ); virtual void paintFocus( TQPainter *, const TQColorGroup & cg, const TQRect & r ); int width( const TQFontMetrics&, const KviTalListView*, int column) const; diff --git a/src/kvilib/tal/kvi_tal_listview_qt4.h b/src/kvilib/tal/kvi_tal_listview_qt4.h index 15acac62..83e46869 100644 --- a/src/kvilib/tal/kvi_tal_listview_qt4.h +++ b/src/kvilib/tal/kvi_tal_listview_qt4.h @@ -152,7 +152,7 @@ public: ~KviTalCheckListItem(); void paintCell(TQPainter *, const TQColorGroup & cg, - int column, int width, int alignment); + int column, int width, int tqalignment); virtual void paintFocus(TQPainter *, const TQColorGroup &cg, const TQRect & r); int width(const TQFontMetrics&, const KviTalListView*, int column) const; diff --git a/src/kvilib/tal/kvi_tal_textedit_qt3.h b/src/kvilib/tal/kvi_tal_textedit_qt3.h index 1c703e77..68e86ce7 100644 --- a/src/kvilib/tal/kvi_tal_textedit_qt3.h +++ b/src/kvilib/tal/kvi_tal_textedit_qt3.h @@ -25,7 +25,7 @@ // //============================================================================= -#include <textedit.h> +#include <tqtextedit.h> class KVILIB_API KviTalTextEdit : public TQTextEdit { diff --git a/src/kvilib/tal/kvi_tal_toolbar.cpp b/src/kvilib/tal/kvi_tal_toolbar.cpp index 85e24f3e..80ac44aa 100644 --- a/src/kvilib/tal/kvi_tal_toolbar.cpp +++ b/src/kvilib/tal/kvi_tal_toolbar.cpp @@ -49,7 +49,7 @@ { //setFrameStyle(TQFrame::NoFrame); setObjectName(nam); - if(!layout()) + if(!tqlayout()) this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); w->addToolBar(dock,this); } @@ -58,14 +58,14 @@ { //setFrameStyle(TQFrame::NoFrame); setObjectName(name); - if(!layout()) + if(!tqlayout()) this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); w->addToolBar(this); } TQBoxLayout * KviTalToolBar::boxLayout() { - return (TQBoxLayout*)this->layout(); + return (TQBoxLayout*)this->tqlayout(); } void KviTalToolBar::setBoxLayout(TQBoxLayout * l) diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp index 35a81e5a..53b7c03f 100644 --- a/src/kvilib/tal/kvi_tal_wizard.cpp +++ b/src/kvilib/tal/kvi_tal_wizard.cpp @@ -39,11 +39,11 @@ #else #include <tqlabel.h> #include <tqpushbutton.h> - #include <layout.h> + #include <tqlayout.h> #include <tqevent.h> #include <tqframe.h> #include <tqwidgetstack.h> - #include <palette.h> + #include <tqpalette.h> #endif @@ -184,7 +184,7 @@ KviTalWizard::KviTalWizard(TQWidget * pParent) #endif m_p->pStepsLabel = new TQLabel(this); m_p->pStepsLabel->setMinimumWidth(80); - m_p->pStepsLabel->setAlignment(TQt::AlignRight); + m_p->pStepsLabel->tqsetAlignment(TQt::AlignRight); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3); #else @@ -413,7 +413,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) szSteps = "<nobr><font color=\""; szSteps += clrMid.name(); szSteps += "\"><b>["; - szSteps += TQString("Step %1 of %2").arg(pData->iVisibleIndex).arg(m_p->iEnabledPageCount); + szSteps += TQString("Step %1 of %2").tqarg(pData->iVisibleIndex).tqarg(m_p->iEnabledPageCount); szSteps += "]</b></font></nobr>"; } |