From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/html/html_documentimpl.cpp | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'khtml/html/html_documentimpl.cpp') diff --git a/khtml/html/html_documentimpl.cpp b/khtml/html/html_documentimpl.cpp index e2ee3ba57..413079483 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->topLevelWidget() ) - windowId = v->topLevelWidget()->winId(); + if ( v && v->tqtopLevelWidget() ) + windowId = v->tqtopLevelWidget()->winId(); TQCString replyType; TQByteArray params, reply; TQDataStream stream(params, IO_WriteOnly); stream << URL().url() << windowId; if (!kapp->dcopClient()->call("kcookiejar", "kcookiejar", - "findDOMCookies(TQString,long int)", params, + "tqfindDOMCookies(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 findDOMCookies(...) returns " + kdError(6010) << "DCOP function tqfindDOMCookies(...) 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->topLevelWidget() ) - windowId = v->topLevelWidget()->winId(); + if ( v && v->tqtopLevelWidget() ) + windowId = v->tqtopLevelWidget()->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()->replaceChild( _body, b, exceptioncode ); + documentElement()->tqreplaceChild( _body, b, exceptioncode ); } Tokenizer *HTMLDocumentImpl::createTokenizer() @@ -226,18 +226,18 @@ void HTMLDocumentImpl::slotHistoryChanged() return; recalcStyle( Force ); - m_render->repaint(); + m_render->tqrepaint(); } HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url) { TQString url = _url.string(); TQString s; - int pos = url.find('#'); + int pos = url.tqfind('#'); //kdDebug(0) << "map pos of #:" << pos << endl; - s = TQString(_url.unicode() + pos + 1, _url.length() - pos - 1); + s = TQString(_url.tqunicode() + pos + 1, _url.length() - pos - 1); - TQMapConstIterator it = mapMap.find(s); + TQMapConstIterator it = mapMap.tqfind(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.find("--", index+2)) != -1)) + ((tmpIndex=buffer.tqfind("--", index+2)) != -1)) index = tmpIndex+2; else return index; @@ -307,7 +307,7 @@ static int parseDocTypePart(const TQString& buffer, int index) } } -static bool containsString(const char* str, const TQString& buffer, int offset) +static bool tqcontainsString(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.find('<', index); + index = buffer.tqfind('<', index); if (index == -1) break; TQChar nextChar = buffer[index+1]; if (nextChar == '!') { - if (containsString("doctype", buffer, index+2)) { + if (tqcontainsString("doctype", buffer, index+2)) { haveDocType = true; index += 9; // Skip "', index); + index = buffer.tqfind('>', index); } else if (nextChar == '?') - index = buffer.find('>', index); + index = buffer.tqfind('>', 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 (!containsString("html", buffer, index)) + if (!tqcontainsString("html", buffer, index)) return false; index = parseDocTypePart(buffer, index+4); - bool hasPublic = containsString("public", buffer, index); + bool hasPublic = tqcontainsString("public", buffer, index); if (hasPublic) { index = parseDocTypePart(buffer, index+6); // We've read