diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:22:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:22:15 -0600 |
commit | 1180237ab336226ad932d767a6cb56208314988f (patch) | |
tree | 0a29b4d5d237f445dc87cb65b00d604ad4aa686d /khtml | |
parent | a51cd9949c4e6c726a84a61de3cfadd30cefb5c7 (diff) | |
download | tdelibs-1180237ab336226ad932d767a6cb56208314988f.tar.gz tdelibs-1180237ab336226ad932d767a6cb56208314988f.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'khtml')
51 files changed, 194 insertions, 194 deletions
diff --git a/khtml/DESIGN.html b/khtml/DESIGN.html index b6419c891..16484d4f1 100644 --- a/khtml/DESIGN.html +++ b/khtml/DESIGN.html @@ -291,7 +291,7 @@ that defines the DTD to use for HTML (used mainly in the parser). <dd>Java related stuff. <dt><a href="misc/">misc:</a> <dd>Some misc stuff needed in khtml. Contains the image loader, some misc definitions and the -decoder class that converts the incoming stream to tqunicode. +decoder class that converts the incoming stream to unicode. <dt><a href="rendering">rendering:</a> <dd>Everything thats related to bringing a DOM tree with CSS declarations to the screen. Contains the definition of the objects used in the rendering tree, the layouting code, and the RenderStyle objects. diff --git a/khtml/css/css_renderstyledeclarationimpl.cpp b/khtml/css/css_renderstyledeclarationimpl.cpp index eef98f41e..daf607a9e 100644 --- a/khtml/css/css_renderstyledeclarationimpl.cpp +++ b/khtml/css/css_renderstyledeclarationimpl.cpp @@ -930,7 +930,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) case CSS_PROP_TOP: return getPositionOffsetValue(renderer, CSS_PROP_TOP); case CSS_PROP_UNICODE_BIDI: - switch (style->tqunicodeBidi()) { + switch (style->unicodeBidi()) { case UBNormal: return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL); case Embed: diff --git a/khtml/css/csshelper.cpp b/khtml/css/csshelper.cpp index 96e184f2f..b388d2215 100644 --- a/khtml/css/csshelper.cpp +++ b/khtml/css/csshelper.cpp @@ -78,7 +78,7 @@ DOMString khtml::parseURL(const DOMString &url) int nl = 0; for(int k = o; k < o+l; k++) - if(i->s[k].tqunicode() > '\r') + if(i->s[k].unicode() > '\r') j->s[nl++] = i->s[k]; j->l = nl; diff --git a/khtml/css/cssparser.cpp b/khtml/css/cssparser.cpp index 7d59c27d9..6ca1a069b 100644 --- a/khtml/css/cssparser.cpp +++ b/khtml/css/cssparser.cpp @@ -166,7 +166,7 @@ void CSSParser::parseSheet( CSSStyleSheetImpl *sheet, const DOMString &string ) int length = string.length() + 3; data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); - memcpy( data, string.tqunicode(), string.length()*sizeof( unsigned short) ); + memcpy( data, string.unicode(), string.length()*sizeof( unsigned short) ); #ifdef CSS_DEBUG kdDebug( 6080 ) << ">>>>>>> start parsing style sheet" << endl; @@ -190,7 +190,7 @@ CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOM data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); for ( unsigned int i = 0; i < strlen(khtml_rule); i++ ) data[i] = khtml_rule[i]; - memcpy( data + strlen( khtml_rule ), string.tqunicode(), string.length()*sizeof( unsigned short) ); + memcpy( data + strlen( khtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) ); // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); data[length-4] = '}'; @@ -218,7 +218,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id, data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); for ( unsigned int i = 0; i < strlen(khtml_value); i++ ) data[i] = khtml_value[i]; - memcpy( data + strlen( khtml_value ), string.tqunicode(), string.length()*sizeof( unsigned short) ); + memcpy( data + strlen( khtml_value ), string.unicode(), string.length()*sizeof( unsigned short) ); data[length-4] = '}'; // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); @@ -260,7 +260,7 @@ bool CSSParser::parseDeclaration( DOM::CSSStyleDeclarationImpl *declaration, con data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); for ( unsigned int i = 0; i < strlen(khtml_decls); i++ ) data[i] = khtml_decls[i]; - memcpy( data + strlen( khtml_decls ), string.tqunicode(), string.length()*sizeof( unsigned short) ); + memcpy( data + strlen( khtml_decls ), string.unicode(), string.length()*sizeof( unsigned short) ); data[length-4] = '}'; nonCSSHint = _nonCSSHint; diff --git a/khtml/css/cssproperties.c b/khtml/css/cssproperties.c index 894ab787f..c86f2d326 100644 --- a/khtml/css/cssproperties.c +++ b/khtml/css/cssproperties.c @@ -281,7 +281,7 @@ findProp (register const char *str, register unsigned int len) #line 102 "cssproperties.gperf" {"text-align", CSS_PROP_TEXT_ALIGN}, #line 109 "cssproperties.gperf" - {"tqunicode-bidi", CSS_PROP_UNICODE_BIDI}, + {"unicode-bidi", CSS_PROP_UNICODE_BIDI}, #line 82 "cssproperties.gperf" {"outline-color", CSS_PROP_OUTLINE_COLOR}, #line 60 "cssproperties.gperf" @@ -632,7 +632,7 @@ static const char * const propertyList[] = { "text-shadow", "text-transform", "top", -"tqunicode-bidi", +"unicode-bidi", "vertical-align", "visibility", "white-space", diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index e8af85459..35a5ff704 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -871,7 +871,7 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded if( attr.isNull() ) { return PseudoNone; } - TQConstString cu(attr.tqunicode(), attr.length()); + TQConstString cu(attr.unicode(), attr.length()); TQString u = cu.string(); if ( !u.contains("://") ) { if ( u[0] == '/' ) @@ -1165,8 +1165,8 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm // else the value is longer and can be a list if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false; - TQChar* sel_uc = sel->value.tqunicode(); - TQChar* val_uc = value->tqunicode(); + TQChar* sel_uc = sel->value.unicode(); + TQChar* val_uc = value->unicode(); TQConstString sel_str(sel_uc, sel_len); TQConstString val_str(val_uc, val_len); @@ -1187,29 +1187,29 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm case CSSSelector::Contain: { //kdDebug( 6080 ) << "checking for contains match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().contains(sel_str.string(), caseSensitive); } case CSSSelector::Begin: { //kdDebug( 6080 ) << "checking for beginswith match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().startsWith(sel_str.string(), caseSensitive); } case CSSSelector::End: { //kdDebug( 6080 ) << "checking for endswith match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().endsWith(sel_str.string(), caseSensitive); } case CSSSelector::Hyphen: { //kdDebug( 6080 ) << "checking for hyphen match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); const TQString& str = val_str.string(); const TQString& selStr = sel_str.string(); if(str.length() < selStr.length()) return false; @@ -2079,7 +2079,7 @@ static TQColor colorForCSSValue( int css_value ) KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support bckgrConfig.setGroup("Desktop0"); // Desktop background. - return bckgrConfig.readColorEntry("Color1", &tqApp->tqpalette().disabled().background()); + return bckgrConfig.readColorEntry("Color1", &tqApp->palette().disabled().background()); } return TQColor(); } @@ -2597,7 +2597,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) } case CSS_PROP_UNICODE_BIDI: { - HANDLE_INHERIT_AND_INITIAL(tqunicodeBidi, UnicodeBidi) + HANDLE_INHERIT_AND_INITIAL(unicodeBidi, UnicodeBidi) if(!primitiveValue) break; switch (primitiveValue->getIdent()) { case CSS_VAL_NORMAL: diff --git a/khtml/css/html4.css b/khtml/css/html4.css index 575945464..c3fd1a347 100644 --- a/khtml/css/html4.css +++ b/khtml/css/html4.css @@ -486,27 +486,27 @@ a:visited:active { color: red; outline: 1px dotted invert; } bdo[dir="ltr"] { direction: ltr; - tqunicode-bidi: bidi-override; + unicode-bidi: bidi-override; } bdo[dir="rtl"] { direction: rtl; - tqunicode-bidi: bidi-override; + unicode-bidi: bidi-override; } /* ### this selector seems to be still broken ... - *[dir="ltr"] { direction: ltr; tqunicode-bidi: embed } - *[dir="rtl"] { direction: rtl; tqunicode-bidi: embed } + *[dir="ltr"] { direction: ltr; unicode-bidi: embed } + *[dir="rtl"] { direction: rtl; unicode-bidi: embed } */ /* elements that are block-level in html4 */ -/* ### don't support tqunicode-bidi at the moment +/* ### don't support unicode-bidi at the moment address, blockquote, body, dd, div, dl, dt, fieldset, form, frame, frameset, h1, h2, h3, h4, h5, h6, iframe, noscript, noframes, object, ol, p, ul, applet, center, dir, hr, menu, pre, li, table, tr, thead, tbody, tfoot, col, colgroup, td, th, caption - { tqunicode-bidi: embed } + { unicode-bidi: embed } */ /* end bidi settings */ diff --git a/khtml/dom/css_extensions.cpp b/khtml/dom/css_extensions.cpp index 01a47d5f1..23f7739dc 100644 --- a/khtml/dom/css_extensions.cpp +++ b/khtml/dom/css_extensions.cpp @@ -1881,15 +1881,15 @@ void CSS2Properties::setTop( const DOMString &value ) if(impl) ((ElementImpl *)impl)->setAttribute("top", value); } -DOMString CSS2Properties::tqunicodeBidi() const +DOMString CSS2Properties::unicodeBidi() const { if(!impl) return 0; - return ((ElementImpl *)impl)->getAttribute("tqunicodeBidi"); + return ((ElementImpl *)impl)->getAttribute("unicodeBidi"); } void CSS2Properties::setUnicodeBidi( const DOMString &value ) { - if(impl) ((ElementImpl *)impl)->setAttribute("tqunicodeBidi", value); + if(impl) ((ElementImpl *)impl)->setAttribute("unicodeBidi", value); } DOMString CSS2Properties::verticalAlign() const diff --git a/khtml/dom/css_extensions.h b/khtml/dom/css_extensions.h index bda2cfbbc..e93cb7d21 100644 --- a/khtml/dom/css_extensions.h +++ b/khtml/dom/css_extensions.h @@ -2516,13 +2516,13 @@ public: /** * See the <a * href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-tqunicode-bidi"> - * tqunicode-bidi property definition </a> in CSS2. + * unicode-bidi property definition </a> in CSS2. * */ - DOM::DOMString tqunicodeBidi() const; + DOM::DOMString unicodeBidi() const; /** - * see tqunicodeBidi + * see unicodeBidi */ void setUnicodeBidi( const DOM::DOMString & ); diff --git a/khtml/dom/dom_string.cpp b/khtml/dom/dom_string.cpp index f8487cf5a..14bdc2613 100644 --- a/khtml/dom/dom_string.cpp +++ b/khtml/dom/dom_string.cpp @@ -39,7 +39,7 @@ DOMString::DOMString(const TQString &str) return; } - impl = new DOMStringImpl( str.tqunicode(), str.length() ); + impl = new DOMStringImpl( str.unicode(), str.length() ); impl->ref(); } @@ -193,10 +193,10 @@ bool DOMString::percentage(int &_percentage) const return true; } -TQChar *DOMString::tqunicode() const +TQChar *DOMString::unicode() const { if(!impl) return 0; - return impl->tqunicode(); + return impl->unicode(); } TQString DOMString::string() const @@ -225,8 +225,8 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs ) { if ( as.length() != bs.length() ) return true; - const TQChar *a = as.tqunicode(); - const TQChar *b = bs.tqunicode(); + const TQChar *a = as.unicode(); + const TQChar *b = bs.unicode(); if ( a == b ) return false; if ( !( a && b ) ) return true; int l = as.length(); @@ -239,7 +239,7 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs ) bool DOM::strcasecmp( const DOMString &as, const char* bs ) { - const TQChar *a = as.tqunicode(); + const TQChar *a = as.unicode(); int l = as.length(); if ( !bs ) return ( l != 0 ); while ( l-- ) { @@ -265,7 +265,7 @@ bool DOM::operator==( const DOMString &a, const DOMString &b ) if( l != b.length() ) return false; - if(!memcmp(a.tqunicode(), b.tqunicode(), l*sizeof(TQChar))) + if(!memcmp(a.unicode(), b.unicode(), l*sizeof(TQChar))) return true; return false; } @@ -276,7 +276,7 @@ bool DOM::operator==( const DOMString &a, const TQString &b ) if( l != b.length() ) return false; - if(!memcmp(a.tqunicode(), b.tqunicode(), l*sizeof(TQChar))) + if(!memcmp(a.unicode(), b.unicode(), l*sizeof(TQChar))) return true; return false; } @@ -291,7 +291,7 @@ bool DOM::operator==( const DOMString &a, const char *b ) const TQChar *aptr = aimpl->s; while ( alen-- ) { unsigned char c = *b++; - if ( !c || ( *aptr++ ).tqunicode() != c ) + if ( !c || ( *aptr++ ).unicode() != c ) return false; } } diff --git a/khtml/dom/dom_string.h b/khtml/dom/dom_string.h index dec259882..3d4706b5a 100644 --- a/khtml/dom/dom_string.h +++ b/khtml/dom/dom_string.h @@ -97,7 +97,7 @@ public: */ DOMString upper() const; - TQChar *tqunicode() const; + TQChar *unicode() const; TQString string() const; int toInt() const; diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp index 4fa87e2ce..125401cae 100644 --- a/khtml/ecma/kjs_binding.cpp +++ b/khtml/ecma/kjs_binding.cpp @@ -261,7 +261,7 @@ UString::UString(const TQString &d) { unsigned int len = d.length(); UChar *dat = new UChar[len]; - memcpy(dat, d.tqunicode(), len * sizeof(UChar)); + memcpy(dat, d.unicode(), len * sizeof(UChar)); rep = UString::Rep::create(dat, len); } @@ -277,7 +277,7 @@ UString::UString(const DOM::DOMString &d) unsigned int len = d.length(); UChar *dat = new UChar[len]; - memcpy(dat, d.tqunicode(), len * sizeof(UChar)); + memcpy(dat, d.unicode(), len * sizeof(UChar)); rep = UString::Rep::create(dat, len); } diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp index 7a083c28e..f7ba774f8 100644 --- a/khtml/ecma/kjs_debugwin.cpp +++ b/khtml/ecma/kjs_debugwin.cpp @@ -107,7 +107,7 @@ void SourceDisplay::setSource(SourceFile *sourceFile) } TQString code = sourceFile->getCode(); - const TQChar *chars = code.tqunicode(); + const TQChar *chars = code.unicode(); uint len = code.length(); TQChar newLine('\n'); TQChar cr('\r'); @@ -182,7 +182,7 @@ void SourceDisplay::showEvent(TQShowEvent *) void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph) { if (!m_sourceFile) { - p->fillRect(clipx,clipy,clipw,cliph,tqpalette().active().base()); + p->fillRect(clipx,clipy,clipw,cliph,palette().active().base()); return; } @@ -207,9 +207,9 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, TQString linenoStr = TQString().sprintf("%d",lineno+1); - p->fillRect(0,height*lineno,linenoWidth,height,tqpalette().active().mid()); + p->fillRect(0,height*lineno,linenoWidth,height,palette().active().mid()); - p->setPen(tqpalette().active().text()); + p->setPen(palette().active().text()); p->drawText(0,height*lineno,linenoWidth,height,Qt::AlignRight,linenoStr); TQColor bgColor; @@ -220,13 +220,13 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, textColor = tqpalette().active().highlightedText(); } else if (m_debugWin->haveBreakpoint(m_sourceFile,lineno+1,lineno+1)) { - bgColor = tqpalette().active().text(); - textColor = tqpalette().active().base(); + bgColor = palette().active().text(); + textColor = palette().active().base(); p->drawPixmap(2,height*lineno+height/2-m_breakpointIcon.height()/2,m_breakpointIcon); } else { - bgColor = tqpalette().active().base(); - textColor = tqpalette().active().text(); + bgColor = palette().active().base(); + textColor = palette().active().text(); } p->fillRect(linenoWidth,height*lineno,right-linenoWidth,height,bgColor); @@ -236,10 +236,10 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, } int remainingTop = height*(lastLine+1); - p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,tqpalette().active().mid()); + p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,palette().active().mid()); p->fillRect(linenoWidth,remainingTop, - right-linenoWidth,bottom-remainingTop,tqpalette().active().base()); + right-linenoWidth,bottom-remainingTop,palette().active().base()); } //------------------------------------------------------------------------- diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp index 183c99078..32f836ba7 100644 --- a/khtml/ecma/kjs_navigator.cpp +++ b/khtml/ecma/kjs_navigator.cpp @@ -223,7 +223,7 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const case ProductSub: { int ix = userAgent.find("Gecko"); - if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.tqunicode()[ix+5] == TQChar('/') && + if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == TQChar('/') && userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6) { // We have Gecko/<productSub> in the UA string diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp index 27c26a822..998737ff2 100644 --- a/khtml/ecma/kjs_window.cpp +++ b/khtml/ecma/kjs_window.cpp @@ -1639,7 +1639,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString if (winargs.height < 100) winargs.height = 100; } else if (key == "width") { - winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; + winargs.width = (int)val.toFloat() + 2*tqApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; if (winargs.width > screen.width()) // should actually check workspace winargs.width = screen.width(); if (winargs.width < 100) diff --git a/khtml/html/html_documentimpl.cpp b/khtml/html/html_documentimpl.cpp index c0bef4434..e2ee3ba57 100644 --- a/khtml/html/html_documentimpl.cpp +++ b/khtml/html/html_documentimpl.cpp @@ -235,7 +235,7 @@ HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url) TQString s; int pos = url.find('#'); //kdDebug(0) << "map pos of #:" << pos << endl; - s = TQString(_url.tqunicode() + pos + 1, _url.length() - pos - 1); + s = TQString(_url.unicode() + pos + 1, _url.length() - pos - 1); TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.find(s); diff --git a/khtml/html/html_elementimpl.cpp b/khtml/html/html_elementimpl.cpp index 89b3587cc..f635fcc3d 100644 --- a/khtml/html/html_elementimpl.cpp +++ b/khtml/html/html_elementimpl.cpp @@ -176,7 +176,7 @@ void HTMLElementImpl::parseAttribute(AttributeImpl *attr) case ATTR_CLASS: if (attr->val()) { DOMString v = attr->value(); - const TQChar* s = v.tqunicode(); + const TQChar* s = v.unicode(); int l = v.length(); while( l && !s->isSpace() ) l--,s++; @@ -354,11 +354,11 @@ static inline bool isHexDigit( const TQChar &c ) { static inline int toHex( const TQChar &c ) { return ( (c >= TQChar('0') && c <= TQChar('9')) - ? (c.tqunicode() - '0') + ? (c.unicode() - '0') : ( ( c >= TQChar('a') && c <= TQChar('f') ) - ? (c.tqunicode() - 'a' + 10) + ? (c.unicode() - 'a' + 10) : ( ( c >= TQChar('A') && c <= TQChar('F') ) - ? (c.tqunicode() - 'A' + 10) + ? (c.unicode() - 'A' + 10) : -1 ) ) ); } @@ -457,7 +457,7 @@ DOMString HTMLElementImpl::innerHTML() const TQString result; //Use TQString to accumulate since DOMString is poor for appends for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) { DOMString kid = child->toString(); - result += TQConstString(kid.tqunicode(), kid.length()).string(); + result += TQConstString(kid.unicode(), kid.length()).string(); } return result; } diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp index a45902cd9..2d4428494 100644 --- a/khtml/html/html_formimpl.cpp +++ b/khtml/html/html_formimpl.cpp @@ -193,7 +193,7 @@ inline static TQString escapeUnencodeable(const TQTextCodec* codec, const TQStri enc_string.append(c); else { TQString ampersandEscape; - ampersandEscape.sprintf("&#%u;", c.tqunicode()); + ampersandEscape.sprintf("&#%u;", c.unicode()); enc_string.append(ampersandEscape); } } @@ -2762,7 +2762,7 @@ static TQString expandLF(const TQString& s) for(unsigned pos = 0; pos < len; pos++) { TQChar c = s.at(pos); - switch(c.tqunicode()) + switch(c.unicode()) { case '\n': r[pos2++] = '\r'; diff --git a/khtml/html/html_imageimpl.cpp b/khtml/html/html_imageimpl.cpp index c1f7ac987..be13e93c2 100644 --- a/khtml/html/html_imageimpl.cpp +++ b/khtml/html/html_imageimpl.cpp @@ -418,8 +418,8 @@ void HTMLMapElementImpl::parseAttribute(AttributeImpl *attr) case ATTR_NAME: { DOMString s = attr->value(); - if(*s.tqunicode() == '#') - name = TQString(s.tqunicode()+1, s.length()-1).lower(); + if(*s.unicode() == '#') + name = TQString(s.unicode()+1, s.length()-1).lower(); else name = s.string().lower(); // ### make this work for XML documents, e.g. in case of <html:map...> diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp index 778b9fe3a..5da6edd14 100644 --- a/khtml/html/htmltokenizer.cpp +++ b/khtml/html/htmltokenizer.cpp @@ -89,7 +89,7 @@ static const char titleEnd [] = "</title"; #define fixUpChar(x) #else #define fixUpChar(x) \ - switch ((x).tqunicode()) \ + switch ((x).unicode()) \ { \ case 0x80: (x) = 0x20ac; break; \ case 0x82: (x) = 0x201a; break; \ @@ -471,7 +471,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src) if (strict) { - if (src->tqunicode() == '-') { + if (src->unicode() == '-') { delimiterCount++; if (delimiterCount == 2) { delimiterCount = 0; @@ -482,7 +482,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src) delimiterCount = 0; } - if ((!strict || canClose) && src->tqunicode() == '>') + if ((!strict || canClose) && src->unicode() == '>') { bool handleBrokenComments = brokenComments && !( script || style ); bool scriptEnd=false; @@ -521,7 +521,7 @@ void HTMLTokenizer::parseServer(TokenizerString &src) checkScriptBuffer(src.length()); while ( !src.isEmpty() ) { scriptCode[ scriptCodeSize++ ] = *src; - if (src->tqunicode() == '>' && + if (src->unicode() == '>' && scriptCodeSize > 1 && scriptCode[scriptCodeSize-2] == '%') { ++src; server = false; @@ -607,7 +607,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) while( !src.isEmpty() ) { - ushort cc = src->tqunicode(); + ushort cc = src->unicode(); switch(Entity) { case NoEntity: return; @@ -639,7 +639,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) case Hexadecimal: { - int uc = EntityChar.tqunicode(); + int uc = EntityChar.unicode(); int ll = kMin<uint>(src.length(), 8); while(ll--) { TQChar csrc(src->lower()); @@ -658,7 +658,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) } case Decimal: { - int uc = EntityChar.tqunicode(); + int uc = EntityChar.unicode(); int ll = kMin(src.length(), 9-cBufferPos); while(ll--) { cc = src->cell(); @@ -718,7 +718,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) } case SearchSemicolon: #ifdef TOKEN_DEBUG - kdDebug( 6036 ) << "ENTITY " << EntityChar.tqunicode() << endl; + kdDebug( 6036 ) << "ENTITY " << EntityChar.unicode() << endl; #endif fixUpChar(EntityChar); @@ -956,7 +956,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) ushort curchar; bool atespace = false; while(!src.isEmpty()) { - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar > ' ') { if(curchar == '=') { #ifdef TOKEN_DEBUG @@ -988,7 +988,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) { ushort curchar; while(!src.isEmpty()) { - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar > ' ') { if(( curchar == '\'' || curchar == '\"' )) { tquote = curchar == '\"' ? DoubleQuote : SingleQuote; @@ -1012,7 +1012,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) while(!src.isEmpty()) { checkBuffer(); - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar <= '\'' && !src.escaped()) { // ### attributes like '&{blaa....};' are supposed to be treated as jscript. if ( curchar == '&' ) @@ -1050,7 +1050,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) ushort curchar; while(!src.isEmpty()) { checkBuffer(); - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar <= '>' && !src.escaped()) { // parse Entities if ( curchar == '&' ) @@ -1351,7 +1351,7 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData ) // do we need to enlarge the buffer? checkBuffer(); - ushort cc = src->tqunicode(); + ushort cc = src->unicode(); if (skipLF && (cc != '\n')) skipLF = false; diff --git a/khtml/html/htmltokenizer.h b/khtml/html/htmltokenizer.h index 2197a5083..8e36353b0 100644 --- a/khtml/html/htmltokenizer.h +++ b/khtml/html/htmltokenizer.h @@ -76,8 +76,8 @@ namespace khtml { { DOMStringImpl *value = 0; NodeImpl::Id tid = 0; - if(buffer->tqunicode()) { - tid = buffer->tqunicode(); + if(buffer->unicode()) { + tid = buffer->unicode(); value = v.implementation(); } else if ( !attrName.isEmpty() && attrName != "/" ) { diff --git a/khtml/khtml_caret.cpp b/khtml/khtml_caret.cpp index 80df392aa..9b819ee6c 100644 --- a/khtml/khtml_caret.cpp +++ b/khtml/khtml_caret.cpp @@ -1749,7 +1749,7 @@ void EditableCharacterIterator::initFirstChar() if (_offset == box->maxOffset()) peekNext(); else if (b && !box->isOutside() && b->isInlineTextBox()) - _char = static_cast<RenderText *>(b->object())->str->s[_offset].tqunicode(); + _char = static_cast<RenderText *>(b->object())->str->s[_offset].unicode(); else _char = -1; } @@ -1849,7 +1849,7 @@ kdDebug(6200) << "_offset " << _offset << endl; readchar: // get character if (b && !box->isOutside() && b->isInlineTextBox() && _offset < b->maxOffset()) - _char = static_cast<RenderText *>(b->object())->str->s[_offset].tqunicode(); + _char = static_cast<RenderText *>(b->object())->str->s[_offset].unicode(); else _char = -1; }/*end if*/ @@ -1887,7 +1887,7 @@ kdDebug(6200) << "_offset == minofs: " << _offset << " == " << minofs << endl; // _peekNext = b; // get character if (b && !box->isOutside() && b->isInlineTextBox()) - _char = static_cast<RenderText *>(b->object())->text()[_offset].tqunicode(); + _char = static_cast<RenderText *>(b->object())->text()[_offset].unicode(); else _char = -1; @@ -1990,9 +1990,9 @@ kdDebug(6200) << "_offset: " << _offset << " _peekNext: " << _peekNext << endl; #endif // get character if (_peekNext && _offset >= box->maxOffset() && _peekNext->isInlineTextBox()) - _char = static_cast<RenderText *>(_peekNext->object())->text()[_peekNext->minOffset()].tqunicode(); + _char = static_cast<RenderText *>(_peekNext->object())->text()[_peekNext->minOffset()].unicode(); else if (b && _offset < b->maxOffset() && b->isInlineTextBox()) - _char = static_cast<RenderText *>(b->object())->text()[_offset].tqunicode(); + _char = static_cast<RenderText *>(b->object())->text()[_offset].unicode(); else _char = -1; }/*end if*/ diff --git a/khtml/khtml_caret_p.h b/khtml/khtml_caret_p.h index a5c4bf60d..9524f2df7 100644 --- a/khtml/khtml_caret_p.h +++ b/khtml/khtml_caret_p.h @@ -1034,7 +1034,7 @@ public: */ int chr() const { return _char; } - /** returns the current character as a tqunicode symbol, substituting + /** returns the current character as a unicode symbol, substituting * a blank for a non-text node. */ TQChar operator *() const { return TQChar(_char >= 0 ? _char : ' '); } @@ -1089,7 +1089,7 @@ protected: CaretBox *box = *copy; InlineBox *b = box->inlineBox(); if (b && !box->isOutside() && b->isInlineTextBox()) - _char = static_cast<RenderText *>(b->object())->str->s[b->minOffset()].tqunicode(); + _char = static_cast<RenderText *>(b->object())->str->s[b->minOffset()].unicode(); else _char = -1; } diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp index 6275deebb..556836e07 100644 --- a/khtml/khtml_ext.cpp +++ b/khtml/khtml_ext.cpp @@ -112,7 +112,7 @@ void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget ) if ( !m_connectedToClipboard && m_editableFormWidget ) { - connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( updateEditActions() ) ); if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) || m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) ) @@ -135,7 +135,7 @@ void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ ) if ( m_connectedToClipboard ) { - disconnect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + disconnect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( updateEditActions() ) ); if ( oldWidget ) @@ -223,7 +223,7 @@ void KHTMLPartBrowserExtension::copy() text.replace( TQChar( 0xa0 ), ' ' ); - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); disconnect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) ); #ifndef QT_NO_MIMECLIPBOARD TQString htmltext; @@ -335,10 +335,10 @@ void KHTMLPartBrowserExtension::updateEditActions() // ### duplicated from KonqMainWindow::slotClipboardDataChanged #ifndef QT_NO_MIMECLIPBOARD // Handle minimalized versions of Qt Embedded - TQMimeSource *data = TQApplication::tqclipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); enableAction( "paste", data->provides( "text/plain" ) ); #else - TQString data=TQApplication::tqclipboard()->text(); + TQString data=TQApplication::clipboard()->text(); enableAction( "paste", data.contains("://")); #endif bool hasSelection = false; @@ -715,10 +715,10 @@ void KHTMLPopupGUIClient::slotCopyLinkLocation() // Set it in both the mouse selection and in the clipboard KURL::List lst; lst.append( safeURL ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); #else - TQApplication::tqclipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries + TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries #endif } @@ -741,8 +741,8 @@ void KHTMLPopupGUIClient::slotCopyImage() drag->addDragObject( new KURLDrag(lst, d->m_khtml->view(), "Image URL") ); // Set it in both the mouse selection and in the clipboard - TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setData( new KURLDrag(lst), TQClipboard::Selection ); + TQApplication::clipboard()->setData( drag, TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( new KURLDrag(lst), TQClipboard::Selection ); #else kdDebug() << "slotCopyImage called when the clipboard does not support this. This should not be possible." << endl; #endif @@ -756,10 +756,10 @@ void KHTMLPopupGUIClient::slotCopyImageLocation() // Set it in both the mouse selection and in the clipboard KURL::List lst; lst.append( safeURL ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); #else - TQApplication::tqclipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries + TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries #endif } diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp index 28a31ad9e..b0d539cef 100644 --- a/khtml/khtml_part.cpp +++ b/khtml/khtml_part.cpp @@ -1480,7 +1480,7 @@ void KHTMLPart::clear() d->m_startOffset = 0; d->m_endOffset = 0; #ifndef QT_NO_CLIPBOARD - connect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); #endif d->m_jobPercent = 0; @@ -3005,7 +3005,7 @@ void KHTMLPart::findText() // The lineedit of the dialog would make khtml lose its selection, otherwise #ifndef QT_NO_CLIPBOARD - disconnect( kapp->tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotClearSelection()) ); + disconnect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotClearSelection()) ); #endif // Now show the dialog in which the user can choose options. @@ -3036,7 +3036,7 @@ void KHTMLPart::findText( const TQString &str, long options, TQWidget *parent, K return; #ifndef QT_NO_CLIPBOARD - connect( kapp->tqclipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) ); + connect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) ); #endif // Create the KFind object @@ -6610,9 +6610,9 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event ) #ifndef QT_NO_CLIPBOARD TQString text = selectedText(); text.replace(TQChar(0xa0), ' '); - disconnect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); - kapp->tqclipboard()->setText(text,TQClipboard::Selection); - connect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); + kapp->clipboard()->setText(text,TQClipboard::Selection); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); #endif //kdDebug( 6000 ) << "selectedText = " << text << endl; emitSelectionChanged(); diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp index 3a75744ce..455ac432a 100644 --- a/khtml/khtmlview.cpp +++ b/khtml/khtmlview.cpp @@ -662,7 +662,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh ) //kdDebug( 6000 ) << "drawContents this="<< this <<" x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl; if(!m_part || !m_part->xmlDocImpl() || !m_part->xmlDocImpl()->renderer()) { - p->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base)); + p->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base)); return; } else if ( d->complete && static_cast<RenderCanvas*>(m_part->xmlDocImpl()->renderer())->needsLayout() ) { // an external update request happens while we have a layout scheduled @@ -726,7 +726,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh ) d->vertPaintBuffer->resize(10, visibleHeight()); d->tp->begin(d->vertPaintBuffer); d->tp->translate(-ex, -ey); - d->tp->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base)); + d->tp->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base)); m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey, ew, eh)); d->tp->end(); p->drawPixmap(ex, ey, *d->vertPaintBuffer, 0, 0, ew, eh); @@ -740,7 +740,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh ) int ph = eh-py < PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT; d->tp->begin(d->paintBuffer); d->tp->translate(-ex, -ey-py); - d->tp->fillRect(ex, ey+py, ew, ph, tqpalette().active().brush(TQColorGroup::Base)); + d->tp->fillRect(ex, ey+py, ew, ph, palette().active().brush(TQColorGroup::Base)); m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey+py, ew, ph)); d->tp->end(); @@ -756,7 +756,7 @@ static int cnt=0; kdDebug() << "[" << ++cnt << "]" << " clip region: " << pr << endl; // p->setClipRegion(TQRect(0,0,ew,eh)); // p->translate(-ex, -ey); - p->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base)); + p->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base)); m_part->xmlDocImpl()->renderer()->layer()->paint(p, pr); #endif // DEBUG_NO_PAINT_BUFFER @@ -4430,7 +4430,7 @@ void KHTMLView::placeCaretOnChar(CaretBox *hintBox) d->m_caretViewContext->origX = d->m_caretViewContext->x; d->scrollBarMoved = false; #if DEBUG_CARETMODE > 3 - //if (caretNode->isTextNode()) kdDebug(6200) << "text[0] = " << (int)*((TextImpl *)caretNode)->data().tqunicode() << " text :\"" << ((TextImpl *)caretNode)->data().string() << "\"" << endl; + //if (caretNode->isTextNode()) kdDebug(6200) << "text[0] = " << (int)*((TextImpl *)caretNode)->data().unicode() << " text :\"" << ((TextImpl *)caretNode)->data().string() << "\"" << endl; #endif ensureNodeHasFocus(m_part->d->caretNode().handle()); caretOn(); diff --git a/khtml/misc/stringit.h b/khtml/misc/stringit.h index d56a78397..789f22af8 100644 --- a/khtml/misc/stringit.h +++ b/khtml/misc/stringit.h @@ -46,7 +46,7 @@ public: DOMStringIt(TQChar *str, uint len) { s = str, l = len; lines = 0; } DOMStringIt(const TQString &str) - { s = str.tqunicode(); l = str.length(); lines = 0; } + { s = str.unicode(); l = str.length(); lines = 0; } DOMStringIt *operator++() { @@ -85,13 +85,13 @@ class TokenizerSubstring friend class TokenizerString; public: TokenizerSubstring() : m_length(0), m_current(0) {} - TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.tqunicode()) {} + TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {} TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {} void clear() { m_length = 0; m_current = 0; } void appendTo(TQString &str) const { - if (m_string.tqunicode() == m_current) { + if (m_string.unicode() == m_current) { if (str.isEmpty()) str = m_string; else diff --git a/khtml/rendering/bidi.cpp b/khtml/rendering/bidi.cpp index e866f8838..bd010047a 100644 --- a/khtml/rendering/bidi.cpp +++ b/khtml/rendering/bidi.cpp @@ -242,7 +242,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) { next = current->firstChild(); if ( next && adjustEmbedding ) { - EUnicodeBidi ub = next->style()->tqunicodeBidi(); + EUnicodeBidi ub = next->style()->unicodeBidi(); if ( ub != UBNormal && !emptyRun ) { EDirection dir = next->style()->direction(); TQChar::Direction d = ( ub == Embed ? ( dir == RTL ? TQChar::DirRLE : TQChar::DirLRE ) @@ -261,7 +261,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B while (current && current != par) { next = current->nextSibling(); if (next) break; - if ( adjustEmbedding && current->style()->tqunicodeBidi() != UBNormal && !emptyRun ) { + if ( adjustEmbedding && current->style()->unicodeBidi() != UBNormal && !emptyRun ) { embed( TQChar::DirPDF, bidi ); } current = current->parent(); @@ -454,7 +454,7 @@ static void checkMidpoints(BidiIterator& lBreak, BidiState &bidi) // Don't shave a character off the endpoint if it was from a soft hyphen. RenderText* textObj = static_cast<RenderText*>(endpoint.obj); if (endpoint.pos+1 < textObj->length() && - textObj->text()[endpoint.pos+1].tqunicode() == SOFT_HYPHEN) + textObj->text()[endpoint.pos+1].unicode() == SOFT_HYPHEN) return; } endpoint.pos--; @@ -1241,7 +1241,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator } // this causes the operator ++ to open and close embedding levels as needed - // for the CSS tqunicode-bidi property + // for the CSS unicode-bidi property adjustEmbedding = true; bidi.current.increment( bidi ); adjustEmbedding = false; @@ -1611,11 +1611,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi // be skipped. while (!start.atEnd() && (start.obj->isInlineFlow() || (!start.obj->style()->preserveWS() && !start.obj->isBR() && #ifndef QT_NO_UNICODETABLES - ( (start.current().tqunicode() == (ushort)0x0020) || // ASCII space - (start.current().tqunicode() == (ushort)0x0009) || // ASCII tab - (start.current().tqunicode() == (ushort)0x000A) || // ASCII line feed - (start.current().tqunicode() == (ushort)0x000C) || // ASCII form feed - (start.current().tqunicode() == (ushort)0x200B) || // Zero-width space + ( (start.current().unicode() == (ushort)0x0020) || // ASCII space + (start.current().unicode() == (ushort)0x0009) || // ASCII tab + (start.current().unicode() == (ushort)0x000A) || // ASCII line feed + (start.current().unicode() == (ushort)0x000C) || // ASCII form feed + (start.current().unicode() == (ushort)0x200B) || // Zero-width space start.obj->isFloatingOrPositioned() ) #else ( start.current() == ' ' || start.current() == '\n' || start.obj->isFloatingOrPositioned() ) @@ -1824,7 +1824,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi isLineEmpty = false; // Check for soft hyphens. Go ahead and ignore them. - if (c.tqunicode() == SOFT_HYPHEN && pos > 0) { + if (c.unicode() == SOFT_HYPHEN && pos > 0) { nextIsSoftBreakable = true; if (!ignoringSpaces) { // Ignore soft hyphens @@ -1911,7 +1911,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi lBreak.endOfInline = false; } goto end; - } else if ( (pos > 1 && str[pos-1].tqunicode() == SOFT_HYPHEN) ) + } else if ( (pos > 1 && str[pos-1].unicode() == SOFT_HYPHEN) ) // Subtract the width of the soft hyphen out since we fit on a line. tmpW -= t->width(pos-1, 1, f); } @@ -2189,7 +2189,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi // For soft hyphens on line breaks, we have to chop out the midpoints that made us // ignore the hyphen so that it will render at the end of the line. TQChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1]; - if (c.tqunicode() == SOFT_HYPHEN) + if (c.unicode() == SOFT_HYPHEN) chopMidpointsAt(lBreak.obj, lBreak.pos-2); } diff --git a/khtml/rendering/break_lines.h b/khtml/rendering/break_lines.h index ed6df2aab..5176e5fb0 100644 --- a/khtml/rendering/break_lines.h +++ b/khtml/rendering/break_lines.h @@ -6,7 +6,7 @@ namespace khtml { /* - array of tqunicode codes where breaking shouldn't occur. + array of unicode codes where breaking shouldn't occur. (in sorted order because of using with binary search) these are currently for Japanese, though simply adding Korean, Chinese ones should work as well @@ -122,7 +122,7 @@ namespace khtml { inline bool isBreakable( const TQChar *str, const int pos, int len ) { const TQChar *c = str+pos; - unsigned short ch = c->tqunicode(); + unsigned short ch = c->unicode(); if ( ch > 0xff ) { // not latin1, need to do more sophisticated checks for asian fonts unsigned char row = c->row(); @@ -147,8 +147,8 @@ namespace khtml { return false; // do binary search in dontbreak[] - return break_bsearch(dontbreakbefore, c->tqunicode()) && - break_bsearch(dontbreakafter, (str+(pos-1))->tqunicode()); + return break_bsearch(dontbreakbefore, c->unicode()) && + break_bsearch(dontbreakafter, (str+(pos-1))->unicode()); } else // no asian font return c->isSpace(); } else { diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp index 64ede83e3..a33f0e082 100644 --- a/khtml/rendering/font.cpp +++ b/khtml/rendering/font.cpp @@ -293,7 +293,7 @@ int Font::width( TQChar *chs, int, int pos, int len, int start, int end, int toA const TQString qstr = cstr.string(); if ( scFont ) { const TQString upper = qstr.upper(); - const TQChar *uc = qstr.tqunicode(); + const TQChar *uc = qstr.unicode(); const TQFontMetrics sc_fm( *scFont ); for ( int i = 0; i < len; ++i ) { if ( (uc+i)->category() == TQChar::Letter_Lowercase ) diff --git a/khtml/rendering/render_block.cpp b/khtml/rendering/render_block.cpp index 5b30e2a58..ccbb6fad0 100644 --- a/khtml/rendering/render_block.cpp +++ b/khtml/rendering/render_block.cpp @@ -881,7 +881,7 @@ static inline bool isAnonymousWhitespace( RenderObject* o ) { return false; RenderObject *fc = o->firstChild(); return fc && fc == o->lastChild() && fc->isText() && static_cast<RenderText *>(fc)->stringLength() == 1 && - static_cast<RenderText *>(fc)->text()[0].tqunicode() == ' '; + static_cast<RenderText *>(fc)->text()[0].unicode() == ' '; } RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo& compactInfo, const MarginInfo& marginInfo, bool& handled) diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp index 1dda168c2..7400752ac 100644 --- a/khtml/rendering/render_box.cpp +++ b/khtml/rendering/render_box.cpp @@ -346,7 +346,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty) } if( !bgColor.isValid() && canvas()->view()) - bgColor = canvas()->view()->tqpalette().active().color(TQColorGroup::Base); + bgColor = canvas()->view()->palette().active().color(TQColorGroup::Base); int w = width(); int h = height(); diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp index 6fdf45849..e8540eba6 100644 --- a/khtml/rendering/render_canvas.cpp +++ b/khtml/rendering/render_canvas.cpp @@ -329,7 +329,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& paintInfo, int /*_tx*/, int /* if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view()) return; - paintInfo.p->fillRect(paintInfo.r, view()->tqpalette().active().color(TQColorGroup::Base)); + paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(TQColorGroup::Base)); } void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool f) diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp index d55b32fe4..a0ac7b732 100644 --- a/khtml/rendering/render_form.cpp +++ b/khtml/rendering/render_form.cpp @@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget ); - TQSize s( cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorWidth ), - cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorHeight ) ); + TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ), + cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget ); - TQSize s( rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), - rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); + TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), + rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -263,14 +263,14 @@ void RenderSubmitButton::calcMinMaxWidth() raw = TQString::fromLatin1("X"); TQFontMetrics fm = pb->fontMetrics(); TQSize ts = fm.size( ShowPrefix, raw); - TQSize s(pb->tqstyle().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts ) + TQSize s(pb->style().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts ) .expandedTo(TQApplication::globalStrut())); - int margin = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, pb) + - pb->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; + int margin = pb->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) + + pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; int w = ts.width() + margin; int h = s.height(); if (pb->isDefault() || pb->autoDefault()) { - int dbw = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; + int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; w += dbw; } @@ -805,7 +805,7 @@ void RenderFileButton::calcMinMaxWidth() int h = fm.lineSpacing(); int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some" KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit(); - TQSize s = edit->tqstyle().tqsizeFromContents(TQStyle::CT_LineEdit, + TQSize s = edit->style().tqsizeFromContents(TQStyle::CT_LineEdit, edit, TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) .expandedTo(TQApplication::globalStrut()); diff --git a/khtml/rendering/render_generated.cpp b/khtml/rendering/render_generated.cpp index ba80a5aa1..17c65fc9c 100644 --- a/khtml/rendering/render_generated.cpp +++ b/khtml/rendering/render_generated.cpp @@ -53,7 +53,7 @@ void RenderCounterBase::calcMinMaxWidth() generateContent(); if (str) str->deref(); - str = new DOM::DOMStringImpl(m_item.tqunicode(), m_item.length()); + str = new DOM::DOMStringImpl(m_item.unicode(), m_item.length()); str->ref(); RenderText::calcMinMaxWidth(); diff --git a/khtml/rendering/render_image.cpp b/khtml/rendering/render_image.cpp index 8626580d6..46104adb8 100644 --- a/khtml/rendering/render_image.cpp +++ b/khtml/rendering/render_image.cpp @@ -266,7 +266,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty) if ( !berrorPic ) { //qDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, cWidth, cHeight); qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight, - KApplication::tqpalette().inactive(), true, 1 ); + KApplication::palette().inactive(), true, 1 ); } TQPixmap const* pix = i ? &i->pixmap() : 0; if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) ) diff --git a/khtml/rendering/render_layer.cpp b/khtml/rendering/render_layer.cpp index 96b0236cb..2b7e93f1f 100644 --- a/khtml/rendering/render_layer.cpp +++ b/khtml/rendering/render_layer.cpp @@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth() #ifdef APPLE_CHANGES return m_vBar->width(); #else - return m_vBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); + return m_vBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent); #endif } @@ -650,7 +650,7 @@ int RenderLayer::horizontalScrollbarHeight() #ifdef APPLE_CHANGES return m_hBar->height(); #else - return m_hBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); + return m_hBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent); #endif } @@ -691,7 +691,7 @@ void RenderLayer::positionScrollbars(const TQRect& absBounds) TQScrollBar *b = m_hBar; if (!m_hBar) b = m_vBar; - int sw = b->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); + int sw = b->style().pixelMetric(TQStyle::PM_ScrollBarExtent); if (m_vBar) { TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1); diff --git a/khtml/rendering/render_style.cpp b/khtml/rendering/render_style.cpp index ecbbf6de2..a71dd4116 100644 --- a/khtml/rendering/render_style.cpp +++ b/khtml/rendering/render_style.cpp @@ -786,7 +786,7 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const !(noninherited_flags.f._position == other->noninherited_flags.f._position) || !(noninherited_flags.f._floating == other->noninherited_flags.f._floating) || !(noninherited_flags.f._flowAroundFloats == other->noninherited_flags.f._flowAroundFloats) || - !(noninherited_flags.f._tqunicodeBidi == other->noninherited_flags.f._tqunicodeBidi) ) + !(noninherited_flags.f._unicodeBidi == other->noninherited_flags.f._unicodeBidi) ) return CbLayout; } diff --git a/khtml/rendering/render_style.h b/khtml/rendering/render_style.h index 59e38277d..80d052980 100644 --- a/khtml/rendering/render_style.h +++ b/khtml/rendering/render_style.h @@ -919,7 +919,7 @@ protected: PseudoId _styleType : 4; bool _hasClip : 1; unsigned _pseudoBits : 8; - EUnicodeBidi _tqunicodeBidi : 2; + EUnicodeBidi _unicodeBidi : 2; // non CSS2 non-inherited bool _textOverflow : 1; // Whether or not lines that spill out should be truncated with "..." @@ -991,7 +991,7 @@ protected: noninherited_flags.f._styleType = NOPSEUDO; noninherited_flags.f._hasClip = false; noninherited_flags.f._pseudoBits = 0; - noninherited_flags.f._tqunicodeBidi = initialUnicodeBidi(); + noninherited_flags.f._unicodeBidi = initialUnicodeBidi(); noninherited_flags.f._textOverflow = initialTextOverflow(); noninherited_flags.f.unused = 0; } @@ -1108,7 +1108,7 @@ public: LengthBox clip() const { return visual->clip; } bool hasClip() const { return noninherited_flags.f._hasClip; } - EUnicodeBidi tqunicodeBidi() const { return noninherited_flags.f._tqunicodeBidi; } + EUnicodeBidi unicodeBidi() const { return noninherited_flags.f._unicodeBidi; } EClear clear() const { return noninherited_flags.f._clear; } ETableLayout tableLayout() const { return noninherited_flags.f._table_layout; } @@ -1272,7 +1272,7 @@ public: void setClip( Length top, Length right, Length bottom, Length left ); void setHasClip( bool b ) { noninherited_flags.f._hasClip = b; } - void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags.f._tqunicodeBidi = b; } + void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags.f._unicodeBidi = b; } void setClear(EClear v) { noninherited_flags.f._clear = v; } void setTableLayout(ETableLayout v) { noninherited_flags.f._table_layout = v; } diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp index 58c9c33df..f5fa2e373 100644 --- a/khtml/rendering/render_text.cpp +++ b/khtml/rendering/render_text.cpp @@ -1036,7 +1036,7 @@ void RenderText::calcMinMaxWidth() bool firstLine = true; for(int i = 0; i < len; i++) { - unsigned short c = str->s[i].tqunicode(); + unsigned short c = str->s[i].unicode(); bool isNewline = false; // If line-breaks survive to here they are preserved @@ -1056,7 +1056,7 @@ void RenderText::calcMinMaxWidth() continue; int wordlen = 0; - while( i+wordlen < len && (i+wordlen == 0 || str->s[i+wordlen].tqunicode() != SOFT_HYPHEN) && + while( i+wordlen < len && (i+wordlen == 0 || str->s[i+wordlen].unicode() != SOFT_HYPHEN) && !(isBreakable( str->s, i+wordlen, str->l )) ) wordlen++; @@ -1470,7 +1470,7 @@ static TQString quoteAndEscapeNonPrintables(const TQString &s) } else if (c == '"') { result += "\\\""; } else { - ushort u = c.tqunicode(); + ushort u = c.unicode(); if (u >= 0x20 && u < 0x7F) { result += c; } else { diff --git a/khtml/rendering/render_text.h b/khtml/rendering/render_text.h index fabf5e051..50132fbc7 100644 --- a/khtml/rendering/render_text.h +++ b/khtml/rendering/render_text.h @@ -36,7 +36,7 @@ class TQPainter; class TQFontMetrics; -// Define a constant for soft hyphen's tqunicode value. +// Define a constant for soft hyphen's unicode value. #define SOFT_HYPHEN 173 const int cNoTruncation = -1; diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp index 60a683bd8..7472eb301 100644 --- a/khtml/test_regression.cpp +++ b/khtml/test_regression.cpp @@ -1079,8 +1079,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) pos++; int newpos = absBase.find('/', pos); if (newpos == -1) newpos = absBase.length(); - TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); - TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); + TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos); + TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos); // kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl; // kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl; // kdDebug() << "pos: " << pos << " newpos: " << newpos << endl; @@ -1094,8 +1094,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) TQString rel; { - TQConstString relBase(absBase.tqunicode() + basepos, absBase.length() - basepos); - TQConstString relPath(absPath.tqunicode() + pathpos, absPath.length() - pathpos); + TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos); + TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos); // generate as many .. as there are path elements in relBase if (relBase.string().length() > 0) { for (int i = relBase.string().contains('/'); i > 0; --i) diff --git a/khtml/xml/dom2_eventsimpl.cpp b/khtml/xml/dom2_eventsimpl.cpp index 596edfbaa..5121e9caf 100644 --- a/khtml/xml/dom2_eventsimpl.cpp +++ b/khtml/xml/dom2_eventsimpl.cpp @@ -590,10 +590,10 @@ KeyEventBaseImpl::KeyEventBaseImpl(EventId id, bool canBubbleArg, bool cancelabl m_keyVal = key->ascii(); m_virtKeyVal = virtKeyToQtKey()->toLeft(key->key()); - // m_keyVal should contain the tqunicode value + // m_keyVal should contain the unicode value // of the pressed key if available. if (m_virtKeyVal == DOM_VK_UNDEFINED && !key->text().isEmpty()) - m_keyVal = TQString(key->text()).tqunicode()[0]; + m_keyVal = TQString(key->text()).unicode()[0]; // key->state returns enum ButtonState, which is ShiftButton, ControlButton and AltButton or'ed together. m_modifier = key->state(); @@ -741,8 +741,8 @@ DOMString KeyboardEventImpl::keyIdentifier() const if (const char* id = keyIdentifiersToVirtKeys()->toLeft(special)) return TQString::fromLatin1(id); - if (unsigned tqunicode = keyVal()) - return TQString(TQChar(tqunicode)); + if (unsigned unicode = keyVal()) + return TQString(TQChar(unicode)); return "Unidentified"; } @@ -773,9 +773,9 @@ void KeyboardEventImpl::initKeyboardEvent(const DOMString &typeArg, //Figure out the code information from the key identifier. if (keyIdentifierArg.length() == 1) { - //Likely to be normal tqunicode id, unless it's one of the few + //Likely to be normal unicode id, unless it's one of the few //special values. - unsigned short code = keyIdentifierArg.tqunicode()[0]; + unsigned short code = keyIdentifierArg.unicode()[0]; if (code > 0x20 && code != 0x7F) keyVal = code; } @@ -819,7 +819,7 @@ int KeyboardEventImpl::keyCode() const if (m_virtKeyVal != DOM_VK_UNDEFINED) return m_virtKeyVal; else - return TQChar((unsigned short)m_keyVal).upper().tqunicode(); + return TQChar((unsigned short)m_keyVal).upper().unicode(); } int KeyboardEventImpl::charCode() const @@ -856,14 +856,14 @@ void TextEventImpl::initTextEvent(const DOMString &typeArg, //See whether we can get a key out of this. unsigned keyCode = 0; if (text.length() == 1) - keyCode = text.tqunicode()[0].tqunicode(); + keyCode = text.unicode()[0].unicode(); initKeyBaseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, keyCode, 0, 0); } int TextEventImpl::keyCode() const { - //Mozilla returns 0 here unless this is a non-tqunicode key. + //Mozilla returns 0 here unless this is a non-unicode key. //IE stuffs everything here, and so we try to match it.. if (m_keyVal) return m_keyVal; @@ -872,8 +872,8 @@ int TextEventImpl::keyCode() const int TextEventImpl::charCode() const { - //On text events, in Mozilla charCode is 0 for non-tqunicode keys, - //and the tqunicode key otherwise... IE doesn't support this. + //On text events, in Mozilla charCode is 0 for non-unicode keys, + //and the unicode key otherwise... IE doesn't support this. if (m_virtKeyVal) return 0; return m_keyVal; diff --git a/khtml/xml/dom_docimpl.cpp b/khtml/xml/dom_docimpl.cpp index 0b7f566de..922714a4e 100644 --- a/khtml/xml/dom_docimpl.cpp +++ b/khtml/xml/dom_docimpl.cpp @@ -337,7 +337,7 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v) m_namespaceMap = new IdNameMapping(1); TQString xhtml(XHTML_NAMESPACE); m_namespaceMap->names.insert(emptyNamespace, new DOMStringImpl("")); - m_namespaceMap->names.insert(xhtmlNamespace, new DOMStringImpl(xhtml.tqunicode(), xhtml.length())); + m_namespaceMap->names.insert(xhtmlNamespace, new DOMStringImpl(xhtml.unicode(), xhtml.length())); m_namespaceMap->names[emptyNamespace]->ref(); m_namespaceMap->names[xhtmlNamespace]->ref(); m_namespaceMap->count+=2; diff --git a/khtml/xml/dom_docimpl.h b/khtml/xml/dom_docimpl.h index 8d20f47e6..5e50c09a4 100644 --- a/khtml/xml/dom_docimpl.h +++ b/khtml/xml/dom_docimpl.h @@ -198,7 +198,7 @@ public: DocumentFragmentImpl *createDocumentFragment (); TextImpl *createTextNode ( DOMStringImpl* data ) { return new TextImpl( docPtr(), data); } TextImpl *createTextNode ( const TQString& data ) - { return createTextNode(new DOMStringImpl(data.tqunicode(), data.length())); } + { return createTextNode(new DOMStringImpl(data.unicode(), data.length())); } CommentImpl *createComment ( DOMStringImpl* data ); CDATASectionImpl *createCDATASection ( DOMStringImpl* data ); ProcessingInstructionImpl *createProcessingInstruction ( const DOMString &target, DOMStringImpl* data ); diff --git a/khtml/xml/dom_elementimpl.cpp b/khtml/xml/dom_elementimpl.cpp index f4506c8ba..c41bef3dc 100644 --- a/khtml/xml/dom_elementimpl.cpp +++ b/khtml/xml/dom_elementimpl.cpp @@ -855,7 +855,7 @@ DOMString ElementImpl::toString() const for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) { DOMString kid = child->toString(); - result += TQConstString(kid.tqunicode(), kid.length()).string(); + result += TQConstString(kid.unicode(), kid.length()).string(); } result += "</"; diff --git a/khtml/xml/dom_nodeimpl.cpp b/khtml/xml/dom_nodeimpl.cpp index 0af9c75a2..5febe695e 100644 --- a/khtml/xml/dom_nodeimpl.cpp +++ b/khtml/xml/dom_nodeimpl.cpp @@ -989,7 +989,7 @@ DOMStringImpl* NodeImpl::textContent() const delete kidText; } } - return new DOMStringImpl(out.tqunicode(), out.length()); + return new DOMStringImpl(out.unicode(), out.length()); } //------------------------------------------------------------------------- diff --git a/khtml/xml/dom_stringimpl.cpp b/khtml/xml/dom_stringimpl.cpp index 14aa4f5ea..79bddf5d9 100644 --- a/khtml/xml/dom_stringimpl.cpp +++ b/khtml/xml/dom_stringimpl.cpp @@ -61,8 +61,8 @@ bool DOMStringImpl::containsOnlyWhitespace() const for (uint i = 0; i < l; i++) { TQChar c = s[i]; - if (c.tqunicode() <= 0x7F) { - if (c.tqunicode() > ' ') + if (c.unicode() <= 0x7F) { + if (c.unicode() > ' ') return false; } else { if (c.direction() != TQChar::DirWS) @@ -294,10 +294,10 @@ khtml::Length* DOMStringImpl::toCoordsArray(int& len) const int pos2; while((pos2 = str.find(' ', pos)) != -1) { - r[i++] = parseLength((TQChar *) str.tqunicode()+pos, pos2-pos); + r[i++] = parseLength((TQChar *) str.unicode()+pos, pos2-pos); pos = pos2+1; } - r[i] = parseLength((TQChar *) str.tqunicode()+pos, str.length()-pos); + r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos); return r; } @@ -320,13 +320,13 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const int pos2; while((pos2 = str.find(',', pos)) != -1) { - r[i++] = parseLength((TQChar *) str.tqunicode()+pos, pos2-pos); + r[i++] = parseLength((TQChar *) str.unicode()+pos, pos2-pos); pos = pos2+1; } /* IE Quirk: If the last comma is the last char skip it and reduce len by one */ if (str.length()-pos > 0) - r[i] = parseLength((TQChar *) str.tqunicode()+pos, str.length()-pos); + r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos); else len--; diff --git a/khtml/xml/dom_stringimpl.h b/khtml/xml/dom_stringimpl.h index edac46755..cd7128967 100644 --- a/khtml/xml/dom_stringimpl.h +++ b/khtml/xml/dom_stringimpl.h @@ -92,7 +92,7 @@ public: DOMStringImpl *capitalize(bool noFirstCap=false) const; DOMStringImpl *escapeHTML(); - TQChar *tqunicode() const { return s; } + TQChar *unicode() const { return s; } uint length() const { return l; } TQString string() const; diff --git a/khtml/xml/xml_tokenizer.cpp b/khtml/xml/xml_tokenizer.cpp index 8f6164f51..7c043815a 100644 --- a/khtml/xml/xml_tokenizer.cpp +++ b/khtml/xml/xml_tokenizer.cpp @@ -42,7 +42,7 @@ using namespace DOM; using namespace khtml; XMLIncrementalSource::XMLIncrementalSource() - : TQXmlInputSource(), m_pos( 0 ), m_tqunicode( 0 ), + : TQXmlInputSource(), m_pos( 0 ), m_unicode( 0 ), m_finished( false ) { } @@ -59,13 +59,13 @@ TQChar XMLIncrementalSource::next() else if ( m_data.length() <= m_pos ) return TQXmlInputSource::EndOfData; else - return m_tqunicode[m_pos++]; + return m_unicode[m_pos++]; } void XMLIncrementalSource::setData( const TQString& str ) { m_data = str; - m_tqunicode = m_data.tqunicode(); + m_unicode = m_data.unicode(); m_pos = 0; if ( !str.isEmpty() ) m_finished = false; @@ -78,7 +78,7 @@ void XMLIncrementalSource::setData( const TQByteArray& data ) void XMLIncrementalSource::appendXML( const TQString& str ) { m_data += str; - m_tqunicode = m_data.tqunicode(); + m_unicode = m_data.unicode(); } TQString XMLIncrementalSource::data() @@ -289,7 +289,7 @@ bool XMLHandler::comment(const TQString & ch) if (currentNode()->nodeType() == Node::TEXT_NODE) exitText(); // ### handle exceptions - currentNode()->addChild(m_doc->createComment(new DOMStringImpl(ch.tqunicode(), ch.length()))); + currentNode()->addChild(m_doc->createComment(new DOMStringImpl(ch.unicode(), ch.length()))); return true; } @@ -299,7 +299,7 @@ bool XMLHandler::processingInstruction(const TQString &target, const TQString &d exitText(); // ### handle exceptions ProcessingInstructionImpl *pi = - m_doc->createProcessingInstruction(target, new DOMStringImpl(data.tqunicode(), data.length())); + m_doc->createProcessingInstruction(target, new DOMStringImpl(data.unicode(), data.length())); currentNode()->addChild(pi); pi->checkStyleSheet(); return true; @@ -364,7 +364,7 @@ bool XMLHandler::internalEntityDecl(const TQString &name, const TQString &value) { EntityImpl *e = new EntityImpl(m_doc,name); // ### further parse entities inside the value and add them as separate nodes (or entityreferences)? - e->addChild(m_doc->createTextNode(new DOMStringImpl(value.tqunicode(), value.length()))); + e->addChild(m_doc->createTextNode(new DOMStringImpl(value.unicode(), value.length()))); if (m_doc->doctype()) static_cast<GenericRONamedNodeMapImpl*>(m_doc->doctype()->entities())->addNode(e); return true; diff --git a/khtml/xml/xml_tokenizer.h b/khtml/xml/xml_tokenizer.h index d2910472e..749c423ff 100644 --- a/khtml/xml/xml_tokenizer.h +++ b/khtml/xml/xml_tokenizer.h @@ -155,7 +155,7 @@ public: private: TQString m_data; uint m_pos; - const TQChar *m_tqunicode; + const TQChar *m_unicode; bool m_finished; }; |