diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /khtml/html | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/html')
-rw-r--r-- | khtml/html/Makefile.am | 2 | ||||
-rw-r--r-- | khtml/html/doctypes.cpp | 4 | ||||
-rw-r--r-- | khtml/html/dtd.cpp | 2 | ||||
-rw-r--r-- | khtml/html/dtd.dtd | 52 | ||||
-rw-r--r-- | khtml/html/dtd.h | 4 | ||||
-rw-r--r-- | khtml/html/html_baseimpl.cpp | 4 | ||||
-rw-r--r-- | khtml/html/html_documentimpl.cpp | 50 | ||||
-rw-r--r-- | khtml/html/html_elementimpl.cpp | 38 | ||||
-rw-r--r-- | khtml/html/html_elementimpl.h | 2 | ||||
-rw-r--r-- | khtml/html/html_formimpl.cpp | 54 | ||||
-rw-r--r-- | khtml/html/html_formimpl.h | 2 | ||||
-rw-r--r-- | khtml/html/html_headimpl.cpp | 12 | ||||
-rw-r--r-- | khtml/html/html_imageimpl.cpp | 30 | ||||
-rw-r--r-- | khtml/html/html_imageimpl.h | 4 | ||||
-rw-r--r-- | khtml/html/html_miscimpl.cpp | 6 | ||||
-rw-r--r-- | khtml/html/html_miscimpl.h | 2 | ||||
-rw-r--r-- | khtml/html/html_objectimpl.cpp | 6 | ||||
-rw-r--r-- | khtml/html/html_tableimpl.cpp | 20 | ||||
-rw-r--r-- | khtml/html/html_tableimpl.h | 6 | ||||
-rw-r--r-- | khtml/html/htmlparser.cpp | 8 | ||||
-rw-r--r-- | khtml/html/htmlparser.h | 2 | ||||
-rw-r--r-- | khtml/html/htmltokenizer.cpp | 42 | ||||
-rw-r--r-- | khtml/html/htmltokenizer.h | 6 |
23 files changed, 179 insertions, 179 deletions
diff --git a/khtml/html/Makefile.am b/khtml/html/Makefile.am index 343254bd5..ed7722517 100644 --- a/khtml/html/Makefile.am +++ b/khtml/html/Makefile.am @@ -47,7 +47,7 @@ INCLUDES = -I$(top_srcdir)/kimgio -I$(top_srcdir)/dcop \ # Use "make doctypes" to regenerate doctypes.cpp from doctypes.gperf doctypes: $(srcdir)/doctypes.gperf $(srcdir)/Makefile.am - gperf -CEot -L "ANSI-C" -k "*" -N tqfindDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(srcdir)/doctypes.gperf > $(srcdir)/doctypes.cpp + gperf -CEot -L "ANSI-C" -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(srcdir)/doctypes.gperf > $(srcdir)/doctypes.cpp #html_documentimpl.lo: doctypes.cpp .PHONY: doctypes diff --git a/khtml/html/doctypes.cpp b/khtml/html/doctypes.cpp index 68bfe4207..e79a56f34 100644 --- a/khtml/html/doctypes.cpp +++ b/khtml/html/doctypes.cpp @@ -1,5 +1,5 @@ /* ANSI-C code produced by gperf version 3.0.1 */ -/* Command-line: gperf -CEot -L ANSI-C -k '*' -N tqfindDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards /opt/src/kde/kdelibs/khtml/html/doctypes.gperf */ +/* Command-line: gperf -CEot -L ANSI-C -k '*' -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards /opt/src/kde/kdelibs/khtml/html/doctypes.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ @@ -334,7 +334,7 @@ hash (register const char *str, register unsigned int len) __inline #endif const struct PubIDInfo * -tqfindDoctypeEntry (register const char *str, register unsigned int len) +findDoctypeEntry (register const char *str, register unsigned int len) { enum { diff --git a/khtml/html/dtd.cpp b/khtml/html/dtd.cpp index 02cf81482..accc8b855 100644 --- a/khtml/html/dtd.cpp +++ b/khtml/html/dtd.cpp @@ -152,7 +152,7 @@ const unsigned short KDE_NO_EXPORT DOM::tagPriority[] = { 0, // ID_TEXT }; -const tagtqStatus DOM::endTag[] = { +const tagStatus DOM::endTag[] = { REQUIRED, // 0 REQUIRED, // ID_A == 1 REQUIRED, // ID_ABBR diff --git a/khtml/html/dtd.dtd b/khtml/html/dtd.dtd index f451f3c0f..d6a5ac8f0 100644 --- a/khtml/html/dtd.dtd +++ b/khtml/html/dtd.dtd @@ -310,7 +310,7 @@ <!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ATTLIST DIV %attrs; -- %coreattrs, %i18n, %events -- - %align; -- align, text tqalignment -- + %align; -- align, text alignment -- %reserved; -- reserved for possible future use -- > @@ -336,7 +336,7 @@ rel %LinkTypes; #IMPLIED -- forward link types -- rev %LinkTypes; #IMPLIED -- reverse link types -- accesskey %Character; #IMPLIED -- accessibility key character -- - tqshape %Shape; rect -- for use with client-side image maps -- + shape %Shape; rect -- for use with client-side image maps -- coords %Coords; #IMPLIED -- for use with client-side image maps -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- @@ -357,7 +357,7 @@ <!ELEMENT AREA - O EMPTY -- client-side image map area --> <!ATTLIST AREA %attrs; -- %coreattrs, %i18n, %events -- - tqshape %Shape; rect -- controls interpretation of coords -- + shape %Shape; rect -- controls interpretation of coords -- coords %Coords; #IMPLIED -- comma separated list of lengths -- href %URI; #IMPLIED -- URI for linked resource -- target %FrameTarget; #IMPLIED -- render in this frame -- @@ -425,7 +425,7 @@ width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- - align %IAlign; #IMPLIED -- vertical or horizontal tqalignment -- + align %IAlign; #IMPLIED -- vertical or horizontal alignment -- border %Length; #IMPLIED -- link border width -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- @@ -458,7 +458,7 @@ usemap %URI; #IMPLIED -- use client-side image map -- name CDATA #IMPLIED -- submit as part of form -- tabindex NUMBER #IMPLIED -- position in tabbing order -- - align %IAlign; #IMPLIED -- vertical or horizontal tqalignment -- + align %IAlign; #IMPLIED -- vertical or horizontal alignment -- border %Length; #IMPLIED -- link border width -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- @@ -488,10 +488,10 @@ code CDATA #IMPLIED -- applet class file -- object CDATA #IMPLIED -- serialized applet file -- alt %Text; #IMPLIED -- short description -- - name CDATA #IMPLIED -- allows applets to tqfind each other -- + name CDATA #IMPLIED -- allows applets to find each other -- width %Length; #REQUIRED -- initial width -- height %Length; #REQUIRED -- initial height -- - align %IAlign; #IMPLIED -- vertical or horizontal tqalignment -- + align %IAlign; #IMPLIED -- vertical or horizontal alignment -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- > @@ -513,7 +513,7 @@ <!ELEMENT P - O (%inline;)* -- paragraph --> <!ATTLIST P %attrs; -- %coreattrs, %i18n, %events -- - %align; -- align, text tqalignment -- + %align; -- align, text alignment -- > <!--=================== Headings =========================================--> @@ -526,7 +526,7 @@ <!ELEMENT (%heading;) - - (%inline;)* -- heading --> <!ATTLIST (%heading;) %attrs; -- %coreattrs, %i18n, %events -- - %align; -- align, text tqalignment -- + %align; -- align, text alignment -- > <!--=================== Preformatted Text ================================--> @@ -687,7 +687,7 @@ onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- - align %IAlign; #IMPLIED -- vertical or horizontal tqalignment -- + align %IAlign; #IMPLIED -- vertical or horizontal alignment -- %reserved; -- reserved for possible future use -- > @@ -804,14 +804,14 @@ <!-- horizontal placement of table relative to document --> <!ENTITY % TAlign "(left|center|right)"> -<!-- horizontal tqalignment attributes for cell contents --> +<!-- horizontal alignment attributes for cell contents --> <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED - char %Character; #IMPLIED -- tqalignment char, e.g. char=':' -- - charoff %Length; #IMPLIED -- offset for tqalignment char --" + char %Character; #IMPLIED -- alignment char, e.g. char=':' -- + charoff %Length; #IMPLIED -- offset for alignment char --" > -<!-- vertical tqalignment attributes for cell contents --> +<!-- vertical alignment attributes for cell contents --> <!ENTITY % cellvalign "valign (top|middle|bottom|baseline) #IMPLIED" > @@ -857,12 +857,12 @@ several semantically related columns together. %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- default number of columns in group -- width %MultiLength; #IMPLIED -- default width for enclosed COLs -- - %cellhalign; -- horizontal tqalignment in cells -- - %cellvalign; -- vertical tqalignment in cells -- + %cellhalign; -- horizontal alignment in cells -- + %cellvalign; -- vertical alignment in cells -- > <!-- - COL elements define the tqalignment properties for cells in + COL elements define the alignment properties for cells in one or more columns. The WIDTH attribute specifies the width of the columns, e.g. @@ -877,8 +877,8 @@ several semantically related columns together. %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- COL attributes affect N columns -- width %MultiLength; #IMPLIED -- column width specification -- - %cellhalign; -- horizontal tqalignment in cells -- - %cellvalign; -- vertical tqalignment in cells -- + %cellhalign; -- horizontal alignment in cells -- + %cellvalign; -- vertical alignment in cells -- > <!-- @@ -895,14 +895,14 @@ several semantically related columns together. --> <!ATTLIST (THEAD|TBODY|TFOOT) -- table section -- %attrs; -- %coreattrs, %i18n, %events -- - %cellhalign; -- horizontal tqalignment in cells -- - %cellvalign; -- vertical tqalignment in cells -- + %cellhalign; -- horizontal alignment in cells -- + %cellvalign; -- vertical alignment in cells -- > <!ATTLIST TR -- table row -- %attrs; -- %coreattrs, %i18n, %events -- - %cellhalign; -- horizontal tqalignment in cells -- - %cellvalign; -- vertical tqalignment in cells -- + %cellhalign; -- horizontal alignment in cells -- + %cellvalign; -- vertical alignment in cells -- bgcolor %Color; #IMPLIED -- background color for row -- > @@ -919,8 +919,8 @@ several semantically related columns together. scope %Scope; #IMPLIED -- scope covered by header cells -- rowspan NUMBER 1 -- number of rows spanned by cell -- colspan NUMBER 1 -- number of cols spanned by cell -- - %cellhalign; -- horizontal tqalignment in cells -- - %cellvalign; -- vertical tqalignment in cells -- + %cellhalign; -- horizontal alignment in cells -- + %cellvalign; -- vertical alignment in cells -- nowrap (nowrap) #IMPLIED -- suppress word wrap -- bgcolor %Color; #IMPLIED -- cell background color -- width %Pixels; #IMPLIED -- width for cell -- @@ -973,7 +973,7 @@ several semantically related columns together. marginwidth %Pixels; #IMPLIED -- margin widths in pixels -- marginheight %Pixels; #IMPLIED -- margin height in pixels -- scrolling (yes|no|auto) auto -- scrollbar or none -- - align %IAlign; #IMPLIED -- vertical or horizontal tqalignment -- + align %IAlign; #IMPLIED -- vertical or horizontal alignment -- height %Length; #IMPLIED -- frame height -- width %Length; #IMPLIED -- frame width -- > diff --git a/khtml/html/dtd.h b/khtml/html/dtd.h index 30d97a280..4192ce51c 100644 --- a/khtml/html/dtd.h +++ b/khtml/html/dtd.h @@ -30,12 +30,12 @@ namespace DOM void addForbidden(int tagId, ushort *forbiddenTags); void removeForbidden(int tagId, ushort *forbiddenTags); -enum tagtqStatus { OPTIONAL, REQUIRED, FORBIDDEN }; +enum tagStatus { OPTIONAL, REQUIRED, FORBIDDEN }; bool checkChild(ushort tagID, ushort childID, bool strict = false); extern const unsigned short tagPriority[]; -extern const tagtqStatus endTag[]; +extern const tagStatus endTag[]; } //namespace DOM #endif diff --git a/khtml/html/html_baseimpl.cpp b/khtml/html/html_baseimpl.cpp index b73d68257..9ebe26242 100644 --- a/khtml/html/html_baseimpl.cpp +++ b/khtml/html/html_baseimpl.cpp @@ -382,7 +382,7 @@ void HTMLFrameElementImpl::setLocation( const DOMString& str ) // load the frame contents KHTMLView *w = getDocument()->view(); if (w) { - KHTMLPart *part = w->part()->tqfindFrame( name.string() ); + KHTMLPart *part = w->part()->findFrame( name.string() ); if ( part ) { part->openURL( KURL( getDocument()->completeURL( url.string() ) ) ); } else { @@ -570,7 +570,7 @@ void HTMLFrameSetElementImpl::recalcStyle( StyleChange ch ) { if (changed() && m_render) { m_render->setNeedsLayout(true); -// m_render->tqlayout(); +// m_render->layout(); setChanged(false); } HTMLElementImpl::recalcStyle( ch ); diff --git a/khtml/html/html_documentimpl.cpp b/khtml/html/html_documentimpl.cpp index 413079483..e2ee3ba57 100644 --- a/khtml/html/html_documentimpl.cpp +++ b/khtml/html/html_documentimpl.cpp @@ -110,15 +110,15 @@ DOMString HTMLDocumentImpl::cookie() const long windowId = 0; KHTMLView *v = view (); - if ( v && v->tqtopLevelWidget() ) - windowId = v->tqtopLevelWidget()->winId(); + if ( v && v->topLevelWidget() ) + windowId = v->topLevelWidget()->winId(); TQCString replyType; TQByteArray params, reply; TQDataStream stream(params, IO_WriteOnly); stream << URL().url() << windowId; if (!kapp->dcopClient()->call("kcookiejar", "kcookiejar", - "tqfindDOMCookies(TQString,long int)", params, + "findDOMCookies(TQString,long int)", params, replyType, reply)) { kdWarning(6010) << "Can't communicate with cookiejar!" << endl; @@ -127,7 +127,7 @@ DOMString HTMLDocumentImpl::cookie() const TQDataStream stream2(reply, IO_ReadOnly); if(replyType != "TQString") { - kdError(6010) << "DCOP function tqfindDOMCookies(...) returns " + kdError(6010) << "DCOP function findDOMCookies(...) returns " << replyType << ", expected TQString" << endl; return DOMString(); } @@ -142,8 +142,8 @@ void HTMLDocumentImpl::setCookie( const DOMString & value ) long windowId = 0; KHTMLView *v = view (); - if ( v && v->tqtopLevelWidget() ) - windowId = v->tqtopLevelWidget()->winId(); + if ( v && v->topLevelWidget() ) + windowId = v->topLevelWidget()->winId(); TQByteArray params; TQDataStream stream(params, IO_WriteOnly); @@ -192,7 +192,7 @@ void HTMLDocumentImpl::setBody(HTMLElementImpl *_body, int& exceptioncode) if ( !b ) documentElement()->appendChild( _body, exceptioncode ); else - documentElement()->tqreplaceChild( _body, b, exceptioncode ); + documentElement()->replaceChild( _body, b, exceptioncode ); } Tokenizer *HTMLDocumentImpl::createTokenizer() @@ -226,18 +226,18 @@ void HTMLDocumentImpl::slotHistoryChanged() return; recalcStyle( Force ); - m_render->tqrepaint(); + m_render->repaint(); } HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url) { TQString url = _url.string(); TQString s; - int pos = url.tqfind('#'); + 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.tqfind(s); + TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.find(s); if (it != mapMap.end()) return *it; @@ -297,7 +297,7 @@ static int parseDocTypePart(const TQString& buffer, int index) else if (ch == '-') { int tmpIndex=index; if (buffer[index+1] == '-' && - ((tmpIndex=buffer.tqfind("--", index+2)) != -1)) + ((tmpIndex=buffer.find("--", index+2)) != -1)) index = tmpIndex+2; else return index; @@ -307,7 +307,7 @@ static int parseDocTypePart(const TQString& buffer, int index) } } -static bool tqcontainsString(const char* str, const TQString& buffer, int offset) +static bool containsString(const char* str, const TQString& buffer, int offset) { TQString startString(str); if (offset + startString.length() > buffer.length()) @@ -330,20 +330,20 @@ static bool parseDocTypeDeclaration(const TQString& buffer, // Skip through any comments and processing instructions. int index = 0; do { - index = buffer.tqfind('<', index); + index = buffer.find('<', index); if (index == -1) break; TQChar nextChar = buffer[index+1]; if (nextChar == '!') { - if (tqcontainsString("doctype", buffer, index+2)) { + if (containsString("doctype", buffer, index+2)) { haveDocType = true; index += 9; // Skip "<!DOCTYPE" break; } index = parseDocTypePart(buffer,index); - index = buffer.tqfind('>', index); + index = buffer.find('>', index); } else if (nextChar == '?') - index = buffer.tqfind('>', index); + index = buffer.find('>', index); else break; } while (index != -1); @@ -353,16 +353,16 @@ static bool parseDocTypeDeclaration(const TQString& buffer, *resultFlags |= PARSEMODE_HAVE_DOCTYPE; index = parseDocTypePart(buffer, index); - if (!tqcontainsString("html", buffer, index)) + if (!containsString("html", buffer, index)) return false; index = parseDocTypePart(buffer, index+4); - bool hasPublic = tqcontainsString("public", buffer, index); + bool hasPublic = containsString("public", buffer, index); if (hasPublic) { index = parseDocTypePart(buffer, index+6); // We've read <!DOCTYPE HTML PUBLIC (not case sensitive). - // Now we tqfind the beginning and end of the public identifers + // Now we find the beginning and end of the public identifers // and system identifiers (assuming they're even present). TQChar theChar = buffer[index]; if (theChar != '\"' && theChar != '\'') @@ -371,7 +371,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, // |start| is the first character (after the quote) and |end| // is the final quote, so there are |end|-|start| characters. int publicIDStart = index+1; - int publicIDEnd = buffer.tqfind(theChar, publicIDStart); + int publicIDEnd = buffer.find(theChar, publicIDStart); if (publicIDEnd == -1) return false; index = parseDocTypePart(buffer, publicIDEnd+1); @@ -385,7 +385,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, // We have a system identifier. *resultFlags |= PARSEMODE_HAVE_SYSTEM_ID; int systemIDStart = index+1; - int systemIDEnd = buffer.tqfind(next, systemIDStart); + int systemIDEnd = buffer.find(next, systemIDStart); if (systemIDEnd == -1) return false; systemID = buffer.mid(systemIDStart, systemIDEnd - systemIDStart); @@ -402,7 +402,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, publicID = publicID.simplifyWhiteSpace(); *resultFlags |= PARSEMODE_HAVE_PUBLIC_ID; } else { - if (tqcontainsString("system", buffer, index)) { + if (containsString("system", buffer, index)) { // Doctype has a system ID but no public ID *resultFlags |= PARSEMODE_HAVE_SYSTEM_ID; index = parseDocTypePart(buffer, index+6); @@ -410,7 +410,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, if (next != '\"' && next != '\'') return false; int systemIDStart = index+1; - int systemIDEnd = buffer.tqfind(next, systemIDStart); + int systemIDEnd = buffer.find(next, systemIDStart); if (systemIDEnd == -1) return false; systemID = buffer.mid(systemIDStart, systemIDEnd - systemIDStart); @@ -473,7 +473,7 @@ void HTMLDocumentImpl::determineParseMode( const TQString &str ) const char* pubIDStr = lowerPubID.latin1(); // Look up the entry in our gperf-generated table. - const PubIDInfo* doctypeEntry = tqfindDoctypeEntry(pubIDStr, publicID.length()); + const PubIDInfo* doctypeEntry = findDoctypeEntry(pubIDStr, publicID.length()); if (!doctypeEntry) { // The DOCTYPE is not in the list. Assume strict mode. // ### Doesn't make any sense, but it's what Mozilla does. diff --git a/khtml/html/html_elementimpl.cpp b/khtml/html/html_elementimpl.cpp index f7a082f77..e6269d8b5 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++; @@ -321,7 +321,7 @@ void HTMLElementImpl::addCSSLength(int id, const DOMString &value, bool numOnly, int v = kClamp( TQConstString(s, i).string().toInt(), -8192, 8191 ) ; const char* suffix = "px"; if (!numOnly || multiLength) { - // look if we tqfind a % or * + // look if we find a % or * while (i < l) { if (multiLength && s[i] == '*') { suffix = ""; @@ -354,11 +354,11 @@ static inline bool isHexDigit( const TQChar &c ) { static inline int toHex( const TQChar &c ) { return ( (c >= '0' && c <= '9') - ? (c.tqunicode() - '0') + ? (c.unicode() - '0') : ( ( c >= 'a' && c <= 'f' ) - ? (c.tqunicode() - 'a' + 10) + ? (c.unicode() - 'a' + 10) : ( ( c >= 'A' && c <= '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; } @@ -469,7 +469,7 @@ DOMString HTMLElementImpl::innerText() const return text; const NodeImpl *n = this; - // tqfind the next text/image after the anchor, to get a position + // find the next text/image after the anchor, to get a position while(n) { if(n->firstChild()) n = n->firstChild(); @@ -620,32 +620,32 @@ void HTMLElementImpl::setInnerText( const DOMString &text, int& exceptioncode ) appendChild( t, exceptioncode ); } -void HTMLElementImpl::addHTMLAlignment( DOMString tqalignment ) +void HTMLElementImpl::addHTMLAlignment( DOMString alignment ) { - //qDebug("tqalignment is %s", tqalignment.string().latin1() ); - // vertical tqalignment with respect to the current baseline of the text + //qDebug("alignment is %s", alignment.string().latin1() ); + // vertical alignment with respect to the current baseline of the text // right or left means floating images int propfloat = -1; int propvalign = -1; - if ( strcasecmp( tqalignment, "absmiddle" ) == 0 ) { + if ( strcasecmp( alignment, "absmiddle" ) == 0 ) { propvalign = CSS_VAL_MIDDLE; - } else if ( strcasecmp( tqalignment, "absbottom" ) == 0 ) { + } else if ( strcasecmp( alignment, "absbottom" ) == 0 ) { propvalign = CSS_VAL_BOTTOM; - } else if ( strcasecmp( tqalignment, "left" ) == 0 ) { + } else if ( strcasecmp( alignment, "left" ) == 0 ) { propfloat = CSS_VAL_LEFT; propvalign = CSS_VAL_TOP; - } else if ( strcasecmp( tqalignment, "right" ) == 0 ) { + } else if ( strcasecmp( alignment, "right" ) == 0 ) { propfloat = CSS_VAL_RIGHT; propvalign = CSS_VAL_TOP; - } else if ( strcasecmp( tqalignment, "top" ) == 0 ) { + } else if ( strcasecmp( alignment, "top" ) == 0 ) { propvalign = CSS_VAL_TOP; - } else if ( strcasecmp( tqalignment, "middle" ) == 0 ) { + } else if ( strcasecmp( alignment, "middle" ) == 0 ) { propvalign = CSS_VAL__KHTML_BASELINE_MIDDLE; - } else if ( strcasecmp( tqalignment, "center" ) == 0 ) { + } else if ( strcasecmp( alignment, "center" ) == 0 ) { propvalign = CSS_VAL_MIDDLE; - } else if ( strcasecmp( tqalignment, "bottom" ) == 0 ) { + } else if ( strcasecmp( alignment, "bottom" ) == 0 ) { propvalign = CSS_VAL_BASELINE; - } else if ( strcasecmp ( tqalignment, "texttop") == 0 ) { + } else if ( strcasecmp ( alignment, "texttop") == 0 ) { propvalign = CSS_VAL_TEXT_TOP; } diff --git a/khtml/html/html_elementimpl.h b/khtml/html/html_elementimpl.h index 83836f15d..f71ae9b23 100644 --- a/khtml/html/html_elementimpl.h +++ b/khtml/html/html_elementimpl.h @@ -68,7 +68,7 @@ public: protected: // for IMG, OBJECT and APPLET - void addHTMLAlignment( DOMString tqalignment ); + void addHTMLAlignment( DOMString alignment ); }; class HTMLGenericElementImpl : public HTMLElementImpl diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp index 6ace551ff..a72df3743 100644 --- a/khtml/html/html_formimpl.cpp +++ b/khtml/html/html_formimpl.cpp @@ -122,8 +122,8 @@ static TQCString encodeCString(const TQCString& e) // http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 // safe characters like NS handles them for compatibility static const char *safe = "-._*"; - TQCString encoded(( e.length()+e.tqcontains( '\n' ) )*3 - +e.tqcontains('\r') * 3 + 1); + TQCString encoded(( e.length()+e.contains( '\n' ) )*3 + +e.contains('\r') * 3 + 1); int enclen = 0; bool crmissing = false; unsigned char oldc; @@ -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); } } @@ -216,7 +216,7 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok) TQByteArray form_data(0); TQCString enc_string = ""; // used for non-multipart data - // tqfind out the QTextcodec to use + // find out the QTextcodec to use const TQString str = m_acceptcharset.string(); const TQChar space(' '); const unsigned int strLength = str.length(); @@ -231,7 +231,7 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok) for ( ; it != itEnd; ++it ) { TQString enc = (*it); - if(enc.tqcontains("UNKNOWN")) + if(enc.contains("UNKNOWN")) { // use standard document encoding enc = "ISO 8859-1"; @@ -391,12 +391,12 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok) void HTMLFormElementImpl::setEnctype( const DOMString& type ) { - if(type.string().tqfind("multipart", 0, false) != -1 || type.string().tqfind("form-data", 0, false) != -1) + if(type.string().find("multipart", 0, false) != -1 || type.string().find("form-data", 0, false) != -1) { m_enctype = "multipart/form-data"; m_multipart = true; m_post = true; - } else if (type.string().tqfind("text", 0, false) != -1 || type.string().tqfind("plain", 0, false) != -1) + } else if (type.string().find("text", 0, false) != -1 || type.string().find("plain", 0, false) != -1) { m_enctype = "text/plain"; m_multipart = false; @@ -457,7 +457,7 @@ void HTMLFormElementImpl::walletOpened(KWallet::Wallet *w) { if ((current->inputType() == HTMLInputElementImpl::PASSWORD || current->inputType() == HTMLInputElementImpl::TEXT) && !current->readOnly() && - map.tqcontains(current->name().string())) { + map.contains(current->name().string())) { getDocument()->setFocusNode(current); current->setValue(map[current->name().string()]); } @@ -888,7 +888,7 @@ HTMLFormElementImpl *HTMLGenericFormElementImpl::getForm() const p = p->parentNode(); } #ifdef FORMS_DEBUG - kdDebug( 6030 ) << "couldn't tqfind form!" << endl; + kdDebug( 6030 ) << "couldn't find form!" << endl; kdDebug( 6030 ) << kdBacktrace() << endl; #endif return 0; @@ -1316,10 +1316,10 @@ TQString HTMLInputElementImpl::state( ) { switch (m_type) { case PASSWORD: - return TQString::tqfromLatin1("."); // empty string, avoid restoring + return TQString::fromLatin1("."); // empty string, avoid restoring case CHECKBOX: case RADIO: - return TQString::tqfromLatin1(checked() ? "on" : "off"); + return TQString::fromLatin1(checked() ? "on" : "off"); case TEXT: if (autoComplete() && value() != getAttribute(ATTR_VALUE) && getDocument()->view()) getDocument()->view()->addFormCompletionItem(name().string(), value().string()); @@ -1334,7 +1334,7 @@ void HTMLInputElementImpl::restoreState(const TQString &state) switch (m_type) { case CHECKBOX: case RADIO: - setChecked((state == TQString::tqfromLatin1("on"))); + setChecked((state == TQString::fromLatin1("on"))); break; case FILE: m_value = DOMString(state.left(state.length()-1)); @@ -1560,12 +1560,12 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis if(m_clicked) { m_clicked = false; - TQString astr(nme.isEmpty() ? TQString::tqfromLatin1("x") : nme + ".x"); + TQString astr(nme.isEmpty() ? TQString::fromLatin1("x") : nme + ".x"); encoding += fixUpfromUnicode(codec, astr); astr.setNum(KMAX( clickX(), 0 )); encoding += fixUpfromUnicode(codec, astr); - astr = nme.isEmpty() ? TQString::tqfromLatin1("y") : nme + ".y"; + astr = nme.isEmpty() ? TQString::fromLatin1("y") : nme + ".y"; encoding += fixUpfromUnicode(codec, astr); astr.setNum(KMAX( clickY(), 0 ) ); encoding += fixUpfromUnicode(codec, astr); @@ -1612,7 +1612,7 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis KIO::UDSEntry filestat; // can't submit file in www-url-form encoded - TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->tqtopLevelWidget(); + TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->topLevelWidget(); if (multipart) { TQCString filearray( "" ); if ( KIO::NetAccess::stat(fileurl, filestat, toplevel)) { @@ -2162,7 +2162,7 @@ DOMString HTMLSelectElementImpl::value( ) const void HTMLSelectElementImpl::setValue(DOMStringImpl* value) { - // tqfind the option with value() matching the given parameter + // find the option with value() matching the given parameter // and make it the current selection. TQMemArray<HTMLGenericFormElementImpl*> items = listItems(); for (unsigned i = 0; i < items.size(); i++) @@ -2192,7 +2192,7 @@ void HTMLSelectElementImpl::restoreState(const TQString &_state) recalcListItems(); TQString state = _state; - if(!state.isEmpty() && !state.tqcontains('X') && !m_multiple && m_size <= 1) { + if(!state.isEmpty() && !state.contains('X') && !m_multiple && m_size <= 1) { qWarning("should not happen in restoreState!"); state[0] = 'X'; } @@ -2217,9 +2217,9 @@ NodeImpl *HTMLSelectElementImpl::insertBefore ( NodeImpl *newChild, NodeImpl *re return result; } -void HTMLSelectElementImpl::tqreplaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ) +void HTMLSelectElementImpl::replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ) { - HTMLGenericFormElementImpl::tqreplaceChild(newChild,oldChild, exceptioncode); + HTMLGenericFormElementImpl::replaceChild(newChild,oldChild, exceptioncode); if( !exceptioncode ) setRecalcListItems(); } @@ -2374,7 +2374,7 @@ void HTMLSelectElementImpl::recalcListItems() const m_length = 0; while(current) { if (current->id() == ID_OPTGROUP && current->firstChild()) { - // ### what if optgroup tqcontains just comments? don't want one of no options in it... + // ### what if optgroup contains just comments? don't want one of no options in it... m_listItems.resize(m_listItems.size()+1); m_listItems[m_listItems.size()-1] = static_cast<HTMLGenericFormElementImpl*>(current); current = current->firstChild(); @@ -2745,7 +2745,7 @@ void HTMLTextAreaElementImpl::attach() static TQString expandLF(const TQString& s) { // LF -> CRLF - unsigned crs = s.tqcontains( '\n' ); + unsigned crs = s.contains( '\n' ); if (crs == 0) return s; unsigned len = s.length(); @@ -2756,7 +2756,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'; @@ -2814,8 +2814,8 @@ DOMString HTMLTextAreaElementImpl::value() void HTMLTextAreaElementImpl::setValue(DOMString _value) { // \r\n -> \n, \r -> \n - TQString str = _value.string().tqreplace( "\r\n", "\n" ); - m_value = str.tqreplace( '\r', '\n' ); + TQString str = _value.string().replace( "\r\n", "\n" ); + m_value = str.replace( '\r', '\n' ); m_dirtyvalue = false; m_initialized = true; setChanged(true); @@ -2844,7 +2844,7 @@ DOMString HTMLTextAreaElementImpl::defaultValue() void HTMLTextAreaElementImpl::setDefaultValue(DOMString _defaultValue) { - // there may be comments - remove all the text nodes and tqreplace them with one + // there may be comments - remove all the text nodes and replace them with one TQPtrList<NodeImpl> toRemove; NodeImpl *n; for (n = firstChild(); n; n = n->nextSibling()) @@ -2953,7 +2953,7 @@ void HTMLIsIndexElementImpl::parseAttribute(AttributeImpl* attr) DOMString HTMLIsIndexElementImpl::prompt() const { // When IsIndex is parsed, <HR/>Prompt: <ISINDEX/><HR/> is created. - // So we have to look at the previous sibling to tqfind the prompt text + // So we have to look at the previous sibling to find the prompt text DOM::NodeImpl* const prev = previousSibling(); if ( prev && prev->nodeType() == DOM::Node::TEXT_NODE) return prev->nodeValue(); @@ -2963,7 +2963,7 @@ DOMString HTMLIsIndexElementImpl::prompt() const void HTMLIsIndexElementImpl::setPrompt(const DOMString& str) { // When IsIndex is parsed, <HR/>Prompt: <ISINDEX/><HR/> is created. - // So we have to look at the previous sibling to tqfind the prompt text + // So we have to look at the previous sibling to find the prompt text int exceptioncode = 0; DOM::NodeImpl* const prev = previousSibling(); if ( prev && prev->nodeType() == DOM::Node::TEXT_NODE) diff --git a/khtml/html/html_formimpl.h b/khtml/html/html_formimpl.h index e4db1a931..40fefc9ee 100644 --- a/khtml/html/html_formimpl.h +++ b/khtml/html/html_formimpl.h @@ -415,7 +415,7 @@ public: virtual void restoreState(const TQString &state); virtual NodeImpl *insertBefore ( NodeImpl *newChild, NodeImpl *refChild, int &exceptioncode ); - virtual void tqreplaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ); + virtual void replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ); virtual void removeChild ( NodeImpl *oldChild, int &exceptioncode ); virtual NodeImpl *appendChild ( NodeImpl *newChild, int &exceptioncode ); virtual NodeImpl *addChild( NodeImpl* newChild ); diff --git a/khtml/html/html_headimpl.cpp b/khtml/html/html_headimpl.cpp index 0f85206b9..d7154e936 100644 --- a/khtml/html/html_headimpl.cpp +++ b/khtml/html/html_headimpl.cpp @@ -148,7 +148,7 @@ void HTMLLinkElementImpl::parseAttribute(AttributeImpl *attr) // disabling: recheck alternate status TQString rel = getAttribute(ATTR_REL).string().lower(); TQString type = getAttribute(ATTR_TYPE).string().lower(); - m_alternate = (type.tqcontains("text/css") || rel.tqcontains("stylesheet")) && rel.tqcontains("alternate"); + m_alternate = (type.contains("text/css") || rel.contains("stylesheet")) && rel.contains("alternate"); } if (isLoading()) break; @@ -179,19 +179,19 @@ void HTMLLinkElementImpl::process() // IE extension: location of small icon for locationbar / bookmarks // Uses both "shortcut icon" and "icon" - if ( part && rel.tqcontains("icon") && !m_url.isEmpty() && !part->parentPart()) + if ( part && rel.contains("icon") && !m_url.isEmpty() && !part->parentPart()) part->browserExtension()->setIconURL( KURL(m_url.string()) ); // Stylesheet else if (!m_isDisabled && - (type.tqcontains("text/css") || rel.tqcontains("stylesheet"))) { + (type.contains("text/css") || rel.contains("stylesheet"))) { // no need to load style sheets which aren't for the screen output // ### there may be in some situations e.g. for an editor or script to manipulate - if( m_media.isNull() || m_media.tqcontains("screen") || m_media.tqcontains("all") || m_media.tqcontains("print") ) { + if( m_media.isNull() || m_media.contains("screen") || m_media.contains("all") || m_media.contains("print") ) { m_loading = true; // Add ourselves as a pending sheet, but only if we aren't an alternate // stylesheet. Alternate stylesheets don't hold up render tree construction. - m_alternate = rel.tqcontains("alternate"); + m_alternate = rel.contains("alternate"); if (!isAlternate()) getDocument()->addPendingSheet(); @@ -572,7 +572,7 @@ void HTMLStyleElementImpl::childrenChanged() m_loading = false; if ((m_type.isEmpty() || m_type == "text/css") // Type must be empty or CSS - && (m_media.isNull() || m_media.tqcontains("screen") || m_media.tqcontains("all") || m_media.tqcontains("print"))) { + && (m_media.isNull() || m_media.contains("screen") || m_media.contains("all") || m_media.contains("print"))) { getDocument()->addPendingSheet(); m_loading = true; m_sheet = new CSSStyleSheetImpl(this); diff --git a/khtml/html/html_imageimpl.cpp b/khtml/html/html_imageimpl.cpp index 3ba2c2da0..be13e93c2 100644 --- a/khtml/html/html_imageimpl.cpp +++ b/khtml/html/html_imageimpl.cpp @@ -214,7 +214,7 @@ DOMString HTMLImageElementImpl::altText() const if ( alt.isNull() ) { TQString p = KURL( getDocument()->completeURL( getAttribute(ATTR_SRC).string() ) ).prettyURL(); int pos; - if ( ( pos = p.tqfindRev( '.' ) ) > 0 ) + if ( ( pos = p.findRev( '.' ) ) > 0 ) p.truncate( pos ); alt = DOMString( KStringHandler::csqueeze( p ) ); } @@ -286,7 +286,7 @@ long HTMLImageElementImpl::width() const if (changed()) { getDocument()->updateRendering(); if (getDocument()->view()) - getDocument()->view()->tqlayout(); + getDocument()->view()->layout(); } return m_render ? m_render->contentWidth() : @@ -309,7 +309,7 @@ long HTMLImageElementImpl::height() const if (changed()) { getDocument()->updateRendering(); if (getDocument()->view()) - getDocument()->view()->tqlayout(); + getDocument()->view()->layout(); } return m_render ? m_render->contentHeight() : @@ -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...> @@ -441,7 +441,7 @@ HTMLAreaElementImpl::HTMLAreaElementImpl(DocumentImpl *doc) m_coords=0; m_coordsLen = 0; nohref = false; - tqshape = Unknown; + shape = Unknown; lasth = lastw = -1; } @@ -461,13 +461,13 @@ void HTMLAreaElementImpl::parseAttribute(AttributeImpl *attr) { case ATTR_SHAPE: if ( strcasecmp( attr->value(), "default" ) == 0 ) - tqshape = Default; + shape = Default; else if ( strcasecmp( attr->value(), "circle" ) == 0 ) - tqshape = Circle; + shape = Circle; else if ( strcasecmp( attr->value(), "poly" ) == 0 || strcasecmp( attr->value(), "polygon" ) == 0 ) - tqshape = Poly; + shape = Poly; else if ( strcasecmp( attr->value(), "rect" ) == 0 ) - tqshape = Rect; + shape = Rect; break; case ATTR_COORDS: delete [] m_coords; @@ -497,7 +497,7 @@ bool HTMLAreaElementImpl::mapMouseEvent(int x_, int y_, int width_, int height_, region=getRegion(width_, height_); lastw=width_; lasth=height_; } - if (region.tqcontains(TQPoint(x_,y_))) + if (region.contains(TQPoint(x_,y_))) { inside = true; info.setInnerNode(this); @@ -530,7 +530,7 @@ TQRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const // what the HTML author tried to tell us. // a Poly needs at least 3 points (6 coords), so this is correct - if ((tqshape==Poly || tqshape==Unknown) && m_coordsLen > 5) { + if ((shape==Poly || shape==Unknown) && m_coordsLen > 5) { // make sure its even int len = m_coordsLen >> 1; TQPointArray points(len); @@ -539,19 +539,19 @@ TQRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const m_coords[(i<<1)+1].minWidth(height_)); region = TQRegion(points); } - else if (tqshape==Circle && m_coordsLen>=3 || tqshape==Unknown && m_coordsLen == 3) { + else if (shape==Circle && m_coordsLen>=3 || shape==Unknown && m_coordsLen == 3) { int r = kMin(m_coords[2].minWidth(width_), m_coords[2].minWidth(height_)); region = TQRegion(m_coords[0].minWidth(width_)-r, m_coords[1].minWidth(height_)-r, 2*r, 2*r,TQRegion::Ellipse); } - else if (tqshape==Rect && m_coordsLen>=4 || tqshape==Unknown && m_coordsLen == 4) { + else if (shape==Rect && m_coordsLen>=4 || shape==Unknown && m_coordsLen == 4) { int x0 = m_coords[0].minWidth(width_); int y0 = m_coords[1].minWidth(height_); int x1 = m_coords[2].minWidth(width_); int y1 = m_coords[3].minWidth(height_); region = TQRegion(x0,y0,x1-x0,y1-y0); } - else if (tqshape==Default) + else if (shape==Default) region = TQRegion(0,0,width_,height_); // else // return null region diff --git a/khtml/html/html_imageimpl.h b/khtml/html/html_imageimpl.h index 1a389e895..6f26cd2df 100644 --- a/khtml/html/html_imageimpl.h +++ b/khtml/html/html_imageimpl.h @@ -102,7 +102,7 @@ public: virtual void parseAttribute(AttributeImpl *attr); - bool isDefault() const { return tqshape==Default; } + bool isDefault() const { return shape==Default; } bool mapMouseEvent(int x_, int y_, int width_, int height_, khtml::RenderObject::NodeInfo& info); @@ -117,7 +117,7 @@ protected: khtml::Length* m_coords; int m_coordsLen; int lastw, lasth; - Shape tqshape : 3; + Shape shape : 3; bool nohref : 1; }; diff --git a/khtml/html/html_miscimpl.cpp b/khtml/html/html_miscimpl.cpp index 84460195c..58804bff5 100644 --- a/khtml/html/html_miscimpl.cpp +++ b/khtml/html/html_miscimpl.cpp @@ -225,7 +225,7 @@ NodeImpl *HTMLCollectionImpl::item ( unsigned long index ) const HTMLTableSectionElementImpl* section; NodeImpl* found = 0; - if (table->tqfindRowSection(index, section, sectionIndex)) { + if (table->findRowSection(index, section, sectionIndex)) { HTMLCollectionImpl rows(section, TSECTION_ROWS); found = rows.item(sectionIndex); } @@ -290,7 +290,7 @@ TQValueList<NodeImpl*> HTMLCollectionImpl::namedItems( const DOMString &name ) c //remember stuff about elements we were asked for. m_cache->updateNodeListInfo(m_refNode->getDocument()); CollectionCache* cache = static_cast<CollectionCache*>(m_cache); - if (TQValueList<NodeImpl*>* info = cache->nameCache.tqfind(key)) { + if (TQValueList<NodeImpl*>* info = cache->nameCache.find(key)) { return *info; } else { @@ -366,7 +366,7 @@ NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const { TQPtrList<HTMLGenericFormElementImpl>& l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements; - //Go through the list, trying to tqfind the appropriate named form element. + //Go through the list, trying to find the appropriate named form element. for ( ; currentNamePos < l.count(); ++currentNamePos ) { HTMLGenericFormElementImpl* el = l.at(currentNamePos); diff --git a/khtml/html/html_miscimpl.h b/khtml/html/html_miscimpl.h index f66274d4a..b28fef82a 100644 --- a/khtml/html/html_miscimpl.h +++ b/khtml/html/html_miscimpl.h @@ -106,7 +106,7 @@ protected: bool checkForNameMatch(NodeImpl *node, const DOMString &name) const; }; -// this whole class is just a big hack to tqfind form elements even in +// this whole class is just a big hack to find form elements even in // malformed HTML elements // the famous <table><tr><form><td> problem class HTMLFormCollectionImpl : public HTMLCollectionImpl diff --git a/khtml/html/html_objectimpl.cpp b/khtml/html/html_objectimpl.cpp index a4c1920ac..106a862e9 100644 --- a/khtml/html/html_objectimpl.cpp +++ b/khtml/html/html_objectimpl.cpp @@ -57,7 +57,7 @@ HTMLObjectBaseElementImpl::HTMLObjectBaseElementImpl(DocumentImpl *doc) void HTMLObjectBaseElementImpl::setServiceType(const TQString & val) { serviceType = val.lower(); - int pos = serviceType.tqfind( ";" ); + int pos = serviceType.find( ";" ); if ( pos!=-1 ) serviceType.truncate( pos ); } @@ -160,9 +160,9 @@ void HTMLObjectBaseElementImpl::attach() { if (serviceType.isEmpty() && url.startsWith("data:")) { // Extract the MIME type from the data URL. - int index = url.tqfind(';'); + int index = url.find(';'); if (index == -1) - index = url.tqfind(','); + index = url.find(','); if (index != -1) { int len = index - 5; if (len > 0) diff --git a/khtml/html/html_tableimpl.cpp b/khtml/html/html_tableimpl.cpp index 1c982a624..2c2e6567d 100644 --- a/khtml/html/html_tableimpl.cpp +++ b/khtml/html/html_tableimpl.cpp @@ -81,7 +81,7 @@ NodeImpl* HTMLTableElementImpl::setCaption( HTMLTableCaptionElementImpl *c ) int exceptioncode = 0; NodeImpl* r; if(ElementImpl* cap = caption()) { - tqreplaceChild ( c, cap, exceptioncode ); + replaceChild ( c, cap, exceptioncode ); r = c; } else @@ -95,7 +95,7 @@ NodeImpl* HTMLTableElementImpl::setTHead( HTMLTableSectionElementImpl *s ) int exceptioncode = 0; NodeImpl* r; if( ElementImpl* head = tHead() ) { - tqreplaceChild( s, head, exceptioncode ); + replaceChild( s, head, exceptioncode ); r = s; } else if(ElementImpl* foot = tFoot()) @@ -114,7 +114,7 @@ NodeImpl* HTMLTableElementImpl::setTFoot( HTMLTableSectionElementImpl *s ) int exceptioncode = 0; NodeImpl* r; if(ElementImpl* foot = tFoot()) { - tqreplaceChild ( s, foot, exceptioncode ); + replaceChild ( s, foot, exceptioncode ); r = s; } else if(ElementImpl* firstBody = tFirstBody()) r = insertBefore( s, firstBody, exceptioncode ); @@ -130,7 +130,7 @@ NodeImpl* HTMLTableElementImpl::setTBody( HTMLTableSectionElementImpl *s ) NodeImpl* r; if(ElementImpl* firstBody = tFirstBody()) { - tqreplaceChild ( s, firstBody, exceptioncode ); + replaceChild ( s, firstBody, exceptioncode ); r = s; } else r = appendChild( s, exceptioncode ); @@ -205,7 +205,7 @@ void HTMLTableElementImpl::deleteCaption( ) } /** - Helper. This checks whether the section tqcontains the desired index, and if so, + Helper. This checks whether the section contains the desired index, and if so, returns the section. Otherwise, it adjust the index, and returns 0. indeces < 0 are considered to be infinite. @@ -227,7 +227,7 @@ static inline HTMLTableSectionElementImpl* processSection(HTMLTableSectionElemen } -bool HTMLTableElementImpl::tqfindRowSection(long index, +bool HTMLTableElementImpl::findRowSection(long index, HTMLTableSectionElementImpl*& outSection, long& outIndex) const { @@ -280,7 +280,7 @@ HTMLElementImpl *HTMLTableElementImpl::insertRow( long index, int &exceptioncode long sectionIndex; HTMLTableSectionElementImpl* section; - if ( tqfindRowSection( index, section, sectionIndex ) ) + if ( findRowSection( index, section, sectionIndex ) ) return section->insertRow( sectionIndex, exceptioncode ); else if ( index == -1 || sectionIndex == 0 ) return section->insertRow( section->numRows(), exceptioncode ); @@ -294,7 +294,7 @@ void HTMLTableElementImpl::deleteRow( long index, int &exceptioncode ) { long sectionIndex; HTMLTableSectionElementImpl* section; - if ( tqfindRowSection( index, section, sectionIndex ) ) + if ( findRowSection( index, section, sectionIndex ) ) section->deleteRow( sectionIndex, exceptioncode ); else if ( section && index == -1 ) section->deleteRow( -1, exceptioncode ); @@ -389,10 +389,10 @@ NodeImpl *HTMLTableElementImpl::insertBefore ( NodeImpl *newChild, NodeImpl *ref return retval; } -void HTMLTableElementImpl::tqreplaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ) +void HTMLTableElementImpl::replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ) { handleChildRemove( oldChild ); //Always safe. - HTMLElementImpl::tqreplaceChild( newChild, oldChild, exceptioncode ); + HTMLElementImpl::replaceChild( newChild, oldChild, exceptioncode ); if ( !exceptioncode ) handleChildAdd( newChild ); } diff --git a/khtml/html/html_tableimpl.h b/khtml/html/html_tableimpl.h index 277d76d14..76d81ce50 100644 --- a/khtml/html/html_tableimpl.h +++ b/khtml/html/html_tableimpl.h @@ -277,7 +277,7 @@ public: // overrides virtual NodeImpl *addChild(NodeImpl *child); virtual NodeImpl *insertBefore ( NodeImpl *newChild, NodeImpl *refChild, int &exceptioncode ); - virtual void tqreplaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ); + virtual void replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode ); virtual void removeChild ( NodeImpl *oldChild, int &exceptioncode ); virtual NodeImpl *appendChild ( NodeImpl *newChild, int &exceptioncode ); @@ -285,7 +285,7 @@ public: virtual void attach(); virtual void close(); - /* Tries to tqfind the section containing row number outIndex. + /* Tries to find the section containing row number outIndex. Returns whether it succeeded or not. negative outIndex values are interpreted as being infinite. @@ -295,7 +295,7 @@ public: On failure, outSection points to the last section of the table, and index is the offset the row would have if there was an additional section. */ - bool tqfindRowSection(long inIndex, + bool findRowSection(long inIndex, HTMLTableSectionElementImpl*& outSection, long& outIndex) const; protected: diff --git a/khtml/html/htmlparser.cpp b/khtml/html/htmlparser.cpp index dd4c4344e..9da99f4b3 100644 --- a/khtml/html/htmlparser.cpp +++ b/khtml/html/htmlparser.cpp @@ -239,7 +239,7 @@ void KHTMLParser::parseToken(Token *t) if(inBody && !skipMode() && current->id() != ID_STYLE && current->id() != ID_TITLE && current->id() != ID_SCRIPT && - !t->text->tqcontainsOnlyWhitespace()) haveContent = true; + !t->text->containsOnlyWhitespace()) haveContent = true; #ifdef PARSER_DEBUG kdDebug(6035) << "length="<< t->text->l << " text='" << TQConstString(t->text->s, t->text->l).string() << "'" << endl; #endif @@ -509,7 +509,7 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat) { // Don't try to fit random white-space anywhere TextImpl *t = static_cast<TextImpl *>(n); - if (t->tqcontainsOnlyWhitespace()) + if (t->containsOnlyWhitespace()) return false; // ignore text inside the following elements. switch(current->id()) @@ -617,7 +617,7 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat) break; case ID_TEXT: { TextImpl *t = static_cast<TextImpl *>(n); - if (t->tqcontainsOnlyWhitespace()) + if (t->containsOnlyWhitespace()) return false; /* Fall through to default */ } @@ -1425,7 +1425,7 @@ void KHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem) newNode->appendChild(currNode, exceptionCode); currNode = nextNode; - // TODO - To be tqreplaced. + // TODO - To be replaced. // Re-register form elements with currently active form, step 1 will have removed them if (form && currNode && currNode->isGenericFormElement()) { diff --git a/khtml/html/htmlparser.h b/khtml/html/htmlparser.h index a8329f0fc..d0ce549ef 100644 --- a/khtml/html/htmlparser.h +++ b/khtml/html/htmlparser.h @@ -30,7 +30,7 @@ #define HTMLPARSER_H // 0 all -// 1 domtree + rendertree + styleForElement, no tqlayouting +// 1 domtree + rendertree + styleForElement, no layouting // 2 domtree only #define SPEED_DEBUG 0 diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp index ba8e99a50..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; \ @@ -347,7 +347,7 @@ void HTMLTokenizer::parseSpecial(TokenizerString &src) // possible end of tagname, lets check. if ( !scriptCodeResync && !escaped && !src.escaped() && ( ch == '>' || ch == '/' || ch <= ' ' ) && ch && scriptCodeSize >= searchStopperLen && - !TQConstString( scriptCode+scriptCodeSize-searchStopperLen, searchStopperLen ).string().tqfind( searchStopper, 0, false )) { + !TQConstString( scriptCode+scriptCodeSize-searchStopperLen, searchStopperLen ).string().find( searchStopper, 0, false )) { scriptCodeResync = scriptCodeSize-searchStopperLen+1; tquote = NoQuote; continue; @@ -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(); @@ -695,7 +695,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) // be IE compatible and interpret even unterminated entities // outside tags. like "foo  stuff bla". if ( tag == NoTag ) { - const entity* e = kde_tqfindEntity(cBuffer, cBufferPos); + const entity* e = kde_findEntity(cBuffer, cBufferPos); if ( e && e->code < 256 ) { EntityChar = e->code; entityLen = cBufferPos; @@ -705,7 +705,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) if(cBufferPos == 9) Entity = SearchSemicolon; if(Entity == SearchSemicolon) { if(cBufferPos > 1) { - const entity *e = kde_tqfindEntity(cBuffer, cBufferPos); + const entity *e = kde_findEntity(cBuffer, cBufferPos); // IE only accepts unterminated entities < 256, // Gecko accepts them all, but only outside tags if(e && ( tag == NoTag || e->code < 256 || *src == ';' )) { @@ -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); @@ -813,7 +813,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) break; } // this is a nasty performance trick. will work for the A-Z - // characters, but not for others. if it tqcontains one, + // characters, but not for others. if it contains one, // we fail anyway char cc = curchar; cBuffer[cBufferPos++] = cc | 0x20; @@ -919,7 +919,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) a = khtml::getAttrID(cBuffer, cBufferPos-1); } if (!a) - attrName = TQString::tqfromLatin1(TQCString(cBuffer, cBufferPos+1).data()); + attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data()); } dest = buffer; @@ -941,7 +941,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) } if ( cBufferPos == CBUFLEN ) { cBuffer[cBufferPos] = '\0'; - attrName = TQString::tqfromLatin1(TQCString(cBuffer, cBufferPos+1).data()); + attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data()); dest = buffer; *dest++ = 0; tag = SearchEqual; @@ -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; @@ -1595,7 +1595,7 @@ void HTMLTokenizer::finish() killTimer( m_autoCloseTimer ); m_autoCloseTimer = 0; } - // do this as long as we don't tqfind matching comment ends + // do this as long as we don't find matching comment ends while((title || script || comment || server) && scriptCode && scriptCodeSize) { // we've found an unmatched comment start @@ -1618,7 +1618,7 @@ void HTMLTokenizer::finish() food += TQString(scriptCode, scriptCodeSize); } else { - pos = TQConstString(scriptCode, scriptCodeSize).string().tqfind('>'); + pos = TQConstString(scriptCode, scriptCodeSize).string().find('>'); food.setUnicode(scriptCode+pos+1, scriptCodeSize-pos-1); // deep copy } KHTML_DELETE_QCHAR_VEC(scriptCode); diff --git a/khtml/html/htmltokenizer.h b/khtml/html/htmltokenizer.h index 2f257b106..8e36353b0 100644 --- a/khtml/html/htmltokenizer.h +++ b/khtml/html/htmltokenizer.h @@ -56,7 +56,7 @@ namespace khtml { * @internal * represents one HTML tag. Consists of a numerical id, and the list * of attributes. Can also represent text. In this case the id = 0 and - * text tqcontains the text. + * text contains the text. */ class Token { @@ -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 != "/" ) { |