summaryrefslogtreecommitdiffstats
path: root/khtml
diff options
context:
space:
mode:
Diffstat (limited to 'khtml')
-rw-r--r--khtml/css/css_stylesheetimpl.cpp6
-rw-r--r--khtml/css/css_valueimpl.cpp6
-rw-r--r--khtml/css/csshelper.cpp12
-rw-r--r--khtml/css/cssstyleselector.cpp16
-rw-r--r--khtml/ecma/kjs_binding.cpp14
-rw-r--r--khtml/ecma/kjs_binding.h2
-rw-r--r--khtml/ecma/kjs_debugwin.cpp46
-rw-r--r--khtml/ecma/kjs_dom.cpp2
-rw-r--r--khtml/ecma/kjs_events.cpp2
-rw-r--r--khtml/ecma/kjs_navigator.cpp4
-rw-r--r--khtml/ecma/kjs_window.cpp18
-rw-r--r--khtml/ecma/xmlhttprequest.cpp6
-rw-r--r--khtml/html/html_elementimpl.cpp685
-rw-r--r--khtml/html/html_formimpl.cpp22
-rw-r--r--khtml/html/html_inlineimpl.cpp20
-rw-r--r--khtml/htmlpageinfo.ui22
-rw-r--r--khtml/java/kjavaappletserver.cpp4
-rw-r--r--khtml/java/kjavaappletviewer.cpp2
-rw-r--r--khtml/java/kjavaappletwidget.cpp4
-rw-r--r--khtml/java/kjavaappletwidget.h2
-rw-r--r--khtml/java/kjavaprocess.cpp2
-rw-r--r--khtml/khtml_ext.cpp26
-rw-r--r--khtml/khtml_factory.cpp2
-rw-r--r--khtml/khtml_pagecache.cpp4
-rw-r--r--khtml/khtml_part.cpp158
-rw-r--r--khtml/khtml_printsettings.cpp2
-rw-r--r--khtml/khtml_printsettings.h6
-rw-r--r--khtml/khtml_settings.cc4
-rw-r--r--khtml/khtml_settings.h2
-rw-r--r--khtml/khtmldefaults.h8
-rw-r--r--khtml/khtmlview.cpp132
-rw-r--r--khtml/kjserrordlg.ui16
-rw-r--r--khtml/kmultipart/kmultipart.cpp4
-rw-r--r--khtml/misc/knsplugininstaller.cpp2
-rw-r--r--khtml/misc/loader.cpp36
-rw-r--r--khtml/misc/loader_jpeg.cpp8
-rw-r--r--khtml/rendering/font.cpp2
-rw-r--r--khtml/rendering/render_box.cpp2
-rw-r--r--khtml/rendering/render_canvas.cpp10
-rw-r--r--khtml/rendering/render_form.cpp44
-rw-r--r--khtml/rendering/render_form.h2
-rw-r--r--khtml/rendering/render_frames.cpp4
-rw-r--r--khtml/rendering/render_frames.h4
-rw-r--r--khtml/rendering/render_generated.cpp2
-rw-r--r--khtml/rendering/render_image.cpp6
-rw-r--r--khtml/rendering/render_layer.cpp6
-rw-r--r--khtml/rendering/render_list.cpp18
-rw-r--r--khtml/rendering/render_object.cpp12
-rw-r--r--khtml/rendering/render_replaced.cpp84
-rw-r--r--khtml/rendering/render_table.cpp2
-rw-r--r--khtml/rendering/render_text.cpp12
-rw-r--r--khtml/rendering/render_text.h2
-rw-r--r--khtml/xml/dom2_eventsimpl.cpp16
-rw-r--r--khtml/xml/dom2_eventsimpl.h8
-rw-r--r--khtml/xml/dom_docimpl.cpp10
-rw-r--r--khtml/xml/dom_nodeimpl.cpp8
-rw-r--r--khtml/xml/dom_restyler.cpp6
-rw-r--r--khtml/xml/dom_stringimpl.cpp6
-rw-r--r--khtml/xml/xml_tokenizer.cpp2
59 files changed, 450 insertions, 1125 deletions
diff --git a/khtml/css/css_stylesheetimpl.cpp b/khtml/css/css_stylesheetimpl.cpp
index 8189a6846..a27ed5286 100644
--- a/khtml/css/css_stylesheetimpl.cpp
+++ b/khtml/css/css_stylesheetimpl.cpp
@@ -324,7 +324,7 @@ StyleSheetListImpl::~StyleSheetListImpl()
void StyleSheetListImpl::add( StyleSheetImpl* s )
{
- if ( !styleSheets.containsRef( s ) ) {
+ if ( !styleSheets.tqcontainsRef( s ) ) {
s->ref();
styleSheets.append( s );
}
@@ -379,8 +379,8 @@ MediaListImpl::MediaListImpl( CSSRuleImpl *parentRule, const DOMString &media )
bool MediaListImpl::contains( const DOMString &medium ) const
{
- return m_lstMedia.empty() || m_lstMedia.contains( medium ) ||
- m_lstMedia.contains( "all" );
+ return m_lstMedia.empty() || m_lstMedia.tqcontains( medium ) ||
+ m_lstMedia.tqcontains( "all" );
}
CSSStyleSheetImpl *MediaListImpl::parentStyleSheet() const
diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp
index 0fa8bc837..28df97b62 100644
--- a/khtml/css/css_valueimpl.cpp
+++ b/khtml/css/css_valueimpl.cpp
@@ -766,7 +766,7 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const
+ TQString::number(tqGreen(m_value.rgbcolor)) + ","
+ TQString::number(tqAlpha(m_value.rgbcolor)/255.0) + ")";
} else {
- text = TQColor(m_value.rgbcolor).name();
+ text = TQString(TQColor(m_value.rgbcolor).name());
}
break;
case CSSPrimitiveValue::CSS_PAIR:
@@ -886,9 +886,9 @@ FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string)
parsedFontName = string;
// a language tag is often added in braces at the end. Remove it.
- parsedFontName.replace(parenReg, TQString::null);
+ parsedFontName.replace(parenReg, TQString());
// remove [Xft] qualifiers
- parsedFontName.replace(braceReg, TQString::null);
+ parsedFontName.replace(braceReg, TQString());
#ifndef APPLE_CHANGES
const TQString &available = KHTMLSettings::availableFamilies();
diff --git a/khtml/css/csshelper.cpp b/khtml/css/csshelper.cpp
index f1d681bd6..96e184f2f 100644
--- a/khtml/css/csshelper.cpp
+++ b/khtml/css/csshelper.cpp
@@ -49,8 +49,8 @@ DOMString khtml::parseURL(const DOMString &url)
int o = 0;
int l = i->l;
- while(o < l && (i->s[o] <= ' ')) { o++; l--; }
- while(l > 0 && (i->s[o+l-1] <= ' ')) l--;
+ while(o < l && (i->s[o] <= TQChar(' '))) { o++; l--; }
+ while(l > 0 && (i->s[o+l-1] <= TQChar(' '))) l--;
if(l >= 5 &&
(i->s[o].lower() == 'u') &&
@@ -62,8 +62,8 @@ DOMString khtml::parseURL(const DOMString &url)
l -= 5;
}
- while(o < l && (i->s[o] <= ' ')) { o++; l--; }
- while(l > 0 && (i->s[o+l-1] <= ' ')) l--;
+ while(o < l && (i->s[o] <= TQChar(' '))) { o++; l--; }
+ while(l > 0 && (i->s[o+l-1] <= TQChar(' '))) l--;
if(l >= 2 && i->s[o] == i->s[o+l-1] &&
(i->s[o].latin1() == '\'' || i->s[o].latin1() == '\"')) {
@@ -71,8 +71,8 @@ DOMString khtml::parseURL(const DOMString &url)
l -= 2;
}
- while(o < l && (i->s[o] <= ' ')) { o++; l--; }
- while(l > 0 && (i->s[o+l-1] <= ' ')) l--;
+ while(o < l && (i->s[o] <= TQChar(' '))) { o++; l--; }
+ while(l > 0 && (i->s[o+l-1] <= TQChar(' '))) l--;
DOMStringImpl* j = new DOMStringImpl(i->s+o,l);
diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp
index abe6a89ef..a8993bf5f 100644
--- a/khtml/css/cssstyleselector.cpp
+++ b/khtml/css/cssstyleselector.cpp
@@ -257,7 +257,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet,
u.setQuery( TQString::null );
u.setRef( TQString::null );
encodedurl.file = u.url();
- int pos = encodedurl.file.findRev('/');
+ int pos = encodedurl.file.tqfindRev('/');
encodedurl.path = encodedurl.file;
if ( pos > 0 ) {
encodedurl.path.truncate( pos );
@@ -831,9 +831,9 @@ static void cleanpath(TQString &path)
while ( (pos = path.tqfind( "/../" )) != -1 ) {
int prev = 0;
if ( pos > 0 )
- prev = path.findRev( "/", pos -1 );
+ prev = path.tqfindRev( "/", pos -1 );
// don't remove the host, i.e. http://foo.org/../foo.html
- if (prev < 0 || (prev > 3 && path.findRev("://", prev-1) == prev-2))
+ if (prev < 0 || (prev > 3 && path.tqfindRev("://", prev-1) == prev-2))
path.remove( pos, 3);
else
// matching directory found ?
@@ -1158,7 +1158,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
// Be smart compare on length first
if (sel_len > val_len) return false;
// Selector string may not contain spaces
- if ((sel->attr != ATTR_CLASS || e->hasClassList()) && sel->value.tqfind(' ') != -1) return false;
+ if ((sel->attr != ATTR_CLASS || e->hasClassList()) && sel->value.find(' ') != -1) return false;
if (sel_len == val_len)
return (caseSensitive && !strcmp(sel->value, value)) ||
(!caseSensitive && !strcasecmp(sel->value, value));
@@ -1189,21 +1189,21 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
//kdDebug( 6080 ) << "checking for contains match" << endl;
TQConstString val_str(value->tqunicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length());
- return val_str.string().contains(sel_str.string(), caseSensitive);
+ return val_str.string().tqcontains(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());
- return val_str.string().startsWith(sel_str.string(), caseSensitive);
+ return val_str.string().tqstartsWith(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());
- return val_str.string().endsWith(sel_str.string(), caseSensitive);
+ return val_str.string().tqendsWith(sel_str.string(), caseSensitive);
}
case CSSSelector::Hyphen:
{
@@ -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->palette().disabled().background());
+ return bckgrConfig.readColorEntry("Color1", &tqApp->tqpalette().disabled().background());
}
return TQColor();
}
diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp
index b67e206f0..4fa87e2ce 100644
--- a/khtml/ecma/kjs_binding.cpp
+++ b/khtml/ecma/kjs_binding.cpp
@@ -53,7 +53,7 @@ Value DOMObject::get(ExecState *exec, const Identifier &p) const
// ### translate code into readable string ?
// ### oh, and s/QString/i18n or I18N_NOOP (the code in kjs uses I18N_NOOP... but where is it translated ?)
// and where does it appear to the user ?
- Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("DOM exception %1").arg(e.code)).local8Bit());
exec->setException( err );
result = Undefined();
}
@@ -72,7 +72,7 @@ void DOMObject::put(ExecState *exec, const Identifier &propertyName,
tryPut(exec, propertyName, value, attr);
}
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("DOM exception %1").arg(e.code)).local8Bit());
exec->setException(err);
}
catch (...) {
@@ -120,7 +120,7 @@ Value DOMFunction::get(ExecState *exec, const Identifier &propertyName) const
return tryGet(exec, propertyName);
}
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("DOM exception %1").arg(e.code)).local8Bit());
exec->setException(err);
return Undefined();
}
@@ -139,25 +139,25 @@ Value DOMFunction::call(ExecState *exec, Object &thisObj, const List &args)
// ### Look into setting prototypes of these & the use of instanceof so the exception
// type can be determined. See what other browsers do.
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, TQString("DOM Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("DOM Exception %1").arg(e.code)).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::RangeException e) {
- Object err = Error::create(exec, GeneralError, TQString("DOM Range Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("DOM Range Exception %1").arg(e.code)).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::CSSException e) {
- Object err = Error::create(exec, GeneralError, TQString("CSS Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("CSS Exception %1").arg(e.code)).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::EventException e) {
- Object err = Error::create(exec, GeneralError, TQString("DOM Event Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString(TQString("DOM Event Exception %1").arg(e.code)).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
diff --git a/khtml/ecma/kjs_binding.h b/khtml/ecma/kjs_binding.h
index c55da21ce..0672cd8eb 100644
--- a/khtml/ecma/kjs_binding.h
+++ b/khtml/ecma/kjs_binding.h
@@ -103,7 +103,7 @@ namespace KJS {
m_domObjects.insert( objectHandle, obj );
}
void customizedDOMObject( DOMObject* obj ) {
- m_customizedDomObjects.replace( obj, this );
+ m_customizedDomObjects.tqreplace( obj, this );
}
bool deleteDOMObject( void* objectHandle ) {
DOMObject* obj = m_domObjects.take( objectHandle );
diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp
index 8e5cf5dae..bd290af16 100644
--- a/khtml/ecma/kjs_debugwin.cpp
+++ b/khtml/ecma/kjs_debugwin.cpp
@@ -80,7 +80,7 @@ SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char
m_font(KGlobalSettings::fixedFont())
{
verticalScrollBar()->setLineStep(TQFontMetrics(m_font).height());
- viewport()->setBackgroundMode(Qt::NoBackground);
+ viewport()->setBackgroundMode(TQt::NoBackground);
m_breakpointIcon = KGlobal::iconLoader()->loadIcon("stop",KIcon::Small);
}
@@ -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,palette().active().base());
+ p->fillRect(clipx,clipy,clipw,cliph,tqpalette().active().base());
return;
}
@@ -207,26 +207,26 @@ 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,palette().active().mid());
+ p->fillRect(0,height*lineno,linenoWidth,height,tqpalette().active().mid());
- p->setPen(palette().active().text());
+ p->setPen(tqpalette().active().text());
p->drawText(0,height*lineno,linenoWidth,height,Qt::AlignRight,linenoStr);
TQColor bgColor;
TQColor textColor;
if (lineno == m_currentLine) {
- bgColor = palette().active().highlight();
- textColor = palette().active().highlightedText();
+ bgColor = tqpalette().active().highlight();
+ textColor = tqpalette().active().highlightedText();
}
else if (m_debugWin->haveBreakpoint(m_sourceFile,lineno+1,lineno+1)) {
- bgColor = palette().active().text();
- textColor = palette().active().base();
+ bgColor = tqpalette().active().text();
+ textColor = tqpalette().active().base();
p->drawPixmap(2,height*lineno+height/2-m_breakpointIcon.height()/2,m_breakpointIcon);
}
else {
- bgColor = palette().active().base();
- textColor = palette().active().text();
+ bgColor = tqpalette().active().base();
+ textColor = tqpalette().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,palette().active().mid());
+ p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,tqpalette().active().mid());
p->fillRect(linenoWidth,remainingTop,
- right-linenoWidth,bottom-remainingTop,palette().active().base());
+ right-linenoWidth,bottom-remainingTop,tqpalette().active().base());
}
//-------------------------------------------------------------------------
@@ -347,7 +347,7 @@ void EvalMultiLineEdit::keyPressEvent(TQKeyEvent * e)
}
//-------------------------------------------------------------------------
KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name)
- : KMainWindow(parent, name, WType_TopLevel), KInstance("kjs_debugger")
+ : KMainWindow(parent, name, (WFlags)WType_TopLevel), KInstance("kjs_debugger")
{
m_breakpoints = 0;
m_breakpointCount = 0;
@@ -445,18 +445,18 @@ KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name)
// Venkman use F12, KDevelop F10
KShortcut scNext = KShortcut(KKeySequence(KKey(Qt::Key_F12)));
scNext.append(KKeySequence(KKey(Qt::Key_F10)));
- m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,this,TQT_SLOT(slotNext()),
+ m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,TQT_TQOBJECT(this),TQT_SLOT(slotNext()),
m_actionCollection,"next");
- m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),this,TQT_SLOT(slotStep()),
+ m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),TQT_TQOBJECT(this),TQT_SLOT(slotStep()),
m_actionCollection,"step");
// Venkman use F5, Kdevelop F9
KShortcut scCont = KShortcut(KKeySequence(KKey(Qt::Key_F5)));
scCont.append(KKeySequence(KKey(Qt::Key_F9)));
- m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,this,TQT_SLOT(slotContinue()),
+ m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,TQT_TQOBJECT(this),TQT_SLOT(slotContinue()),
m_actionCollection,"cont");
- m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),this,TQT_SLOT(slotStop()),
+ m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),TQT_TQOBJECT(this),TQT_SLOT(slotStop()),
m_actionCollection,"stop");
- m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),this,TQT_SLOT(slotBreakNext()),
+ m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),TQT_TQOBJECT(this),TQT_SLOT(slotBreakNext()),
m_actionCollection,"breaknext");
@@ -677,8 +677,8 @@ bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Close:
case TQEvent::Quit:
while (o->parent())
- o = o->parent();
- if (o == this)
+ o = TQT_TQOBJECT(o->parent());
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this))
return TQWidget::eventFilter(o,e);
else
return true;
@@ -690,7 +690,7 @@ bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e)
void KJSDebugWin::disableOtherWindows()
{
- TQWidgetList *widgets = TQApplication::allWidgets();
+ TQWidgetList *widgets = TQApplication::tqallWidgets();
TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->installEventFilter(this);
@@ -698,7 +698,7 @@ void KJSDebugWin::disableOtherWindows()
void KJSDebugWin::enableOtherWindows()
{
- TQWidgetList *widgets = TQApplication::allWidgets();
+ TQWidgetList *widgets = TQApplication::tqallWidgets();
TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->removeEventFilter(this);
@@ -1123,7 +1123,7 @@ bool KJSDebugWin::haveBreakpoint(SourceFile *sourceFile, int line0, int line1)
for (int i = 0; i < m_breakpointCount; i++) {
int sourceId = m_breakpoints[i].sourceId;
int lineno = m_breakpoints[i].lineno;
- if (m_sourceFragments.contains(sourceId) &&
+ if (m_sourceFragments.tqcontains(sourceId) &&
m_sourceFragments[sourceId]->sourceFile == sourceFile) {
int absLineno = m_sourceFragments[sourceId]->baseLine+lineno-1;
if (absLineno >= line0 && absLineno <= line1)
diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp
index 1231c5710..cc2f3c78a 100644
--- a/khtml/ecma/kjs_dom.cpp
+++ b/khtml/ecma/kjs_dom.cpp
@@ -524,7 +524,7 @@ UString DOMNode::toString(ExecState *) const
DOM::Element e = node;
if ( !e.isNull() ) {
- s = e.nodeName().string();
+ s = static_cast<UString>(e.nodeName().string());
} else
s = className(); // fallback
diff --git a/khtml/ecma/kjs_events.cpp b/khtml/ecma/kjs_events.cpp
index 38664c1b2..a0daf19c8 100644
--- a/khtml/ecma/kjs_events.cpp
+++ b/khtml/ecma/kjs_events.cpp
@@ -191,7 +191,7 @@ void JSLazyEventListener::parseCode() const
listener = Object();// Error creating function
} else {
DeclaredFunctionImp *declFunc = static_cast<DeclaredFunctionImp*>(listener.imp());
- declFunc->setName(Identifier(name));
+ declFunc->setName(Identifier(static_cast<UString>(name)));
if (originalNode)
{
diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp
index b8712e01b..2d61bb29b 100644
--- a/khtml/ecma/kjs_navigator.cpp
+++ b/khtml/ecma/kjs_navigator.cpp
@@ -255,9 +255,9 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
struct utsname name;
int ret = uname(&name);
if ( ret >= 0 )
- return String(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
+ return String(TQString(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine)));
else // can't happen
- return String(TQString::tqfromLatin1("Unix X11"));
+ return String(TQString(TQString::tqfromLatin1("Unix X11")));
}
case CpuClass:
{
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index 5fe2ef33e..b57a8faae 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -1633,13 +1633,13 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
if (winargs.y < screen.y() || winargs.y > screen.bottom())
winargs.y = screen.y(); // only safe choice until size is determined
} else if (key == "height") {
- winargs.height = (int)val.toFloat() + 2*tqApp->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.height = (int)val.toFloat() + 2*tqApp->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.height > screen.height()) // should actually check workspace
winargs.height = screen.height();
if (winargs.height < 100)
winargs.height = 100;
} else if (key == "width") {
- winargs.width = (int)val.toFloat() + 2*tqApp->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.width > screen.width()) // should actually check workspace
winargs.width = screen.width();
if (winargs.width < 100)
@@ -2271,7 +2271,7 @@ void WindowQObject::timerEvent(TQTimerEvent *)
it = TQPtrListIterator<ScheduledAction>(toExecute);
for (; it.current(); ++it) {
ScheduledAction *action = it.current();
- if (!scheduledActions.containsRef(action)) // removed by clearTimeout()
+ if (!scheduledActions.tqcontainsRef(action)) // removed by clearTimeout()
continue;
action->executing = true; // prevent deletion in clearTimeout()
@@ -2288,7 +2288,7 @@ void WindowQObject::timerEvent(TQTimerEvent *)
action->executing = false;
- if (!scheduledActions.containsRef(action))
+ if (!scheduledActions.tqcontainsRef(action))
delete action;
else
action->nextTime = action->nextTime.addMSecs(action->interval);
@@ -2305,16 +2305,16 @@ void WindowQObject::timerEvent(TQTimerEvent *)
DateTimeMS DateTimeMS::addMSecs(int s) const
{
DateTimeMS c = *this;
- c.mTime = mTime.addMSecs(s);
+ c.mTime = TQT_TQTIME_OBJECT(mTime.addMSecs(s));
if (s > 0)
{
if (c.mTime < mTime)
- c.mDate = mDate.addDays(1);
+ c.mDate = TQT_TQDATE_OBJECT(mDate.addDays(1));
}
else
{
if (c.mTime > mTime)
- c.mDate = mDate.addDays(-1);
+ c.mDate = TQT_TQDATE_OBJECT(mDate.addDays(-1));
}
return c;
}
@@ -2353,10 +2353,10 @@ DateTimeMS DateTimeMS::now()
{
DateTimeMS t;
TQTime before = TQTime::currentTime();
- t.mDate = TQDate::tqcurrentDate();
+ t.mDate = TQDate::currentDate();
t.mTime = TQTime::currentTime();
if (t.mTime < before)
- t.mDate = TQDate::tqcurrentDate(); // prevent race condition in hacky way :)
+ t.mDate = TQDate::currentDate(); // prevent race condition in hacky way :)
return t;
}
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index a2095769f..f821d7b95 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -489,7 +489,7 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val
TQStringList bannedHeaders = TQStringList::split(',',
TQString::tqfromLatin1(BANNED_HTTP_HEADERS));
- if (bannedHeaders.contains(name))
+ if (bannedHeaders.tqcontains(name))
return; // Denied
requestHeaders[name] = value.stripWhiteSpace();
@@ -665,9 +665,9 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
pos += 13;
int index = responseHeaders.tqfind('\n', pos);
TQString type = responseHeaders.mid(pos, (index-pos));
- index = type.find (';');
+ index = type.tqfind (';');
if (index > -1)
- encoding = type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false)).stripWhiteSpace();
+ encoding = TQString(type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false))).stripWhiteSpace();
}
decoder = new Decoder;
diff --git a/khtml/html/html_elementimpl.cpp b/khtml/html/html_elementimpl.cpp
index a5931cd41..e69de29bb 100644
--- a/khtml/html/html_elementimpl.cpp
+++ b/khtml/html/html_elementimpl.cpp
@@ -1,685 +0,0 @@
-// -*- c-basic-offset: 4; -*-
-/**
- * This file is part of the DOM implementation for KDE.
- *
- * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
- * (C) 1999 Antti Koivisto (koivisto@kde.org)
- * (C) 2003 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2002 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-// -------------------------------------------------------------------------
-//#define DEBUG
-//#define DEBUG_LAYOUT
-//#define PAR_DEBUG
-//#define EVENT_DEBUG
-//#define UNSUPPORTED_ATTR
-
-#include "html/dtd.h"
-#include "html/html_elementimpl.h"
-#include "html/html_documentimpl.h"
-#include "html/htmltokenizer.h"
-
-#include "misc/htmlhashes.h"
-
-#include "khtmlview.h"
-#include "khtml_part.h"
-
-#include "rendering/render_object.h"
-#include "rendering/render_replaced.h"
-#include "css/css_valueimpl.h"
-#include "css/css_stylesheetimpl.h"
-#include "css/cssproperties.h"
-#include "css/cssvalues.h"
-#include "xml/dom_textimpl.h"
-#include "xml/dom2_eventsimpl.h"
-
-#include <kdebug.h>
-#include <kglobal.h>
-#include "html_elementimpl.h"
-
-using namespace DOM;
-using namespace khtml;
-
-HTMLElementImpl::HTMLElementImpl(DocumentImpl *doc)
- : ElementImpl( doc )
-{
- m_htmlCompat = doc && doc->htmlMode() != DocumentImpl::XHtml;
-}
-
-HTMLElementImpl::~HTMLElementImpl()
-{
-}
-
-bool HTMLElementImpl::isInline() const
-{
- if (renderer())
- return ElementImpl::isInline();
-
- switch(id()) {
- case ID_A:
- case ID_FONT:
- case ID_TT:
- case ID_U:
- case ID_B:
- case ID_I:
- case ID_S:
- case ID_STRIKE:
- case ID_BIG:
- case ID_SMALL:
-
- // %phrase
- case ID_EM:
- case ID_STRONG:
- case ID_DFN:
- case ID_CODE:
- case ID_SAMP:
- case ID_KBD:
- case ID_VAR:
- case ID_CITE:
- case ID_ABBR:
- case ID_ACRONYM:
-
- // %special
- case ID_SUB:
- case ID_SUP:
- case ID_SPAN:
- case ID_NOBR:
- case ID_WBR:
- return true;
-
- default:
- return ElementImpl::isInline();
- }
-}
-
-DOMString HTMLElementImpl::namespaceURI() const
-{
- return (!m_htmlCompat) ?
- DOMString(XHTML_NAMESPACE) : DOMString();
-}
-
-
-DOMString HTMLElementImpl::localName() const
-{
- // We only have a localName if we were created by createElementNS(), in which
- // case we are an XHTML element. This also means we have a lowercase name.
- if (!m_htmlCompat) // XHTML == not HTMLCompat
- {
- NodeImpl::Id _id = id();
- DOMString tn;
- if ( _id >= ID_LAST_TAG )
- tn = getDocument()->getName(ElementId, _id);
- else // HTML tag
- tn = getTagName( _id );
- return tn; // lowercase already
- }
- // createElement() always returns elements with a null localName.
- else
- return DOMString();
-}
-
-DOMString HTMLElementImpl::tagName() const
-{
- DOMString tn;
- NodeImpl::Id _id = id();
- if ( _id >= ID_LAST_TAG )
- tn = getDocument()->getName(ElementId, _id);
- else // HTML tag
- tn = getTagName( _id );
-
- if ( m_htmlCompat )
- tn = tn.upper();
-
- if (m_prefix)
- return DOMString(m_prefix) + ":" + tn;
-
- return tn;
-}
-
-void HTMLElementImpl::parseAttribute(AttributeImpl *attr)
-{
- DOMString indexstring;
- switch( attr->id() )
- {
- case ATTR_ALIGN:
- if (attr->val()) {
- if ( strcasecmp(attr->value(), "middle" ) == 0 )
- addCSSProperty( CSS_PROP_TEXT_ALIGN, CSS_VAL_CENTER );
- else
- addCSSProperty(CSS_PROP_TEXT_ALIGN, attr->value().lower());
- }
- else
- removeCSSProperty(CSS_PROP_TEXT_ALIGN);
- break;
-// the core attributes...
- case ATTR_ID:
- // unique id
- setHasID();
- getDocument()->incDOMTreeVersion();
- break;
- case ATTR_CLASS:
- if (attr->val()) {
- DOMString v = attr->value();
- const TQChar* s = v.tqunicode();
- int l = v.length();
- while( l && !s->isSpace() )
- l--,s++;
- setHasClassList(l);
- setHasClass(true);
- } else {
- setHasClassList(false);
- setHasClass(false);
- }
- break;
- case ATTR_NAME:
- getDocument()->incDOMTreeVersion();
- break;
- case ATTR_STYLE:
- if (m_styleDecls)
- m_styleDecls->removeCSSHints();
- else
- createDecl();
- m_styleDecls->setProperty(attr->value());
- setChanged();
- break;
- case ATTR_TABINDEX:
- indexstring=getAttribute(ATTR_TABINDEX);
- if (indexstring.length())
- setTabIndex(indexstring.toInt());
- break;
-// i18n attributes
- case ATTR_LANG:
- break;
- case ATTR_DIR:
- addCSSProperty(CSS_PROP_DIRECTION, attr->value().lower());
- addCSSProperty(CSS_PROP_UNICODE_BIDI, CSS_VAL_EMBED);
- break;
-// standard events
- case ATTR_ONCLICK:
- setHTMLEventListener(EventImpl::KHTML_ECMA_CLICK_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onclick", this));
- break;
- case ATTR_ONDBLCLICK:
- setHTMLEventListener(EventImpl::KHTML_ECMA_DBLCLICK_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "ondblclick", this));
- break;
- case ATTR_ONMOUSEDOWN:
- setHTMLEventListener(EventImpl::MOUSEDOWN_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onmousedown", this));
- break;
- case ATTR_ONMOUSEMOVE:
- setHTMLEventListener(EventImpl::MOUSEMOVE_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onmousemove", this));
- break;
- case ATTR_ONMOUSEOUT:
- setHTMLEventListener(EventImpl::MOUSEOUT_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onmouseout", this));
- break;
- case ATTR_ONMOUSEOVER:
- setHTMLEventListener(EventImpl::MOUSEOVER_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onmouseover", this));
- break;
- case ATTR_ONMOUSEUP:
- setHTMLEventListener(EventImpl::MOUSEUP_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onmouseup", this));
- break;
- case ATTR_ONKEYDOWN:
- setHTMLEventListener(EventImpl::KEYDOWN_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onkeydown", this));
- break;
- case ATTR_ONKEYPRESS:
- setHTMLEventListener(EventImpl::KEYPRESS_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onkeypress", this));
- break;
- case ATTR_ONKEYUP:
- setHTMLEventListener(EventImpl::KEYUP_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onkeyup", this));
- break;
- case ATTR_ONFOCUS:
- setHTMLEventListener(EventImpl::FOCUS_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onfocus", this));
- break;
- case ATTR_ONBLUR:
- setHTMLEventListener(EventImpl::BLUR_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onblur", this));
- break;
- case ATTR_ONSCROLL:
- setHTMLEventListener(EventImpl::SCROLL_EVENT,
- getDocument()->createHTMLEventListener(attr->value().string(), "onscroll", this));
- break;
-// other misc attributes
- default:
-#ifdef UNSUPPORTED_ATTR
- kdDebug(6030) << "UATTR: <" << this->nodeName().string() << "> ["
- << attr->name().string() << "]=[" << attr->value().string() << "]" << endl;
-#endif
- break;
- }
-}
-
-void HTMLElementImpl::recalcStyle( StyleChange ch )
-{
- ElementImpl::recalcStyle( ch );
-
- if (m_render /*&& changed*/)
- m_render->updateFromElement();
-}
-
-void HTMLElementImpl::addCSSProperty(int id, const DOMString &value)
-{
- if(!m_styleDecls) createDecl();
- m_styleDecls->setProperty(id, value, false, true);
- setChanged();
-}
-
-void HTMLElementImpl::addCSSProperty(int id, int value)
-{
- if(!m_styleDecls) createDecl();
- m_styleDecls->setProperty(id, value, false, true);
- setChanged();
-}
-
-void HTMLElementImpl::addCSSLength(int id, const DOMString &value, bool numOnly, bool multiLength)
-{
- if(!m_styleDecls) createDecl();
-
- // strip attribute garbage to avoid CSS parsing errors
- // ### create specialized hook that avoids parsing every
- // value twice!
- if ( value.implementation() ) {
- // match \s*[+-]?\d*(\.\d*)?[%\*]?
- unsigned i = 0, j = 0;
- TQChar* s = value.implementation()->s;
- unsigned l = value.implementation()->l;
-
- while (i < l && s[i].isSpace())
- ++i;
- if (i < l && (s[i] == '+' || s[i] == '-'))
- ++i;
- while (i < l && s[i].isDigit())
- ++i,++j;
-
- // no digits!
- if (j == 0) return;
-
- int v = kClamp( TQConstString(s, i).string().toInt(), -8192, 8191 ) ;
- const char* suffix = "px";
- if (!numOnly || multiLength) {
- // look if we find a % or *
- while (i < l) {
- if (multiLength && s[i] == '*') {
- suffix = "";
- break;
- }
- if (s[i] == '%') {
- suffix = "%";
- break;
- }
- ++i;
- }
- }
- if (numOnly) suffix = "";
-
- TQString ns = TQString::number(v) + suffix;
- m_styleDecls->setLengthProperty( id, DOMString( ns ), false, true, multiLength );
- setChanged();
- return;
- }
-
- m_styleDecls->setLengthProperty(id, value, false, true, multiLength);
- setChanged();
-}
-
-static inline bool isHexDigit( const TQChar &c ) {
- return ( c >= '0' && c <= '9' ) ||
- ( c >= 'a' && c <= 'f' ) ||
- ( c >= 'A' && c <= 'F' );
-}
-
-static inline int toHex( const TQChar &c ) {
- return ( (c >= '0' && c <= '9')
- ? (c.tqunicode() - '0')
- : ( ( c >= 'a' && c <= 'f' )
- ? (c.tqunicode() - 'a' + 10)
- : ( ( c >= 'A' && c <= 'F' )
- ? (c.tqunicode() - 'A' + 10)
- : -1 ) ) );
-}
-
-/* color parsing that tries to match as close as possible IE 6. */
-void HTMLElementImpl::addHTMLColor( int id, const DOMString &c )
-{
- if(!m_styleDecls) createDecl();
-
- // this is the only case no color gets applied in IE.
- if ( !c.length() ) {
- removeCSSProperty(id);
- return;
- }
-
- if ( m_styleDecls->setProperty(id, c, false, true) )
- return;
-
- TQString color = c.string();
- // not something that fits the specs.
-
- // we're emulating IEs color parser here. It maps transparent to black, otherwise it tries to build a rgb value
- // out of everyhting you put in. The algorithm is experimentally determined, but seems to work for all test cases I have.
-
- // the length of the color value is rounded up to the next
- // multiple of 3. each part of the rgb triple then gets one third
- // of the length.
- //
- // Each triplet is parsed byte by byte, mapping
- // each number to a hex value (0-9a-fA-F to their values
- // everything else to 0).
- //
- // The highest non zero digit in all triplets is remembered, and
- // used as a normalization point to normalize to values between 0
- // and 255.
-
- if ( color.lower() != "transparent" ) {
- if ( color[0] == '#' )
- color.remove( 0, 1 );
- int basicLength = (color.length() + 2) / 3;
- if ( basicLength > 1 ) {
- // IE ignores colors with three digits or less
-// qDebug("trying to fix up color '%s'. basicLength=%d, length=%d",
-// color.latin1(), basicLength, color.length() );
- int colors[3] = { 0, 0, 0 };
- int component = 0;
- int pos = 0;
- int maxDigit = basicLength-1;
- while ( component < 3 ) {
- // search forward for digits in the string
- int numDigits = 0;
- while ( pos < (int)color.length() && numDigits < basicLength ) {
- int hex = toHex( color[pos] );
- colors[component] = (colors[component] << 4);
- if ( hex > 0 ) {
- colors[component] += hex;
- maxDigit = kMin( maxDigit, numDigits );
- }
- numDigits++;
- pos++;
- }
- while ( numDigits++ < basicLength )
- colors[component] <<= 4;
- component++;
- }
- maxDigit = basicLength - maxDigit;
-// qDebug("color is %x %x %x, maxDigit=%d", colors[0], colors[1], colors[2], maxDigit );
-
- // normalize to 00-ff. The highest filled digit counts, minimum is 2 digits
- maxDigit -= 2;
- colors[0] >>= 4*maxDigit;
- colors[1] >>= 4*maxDigit;
- colors[2] >>= 4*maxDigit;
-// qDebug("normalized color is %x %x %x", colors[0], colors[1], colors[2] );
- // assert( colors[0] < 0x100 && colors[1] < 0x100 && colors[2] < 0x100 );
-
- color.sprintf("#%02x%02x%02x", colors[0], colors[1], colors[2] );
-// qDebug( "trying to add fixed color string '%s'", color.latin1() );
- if ( m_styleDecls->setProperty(id, DOMString(color), false, true) )
- return;
- }
- }
- m_styleDecls->setProperty(id, CSS_VAL_BLACK, false, true);
-}
-
-void HTMLElementImpl::removeCSSProperty(int id)
-{
- if(!m_styleDecls)
- return;
- m_styleDecls->setParent(getDocument()->elementSheet());
- m_styleDecls->removeProperty(id, true /*nonCSSHint */);
- setChanged();
-}
-
-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();
- }
- return result;
-}
-
-DOMString HTMLElementImpl::innerText() const
-{
- TQString text = "";
- if(!firstChild())
- return text;
-
- const NodeImpl *n = this;
- // find the next text/image after the anchor, to get a position
- while(n) {
- if(n->firstChild())
- n = n->firstChild();
- else if(n->nextSibling())
- n = n->nextSibling();
- else {
- NodeImpl *next = 0;
- while(!next) {
- n = n->parentNode();
- if(!n || n == (NodeImpl *)this ) goto end;
- next = n->nextSibling();
- }
- n = next;
- }
- if(n->isTextNode() ) {
- DOMStringImpl* data = static_cast<const TextImpl *>(n)->string();
- text += TQConstString(data->s, data->l).string();
- }
- }
- end:
- return text;
-}
-
-DocumentFragment HTMLElementImpl::createContextualFragment( const DOMString &html )
-{
- // the following is in accordance with the definition as used by IE
- if( endTag[id()] == FORBIDDEN )
- return DocumentFragment();
- // IE disallows innerHTML on inline elements.
- // I don't see why we should have this restriction, as our
- // dhtml engine can cope with it. Lars
- //if ( isInline() ) return false;
- switch( id() ) {
- case ID_COL:
- case ID_COLGROUP:
- case ID_FRAMESET:
- case ID_HEAD:
- case ID_TABLE:
- case ID_TBODY:
- case ID_TFOOT:
- case ID_THEAD:
- case ID_TITLE:
- return DocumentFragment();
- default:
- break;
- }
- if ( !getDocument()->isHTMLDocument() )
- return DocumentFragment();
-
- DocumentFragmentImpl* fragment = new DocumentFragmentImpl( docPtr() );
- DocumentFragment f( fragment );
- {
- HTMLTokenizer tok( docPtr(), fragment );
- tok.begin();
- tok.write( html.string(), true );
- tok.end();
- }
-
- // Exceptions are ignored because none ought to happen here.
- int ignoredExceptionCode;
-
- // we need to pop <html> and <body> elements and remove <head> to
- // accomadate folks passing complete HTML documents to make the
- // child of an element.
- for ( NodeImpl* node = fragment->firstChild(); node; ) {
- if (node->id() == ID_HTML || node->id() == ID_BODY) {
- NodeImpl* firstChild = node->firstChild();
- NodeImpl* child = firstChild;
- while ( child ) {
- NodeImpl *nextChild = child->nextSibling();
- fragment->insertBefore(child, node, ignoredExceptionCode);
- child = nextChild;
- }
- if ( !firstChild ) {
- NodeImpl *nextNode = node->nextSibling();
- fragment->removeChild(node, ignoredExceptionCode);
- node = nextNode;
- } else {
- fragment->removeChild(node, ignoredExceptionCode);
- node = firstChild;
- }
- } else if (node->id() == ID_HEAD) {
- NodeImpl *nextNode = node->nextSibling();
- fragment->removeChild(node, ignoredExceptionCode);
- node = nextNode;
- } else {
- node = node->nextSibling();
- }
- }
-
- return f;
-}
-
-void HTMLElementImpl::setInnerHTML( const DOMString &html, int &exceptioncode )
-{
- // Works line innerText in Gecko
- // ### test if needed for ID_SCRIPT as well.
- if ( id() == ID_STYLE ) {
- setInnerText(html, exceptioncode);
- return;
- }
-
- DocumentFragment fragment = createContextualFragment( html );
- if ( fragment.isNull() ) {
- exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
- return;
- }
-
- // Make sure adding the new child is ok, before removing all children (#96187)
- checkAddChild( fragment.handle(), exceptioncode );
- if ( exceptioncode )
- return;
-
- removeChildren();
- appendChild( fragment.handle(), exceptioncode );
-}
-
-void HTMLElementImpl::setInnerText( const DOMString &text, int& exceptioncode )
-{
- // following the IE specs.
- if( endTag[id()] == FORBIDDEN ) {
- exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
- return;
- }
- // IE disallows innerHTML on inline elements. I don't see why we should have this restriction, as our
- // dhtml engine can cope with it. Lars
- //if ( isInline() ) return false;
- switch( id() ) {
- case ID_COL:
- case ID_COLGROUP:
- case ID_FRAMESET:
- case ID_HEAD:
- case ID_HTML:
- case ID_TABLE:
- case ID_TBODY:
- case ID_TFOOT:
- case ID_THEAD:
- case ID_TR:
- exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
- return;
- default:
- break;
- }
-
- removeChildren();
-
- TextImpl *t = new TextImpl( docPtr(), text.implementation() );
- appendChild( t, exceptioncode );
-}
-
-void HTMLElementImpl::addHTMLAlignment( DOMString tqalignment )
-{
- //qDebug("tqalignment is %s", tqalignment.string().latin1() );
- // vertical tqalignment 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 ) {
- propvalign = CSS_VAL_MIDDLE;
- } else if ( strcasecmp( tqalignment, "absbottom" ) == 0 ) {
- propvalign = CSS_VAL_BOTTOM;
- } else if ( strcasecmp( tqalignment, "left" ) == 0 ) {
- propfloat = CSS_VAL_LEFT;
- propvalign = CSS_VAL_TOP;
- } else if ( strcasecmp( tqalignment, "right" ) == 0 ) {
- propfloat = CSS_VAL_RIGHT;
- propvalign = CSS_VAL_TOP;
- } else if ( strcasecmp( tqalignment, "top" ) == 0 ) {
- propvalign = CSS_VAL_TOP;
- } else if ( strcasecmp( tqalignment, "middle" ) == 0 ) {
- propvalign = CSS_VAL__KHTML_BASELINE_MIDDLE;
- } else if ( strcasecmp( tqalignment, "center" ) == 0 ) {
- propvalign = CSS_VAL_MIDDLE;
- } else if ( strcasecmp( tqalignment, "bottom" ) == 0 ) {
- propvalign = CSS_VAL_BASELINE;
- } else if ( strcasecmp ( tqalignment, "texttop") == 0 ) {
- propvalign = CSS_VAL_TEXT_TOP;
- }
-
- if ( propfloat != -1 )
- addCSSProperty( CSS_PROP_FLOAT, propfloat );
- if ( propvalign != -1 )
- addCSSProperty( CSS_PROP_VERTICAL_ALIGN, propvalign );
-}
-
-DOMString HTMLElementImpl::toString() const
-{
- if (!hasChildNodes()) {
- DOMString result = openTagStartToString();
- result += ">";
-
- if (endTag[id()] == REQUIRED) {
- result += "</";
- result += tagName();
- result += ">";
- }
-
- return result;
- }
-
- return ElementImpl::toString();
-}
-
-// -------------------------------------------------------------------------
-HTMLGenericElementImpl::HTMLGenericElementImpl(DocumentImpl *doc, ushort i)
- : HTMLElementImpl(doc)
-{
- _id = i;
-}
-
-HTMLGenericElementImpl::~HTMLGenericElementImpl()
-{
-}
diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp
index 530eb5fb7..08afce582 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.contains( '\n' ) )*3
- +e.contains('\r') * 3 + 1);
+ TQCString encoded(( e.length()+e.tqcontains( '\n' ) )*3
+ +e.tqcontains('\r') * 3 + 1);
int enclen = 0;
bool crmissing = false;
unsigned char oldc;
@@ -457,7 +457,7 @@ void HTMLFormElementImpl::walletOpened(KWallet::Wallet *w) {
if ((current->inputType() == HTMLInputElementImpl::PASSWORD ||
current->inputType() == HTMLInputElementImpl::TEXT) &&
!current->readOnly() &&
- map.contains(current->name().string())) {
+ map.tqcontains(current->name().string())) {
getDocument()->setFocusNode(current);
current->setValue(map[current->name().string()]);
}
@@ -957,10 +957,10 @@ bool HTMLGenericFormElementImpl::isFocusable() const
return false;
TQWidget* widget = static_cast<RenderWidget*>(m_render)->widget();
- return widget && widget->focusPolicy() >= TQWidget::TabFocus;
+ return widget && widget->focusPolicy() >= TQ_TabFocus;
}
-class FocusHandleWidget : public QWidget
+class FocusHandleWidget : public TQWidget
{
public:
void focusNextPrev(bool n) {
@@ -1018,13 +1018,19 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt)
// handle tabbing out, either from a single or repeated key event.
if ( evt->id() == EventImpl::KEYPRESS_EVENT && evt->isKeyRelatedEvent() ) {
TQKeyEvent* const k = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
- if ( k && (k->key() == Qt::Key_Tab || k->key() == Qt::Key_BackTab) ) {
+ if ( k && (k->key() == Qt::Key_Tab || k->key() == TQt::Key_BackTab) ) {
TQWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
+#ifdef USE_QT4
+ if (widget)
+ static_cast<FocusHandleWidget *>(widget)
+ ->focusNextPrev(k->key() == Qt::Key_Tab);
+#else // USE_QT4
TQFocusEvent::setReason( k->key() == Qt::Key_Tab ? TQFocusEvent::Tab : TQFocusEvent::Backtab );
if (widget)
static_cast<FocusHandleWidget *>(widget)
->focusNextPrev(k->key() == Qt::Key_Tab);
TQFocusEvent::resetReason();
+#endif // USE_QT4
evt->setDefaultHandled();
}
}
@@ -1452,7 +1458,7 @@ void HTMLInputElementImpl::attach()
TQString nvalue;
unsigned int valueLength = value.length();
for (unsigned int i = 0; i < valueLength; ++i)
- if (value[i] >= ' ')
+ if (value[i] >= TQChar(' '))
nvalue += value[i];
m_value = nvalue;
}
@@ -2745,7 +2751,7 @@ void HTMLTextAreaElementImpl::attach()
static TQString expandLF(const TQString& s)
{
// LF -> CRLF
- unsigned crs = s.contains( '\n' );
+ unsigned crs = s.tqcontains( '\n' );
if (crs == 0)
return s;
unsigned len = s.length();
diff --git a/khtml/html/html_inlineimpl.cpp b/khtml/html/html_inlineimpl.cpp
index 600c23d59..9d30a5b4e 100644
--- a/khtml/html/html_inlineimpl.cpp
+++ b/khtml/html/html_inlineimpl.cpp
@@ -123,13 +123,13 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt)
if ( e ) {
if ( e->ctrlKey() )
- state |= Qt::ControlButton;
+ state |= TQt::ControlButton;
if ( e->shiftKey() )
- state |= Qt::ShiftButton;
+ state |= TQt::ShiftButton;
if ( e->altKey() )
- state |= Qt::AltButton;
+ state |= TQt::AltButton;
if ( e->metaKey() )
- state |= Qt::MetaButton;
+ state |= TQt::MetaButton;
if ( e->button() == 0 )
button = Qt::LeftButton;
@@ -140,12 +140,12 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt)
}
else if ( k )
{
- if ( k->checkModifier(Qt::ShiftButton) )
- state |= Qt::ShiftButton;
- if ( k->checkModifier(Qt::AltButton) )
- state |= Qt::AltButton;
- if ( k->checkModifier(Qt::ControlButton) )
- state |= Qt::ControlButton;
+ if ( k->checkModifier(TQt::ShiftButton) )
+ state |= TQt::ShiftButton;
+ if ( k->checkModifier(TQt::AltButton) )
+ state |= TQt::AltButton;
+ if ( k->checkModifier(TQt::ControlButton) )
+ state |= TQt::ControlButton;
}
// ### also check if focused node is editable if not in designmode,
diff --git a/khtml/htmlpageinfo.ui b/khtml/htmlpageinfo.ui
index 9f2e4030c..21d341f91 100644
--- a/khtml/htmlpageinfo.ui
+++ b/khtml/htmlpageinfo.ui
@@ -2,7 +2,7 @@
<class>KHTMLInfoDlg</class>
<comment>A dialog to display the HTTP headers for a given page.</comment>
<author>George Staikos &lt;staikos@kde.org&gt;</author>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>HTMLPageInfo</cstring>
</property>
@@ -29,7 +29,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -48,7 +48,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>urlLabel</cstring>
</property>
@@ -93,7 +93,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>_lastModified</cstring>
</property>
@@ -106,7 +106,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>titleLabel</cstring>
</property>
@@ -125,7 +125,7 @@
<cstring>_title</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>_lmLabel</cstring>
</property>
@@ -144,7 +144,7 @@
<cstring>_lastModified</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>_eLabel</cstring>
</property>
@@ -180,7 +180,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -191,7 +191,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListView">
+ <widget class="TQListView">
<column>
<property name="text">
<string>Property</string>
@@ -287,9 +287,9 @@
</tabstops>
<includes>
<include location="global" impldecl="in declaration">kpushbutton.h</include>
- <include location="global" impldecl="in declaration">qlabel.h</include>
+ <include location="global" impldecl="in declaration">tqlabel.h</include>
<include location="global" impldecl="in declaration">kactivelabel.h</include>
- <include location="global" impldecl="in declaration">qlistview.h</include>
+ <include location="global" impldecl="in declaration">tqlistview.h</include>
<include location="global" impldecl="in implementation">kdialog.h</include>
</includes>
<layoutdefaults spacing="6" margin="11"/>
diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp
index 199256b59..0962a7916 100644
--- a/khtml/java/kjavaappletserver.cpp
+++ b/khtml/java/kjavaappletserver.cpp
@@ -680,7 +680,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb )
KSSLCertChain chain;
chain.setChain( certs );
if ( chain.isValid() )
- answer = PermissionDialog( tqApp->activeWindow() ).exec( text, args[0] );
+ answer = PermissionDialog( TQT_TQWIDGET(tqApp->activeWindow()) ).exec( text, args[0] );
}
}
sl.push_front( TQString(answer) );
@@ -826,7 +826,7 @@ PermissionDialog::~PermissionDialog()
void PermissionDialog::clicked()
{
- m_button = sender()->name();
+ m_button = TQT_TQOBJECT_CONST(sender())->name();
static_cast<const TQWidget*>(sender())->tqparentWidget()->close();
}
diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp
index 7e9264786..c51fd4017 100644
--- a/khtml/java/kjavaappletviewer.cpp
+++ b/khtml/java/kjavaappletviewer.cpp
@@ -369,7 +369,7 @@ bool KJavaAppletViewer::eventFilter (TQObject *o, TQEvent *e) {
KJavaAppletViewer::~KJavaAppletViewer () {
m_view = 0L;
- serverMaintainer->releaseContext (parent(), baseurl);
+ serverMaintainer->releaseContext (TQT_TQOBJECT(parent()), baseurl);
if (m_statusbar_icon) {
m_statusbar->removeStatusBarItem (m_statusbar_icon);
delete m_statusbar_icon;
diff --git a/khtml/java/kjavaappletwidget.cpp b/khtml/java/kjavaappletwidget.cpp
index 2e9597b2d..a8238b9f0 100644
--- a/khtml/java/kjavaappletwidget.cpp
+++ b/khtml/java/kjavaappletwidget.cpp
@@ -46,11 +46,11 @@ KJavaAppletWidget::KJavaAppletWidget( TQWidget* parent, const char* name )
m_applet = new KJavaApplet( this );
d = new KJavaAppletWidgetPrivate;
- m_kwm = new KWinModule( this );
+ m_kwm = new KWinModule( TQT_TQOBJECT(this) );
d->tmplabel = new TQLabel( this );
d->tmplabel->setText( KJavaAppletServer::getAppletLabel() );
- d->tmplabel->tqsetAlignment( Qt::AlignCenter | Qt::WordBreak );
+ d->tmplabel->tqsetAlignment( Qt::AlignCenter | TQt::WordBreak );
d->tmplabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
d->tmplabel->show();
diff --git a/khtml/java/kjavaappletwidget.h b/khtml/java/kjavaappletwidget.h
index 0b8ce90e9..f69ee59aa 100644
--- a/khtml/java/kjavaappletwidget.h
+++ b/khtml/java/kjavaappletwidget.h
@@ -75,7 +75,7 @@
class KJavaAppletWidgetPrivate;
-class KJavaAppletWidget : public TQXEmbed
+class KJavaAppletWidget : public QXEmbed
{
Q_OBJECT
public:
diff --git a/khtml/java/kjavaprocess.cpp b/khtml/java/kjavaprocess.cpp
index 48eb7b764..6de192689 100644
--- a/khtml/java/kjavaprocess.cpp
+++ b/khtml/java/kjavaprocess.cpp
@@ -168,7 +168,7 @@ void KJavaProcess::storeSize( TQByteArray* buff )
const char* size_ptr = size_str.latin1();
for( int i = 0; i < 8; ++i )
- buff->at(i) = size_ptr[i];
+ buff->tqat(i) = size_ptr[i];
}
void KJavaProcess::sendBuffer( TQByteArray* buff )
diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp
index 4f2ceca79..9997a1aba 100644
--- a/khtml/khtml_ext.cpp
+++ b/khtml/khtml_ext.cpp
@@ -40,7 +40,7 @@
#include <tqpopupmenu.h>
#include <tqurl.h>
#include <tqmetaobject.h>
-#include <private/qucomextra_p.h>
+#include <tqucomextra_p.h>
#include <tqdragobject.h>
#include <kdebug.h>
@@ -223,7 +223,7 @@ void KHTMLPartBrowserExtension::copy()
text.replace( TQChar( 0xa0 ), ' ' );
- QClipboard *cb = TQApplication::clipboard();
+ TQClipboard *cb = TQApplication::tqclipboard();
disconnect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) );
#ifndef QT_NO_MIMECLIPBOARD
TQString htmltext;
@@ -264,7 +264,7 @@ void KHTMLPartBrowserExtension::copy()
void KHTMLPartBrowserExtension::searchProvider()
{
// action name is of form "previewProvider[<searchproviderprefix>:]"
- const TQString searchProviderPrefix = TQString( sender()->name() ).mid( 14 );
+ const TQString searchProviderPrefix = TQString( TQT_TQOBJECT_CONST(sender())->name() ).mid( 14 );
KURIFilterData data;
TQStringList list;
@@ -315,11 +315,11 @@ void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method )
if ( !m_extensionProxy )
return;
- int slot = m_extensionProxy->tqmetaObject()->findSlot( method );
+ int slot = m_extensionProxy->tqmetaObject()->tqfindSlot( method );
if ( slot == -1 )
return;
- QUObject o[ 1 ];
+ TQUObject o[ 1 ];
m_extensionProxy->qt_invoke( slot, o );
}
@@ -335,7 +335,7 @@ void KHTMLPartBrowserExtension::updateEditActions()
// ### duplicated from KonqMainWindow::slotClipboardDataChanged
#ifndef QT_NO_MIMECLIPBOARD // Handle minimalized versions of Qt Embedded
- TQMimeSource *data = TQApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
enableAction( "paste", data->provides( "text/plain" ) );
#else
TQString data=TQApplication::clipboard()->text();
@@ -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::clipboard()->setData( new KURLDrag( lst ), QClipboard::Clipboard );
- TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Selection );
+ TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection );
#else
- TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ TQApplication::tqclipboard()->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::clipboard()->setData( drag, QClipboard::Clipboard );
- TQApplication::clipboard()->setData( new KURLDrag(lst), QClipboard::Selection );
+ TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->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,8 +756,8 @@ void KHTMLPopupGUIClient::slotCopyImageLocation()
// Set it in both the mouse selection and in the clipboard
KURL::List lst;
lst.append( safeURL );
- TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Clipboard );
- TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Selection );
+ TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection );
#else
TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
#endif
diff --git a/khtml/khtml_factory.cpp b/khtml/khtml_factory.cpp
index dc7614dce..981f8e49e 100644
--- a/khtml/khtml_factory.cpp
+++ b/khtml/khtml_factory.cpp
@@ -146,7 +146,7 @@ void KHTMLFactory::registerPart( KHTMLPart *part )
if ( !s_parts )
s_parts = new TQPtrList<KHTMLPart>;
- if ( !s_parts->containsRef( part ) )
+ if ( !s_parts->tqcontainsRef( part ) )
{
s_parts->append( part );
ref();
diff --git a/khtml/khtml_pagecache.cpp b/khtml/khtml_pagecache.cpp
index 33462110a..bd8f29a30 100644
--- a/khtml/khtml_pagecache.cpp
+++ b/khtml/khtml_pagecache.cpp
@@ -95,8 +95,8 @@ KHTMLPageCacheEntry::endData()
{
m_complete = true;
if ( m_file->status() == 0) {
- m_file->dataStream()->device()->flush();
- m_file->dataStream()->device()->at(0);
+ m_file->dataStream()->tqdevice()->flush();
+ m_file->dataStream()->tqdevice()->at(0);
}
}
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index e59b7fe3f..98a99ffa9 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -111,7 +111,7 @@ using namespace DOM;
#include <tqfile.h>
#include <tqtooltip.h>
#include <tqmetaobject.h>
-#include <private/qucomextra_p.h>
+#include <tqucomextra_p.h>
#include "khtmlpart_p.h"
#include "kpassivepopup.h"
@@ -128,7 +128,7 @@ namespace khtml {
PartStyleSheetLoader(KHTMLPart *part, DOM::DOMString url, DocLoader* dl)
{
m_part = part;
- m_cachedSheet = dl->requestStyleSheet(url, TQString::null, "text/css",
+ m_cachedSheet = dl->requestStyleSheet(url, TQString(), "text/css",
true /* "user sheet" */);
if (m_cachedSheet)
m_cachedSheet->ref( this );
@@ -186,7 +186,7 @@ void khtml::ChildFrame::liveConnectEvent(const unsigned long, const TQString & e
if (m_jscript) {
// we have a jscript => a part in an iframe
KJS::Completion cmp;
- m_jscript->evaluate(TQString::null, 1, script, 0L, &cmp);
+ m_jscript->evaluate(TQString(), 1, script, 0L, &cmp);
} else
part->executeScript(m_frame->element(), script);
}
@@ -233,7 +233,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
else if ( prof == BrowserViewGUI )
setXMLFile( "khtml_browser.rc" );
- d = new KHTMLPartPrivate(parent());
+ d = new KHTMLPartPrivate(tqparent());
d->m_view = view;
setWidget( d->m_view );
@@ -576,7 +576,7 @@ bool KHTMLPart::openURL( const KURL &url )
closeURL();
if( d->m_bJScriptEnabled )
- d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString::null;
+ d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString();
/**
* The format of the error url is that two variables are passed in the query:
@@ -604,7 +604,7 @@ bool KHTMLPart::openURL( const KURL &url )
if (!parentPart()) { // only do it for toplevel part
TQString host = url.isLocalFile() ? "localhost" : url.host();
TQString userAgent = KProtocolManager::userAgentForHost(host);
- if (userAgent != KProtocolManager::userAgentForHost(TQString::null)) {
+ if (userAgent != KProtocolManager::userAgentForHost(TQString())) {
if (!d->m_statusBarUALabel) {
d->m_statusBarUALabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarUALabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small));
@@ -734,7 +734,7 @@ bool KHTMLPart::openURL( const KURL &url )
// delete old status bar msg's from kjs (if it _was_ activated on last URL)
if( d->m_bJScriptEnabled )
- d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString::null;
+ d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString();
// set the javascript flags according to the current url
d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host());
@@ -1195,7 +1195,7 @@ TQVariant KHTMLPart::executeScript( const DOM::Node &n, const TQString &script )
return TQVariant();
++(d->m_runningScripts);
KJS::Completion comp;
- const TQVariant ret = proxy->evaluate( TQString::null, 1, script, n, &comp );
+ const TQVariant ret = proxy->evaluate( TQString(), 1, script, n, &comp );
--(d->m_runningScripts);
/*
@@ -1466,7 +1466,7 @@ void KHTMLPart::clear()
this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
d->m_delayRedirect = 0;
- d->m_redirectURL = TQString::null;
+ d->m_redirectURL = TQString();
d->m_redirectionTimer.stop();
d->m_redirectLockHistory = true;
d->m_bClearing = false;
@@ -1486,7 +1486,7 @@ void KHTMLPart::clear()
d->m_jobPercent = 0;
if ( !d->m_haveEncoding )
- d->m_encoding = TQString::null;
+ d->m_encoding = TQString();
#ifdef SPEED_DEBUG
d->m_parsetime.restart();
#endif
@@ -1660,7 +1660,7 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const TQByteArray &data )
// Support for http last-modified
d->m_lastModified = d->m_job->queryMetaData("modified");
} else
- d->m_lastModified = TQString::null; // done on-demand by lastModified()
+ d->m_lastModified = TQString(); // done on-demand by lastModified()
}
KHTMLPageCache::self()->addData(d->m_cacheId, data);
@@ -1911,7 +1911,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
args.yOffset = yOffset;
d->m_extension->setURLArgs( args );
- d->m_pageReferrer = TQString::null;
+ d->m_pageReferrer = TQString();
KURL ref(url);
d->m_referrer = ref.protocol().startsWith("http") ? ref.url() : "";
@@ -2301,11 +2301,11 @@ void KHTMLPart::checkCompleted()
d->m_paUseStylesheet->setEnabled( sheets.count() > 2);
if (sheets.count() > 2)
{
- d->m_paUseStylesheet->setCurrentItem(kMax(sheets.findIndex(d->m_sheetUsed), 0));
+ d->m_paUseStylesheet->setCurrentItem(kMax(sheets.tqfindIndex(d->m_sheetUsed), 0));
slotUseStylesheet();
}
- setJSDefaultStatusBarText(TQString::null);
+ setJSDefaultStatusBarText(TQString());
#ifdef SPEED_DEBUG
kdDebug(6050) << "DONE: " <<d->m_parsetime.elapsed() << endl;
@@ -2359,7 +2359,7 @@ KURL KHTMLPart::baseURL() const
TQString KHTMLPart::baseTarget() const
{
- if ( !d->m_doc ) return TQString::null;
+ if ( !d->m_doc ) return TQString();
return d->m_doc->baseTarget();
}
@@ -2399,7 +2399,7 @@ void KHTMLPart::slotRedirect()
kdDebug(6050) << this << " slotRedirect()" << endl;
TQString u = d->m_redirectURL;
d->m_delayRedirect = 0;
- d->m_redirectURL = TQString::null;
+ d->m_redirectURL = TQString();
// SYNC check with ecma/kjs_window.cpp::goURL !
if ( u.tqfind( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 )
@@ -3435,15 +3435,15 @@ TQString KHTMLPart::selectedTextAsHTML() const
{
if(!hasSelection()) {
kdDebug() << "selectedTextAsHTML(): selection is not valid. Returning empty selection" << endl;
- return TQString::null;
+ return TQString();
}
if(d->m_startOffset < 0 || d->m_endOffset <0) {
kdDebug() << "invalid values for end/startOffset " << d->m_startOffset << " " << d->m_endOffset << endl;
- return TQString::null;
+ return TQString();
}
DOM::Range r = selection();
if(r.isNull() || r.isDetached())
- return TQString::null;
+ return TQString();
int exceptioncode = 0; //ignore the result
return r.handle()->toHTML(exceptioncode).string();
}
@@ -3574,7 +3574,7 @@ TQString KHTMLPart::selectedText() const
}
if(text.isEmpty())
- return TQString::null;
+ return TQString();
int start = 0;
int end = text.length();
@@ -3708,10 +3708,10 @@ void KHTMLPart::resetHoverText()
{
if( !d->m_overURL.isEmpty() ) // Only if we were showing a link
{
- d->m_overURL = d->m_overURLTarget = TQString::null;
- emit onURL( TQString::null );
+ d->m_overURL = d->m_overURLTarget = TQString();
+ emit onURL( TQString() );
// revert to default statusbar text
- setStatusBarText(TQString::null, BarHoverText);
+ setStatusBarText(TQString(), BarHoverText);
emit d->m_extension->mouseOverInfo(0);
}
}
@@ -3740,7 +3740,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi
return;
}
- KFileItem item(u, TQString::null, KFileItem::Unknown);
+ KFileItem item(u, TQString(), KFileItem::Unknown);
emit d->m_extension->mouseOverInfo(&item);
TQString com;
@@ -3852,7 +3852,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi
else if ((*it).startsWith(TQString::tqfromLatin1("bcc=")))
mailtoMsg += i18n(" - BCC: ") + KURL::decode_string((*it).mid(4));
mailtoMsg = TQStyleSheet::escape(mailtoMsg);
- mailtoMsg.replace(TQRegExp("([\n\r\t]|[ ]{10})"), TQString::null);
+ mailtoMsg.replace(TQRegExp("([\n\r\t]|[ ]{10})"), TQString());
setStatusBarText("<qt>"+mailtoMsg, BarHoverText);
return;
}
@@ -3930,7 +3930,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c
return true;
}
- if ( button == LeftButton && ( state & ShiftButton ) )
+ if ( button == Qt::LeftButton && ( state & ShiftButton ) )
{
KIO::MetaData metaData;
metaData["referrer"] = d->m_referrer;
@@ -3965,11 +3965,11 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c
}
}
- if (!d->m_referrer.isEmpty() && !args.metaData().contains("referrer"))
+ if (!d->m_referrer.isEmpty() && !args.metaData().tqcontains("referrer"))
args.metaData()["referrer"] = d->m_referrer;
- if ( button == NoButton && (state & ShiftButton) && (state & ControlButton) )
+ if ( button == Qt::NoButton && (state & ShiftButton) && (state & ControlButton) )
{
emit d->m_extension->createNewWindow( cURL, args );
return true;
@@ -4017,7 +4017,7 @@ void KHTMLPart::slotViewDocumentSource()
bool isTempFile = false;
if (!(url.isLocalFile()) && KHTMLPageCache::self()->isComplete(d->m_cacheId))
{
- KTempFile sourceFile(TQString::null, defaultExtension());
+ KTempFile sourceFile(TQString(), defaultExtension());
if (sourceFile.status() == 0)
{
KHTMLPageCache::self()->saveData(d->m_cacheId, sourceFile.dataStream());
@@ -4032,7 +4032,7 @@ void KHTMLPart::slotViewDocumentSource()
void KHTMLPart::slotViewPageInfo()
{
- KHTMLInfoDlg *dlg = new KHTMLInfoDlg(NULL, "KHTML Page Info Dialog", false, WDestructiveClose);
+ KHTMLInfoDlg *dlg = new KHTMLInfoDlg(NULL, "KHTML Page Info Dialog", false, (WFlags)WDestructiveClose);
dlg->_close->setGuiItem(KStdGuiItem::close());
if (d->m_doc)
@@ -4043,7 +4043,7 @@ void KHTMLPart::slotViewPageInfo()
dlg->setCaption(i18n("Frame Information"));
}
- TQString editStr = TQString::null;
+ TQString editStr = TQString();
if (!d->m_pageServices.isEmpty())
editStr = i18n(" <a href=\"%1\">[Properties]</a>").arg(d->m_pageServices);
@@ -4097,7 +4097,7 @@ void KHTMLPart::slotViewFrameSource()
if (KHTMLPageCache::self()->isComplete(cacheId))
{
- KTempFile sourceFile(TQString::null, defaultExtension());
+ KTempFile sourceFile(TQString(), defaultExtension());
if (sourceFile.status() == 0)
{
KHTMLPageCache::self()->saveData(cacheId, sourceFile.dataStream());
@@ -4276,7 +4276,7 @@ void KHTMLPart::updateActions()
{
TQObject *ext = KParts::BrowserExtension::childObject( frame );
if ( ext )
- enablePrintFrame = ext->tqmetaObject()->slotNames().contains( "print()" );
+ enablePrintFrame = ext->tqmetaObject()->slotNames().tqcontains( "print()" );
}
d->m_paPrintFrame->setEnabled( enablePrintFrame );
@@ -4305,7 +4305,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, con
const TQStringList &params, bool isIFrame )
{
//kdDebug( 6050 ) << this << " requestFrame( ..., " << url << ", " << frameName << " )" << endl;
- FrameIt it = d->m_frames.tqfind( frameName );
+ FrameIt it = d->m_frames.find( frameName );
if ( it == d->m_frames.end() )
{
khtml::ChildFrame * child = new khtml::ChildFrame;
@@ -4392,8 +4392,8 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const
child->m_args = args;
child->m_args.reload = (d->m_cachePolicy == KIO::CC_Reload);
- child->m_serviceName = TQString::null;
- if (!d->m_referrer.isEmpty() && !child->m_args.metaData().contains( "referrer" ))
+ child->m_serviceName = TQString();
+ if (!d->m_referrer.isEmpty() && !child->m_args.metaData().tqcontains( "referrer" ))
child->m_args.metaData()["referrer"] = d->m_referrer;
child->m_args.metaData().insert("PropagateHttpHeader", "true");
@@ -4459,7 +4459,7 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
url, mimetype, suggestedFilename );
switch( res ) {
case KParts::BrowserRun::Save:
- KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), TQString::null, 0, suggestedFilename);
+ KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), TQString(), 0, suggestedFilename);
// fall-through
case KParts::BrowserRun::Cancel:
child->m_bCompleted = true;
@@ -4652,14 +4652,14 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *tqparentWidget, const cha
if ( !serviceName.isEmpty() )
constr.append( TQString::tqfromLatin1( "Name == '%1'" ).arg( serviceName ) );
- KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString::null );
+ KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString() );
if ( offers.isEmpty() ) {
int pos = mimetype.tqfind( "-plugin" );
if (pos < 0)
return 0L;
TQString stripped_mime = mimetype.left( pos );
- offers = KTrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, TQString::null );
+ offers = KTrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, TQString() );
if ( offers.isEmpty() )
return 0L;
}
@@ -4675,13 +4675,13 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *tqparentWidget, const cha
KParts::ReadOnlyPart *res = 0L;
const char *className = "KParts::ReadOnlyPart";
- if ( service->serviceTypes().contains( "Browser/View" ) )
+ if ( service->serviceTypes().tqcontains( "Browser/View" ) )
className = "Browser/View";
if ( factory->inherits( "KParts::Factory" ) )
res = static_cast<KParts::ReadOnlyPart *>(static_cast<KParts::Factory *>( factory )->createPart( tqparentWidget, widgetName, parent, name, className, params ));
else
- res = static_cast<KParts::ReadOnlyPart *>(factory->create( tqparentWidget, widgetName, className ));
+ res = static_cast<KParts::ReadOnlyPart *>(factory->create( TQT_TQOBJECT(tqparentWidget), widgetName, className ));
if ( res ) {
serviceTypes = service->serviceTypes();
@@ -4690,8 +4690,8 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *tqparentWidget, const cha
}
} else {
// TODO KMessageBox::error and i18n, like in KonqFactory::createView?
- kdWarning() << TQString("There was an error loading the module %1.\nThe diagnostics is:\n%2")
- .arg(service->name()).arg(KLibLoader::self()->lastErrorMessage()) << endl;
+ kdWarning() << TQString(TQString("There was an error loading the module %1.\nThe diagnostics is:\n%2")
+ .arg(service->name()).arg(KLibLoader::self()->lastErrorMessage())) << endl;
}
}
return 0;
@@ -5014,7 +5014,7 @@ void KHTMLPart::popupMenu( const TQString &linkUrl )
if ( !guard.isNull() ) {
delete client;
emit popupMenu(linkUrl, TQCursor::pos());
- d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString();
}
}
@@ -5030,7 +5030,7 @@ void KHTMLPart::slotParentCompleted()
void KHTMLPart::slotChildStarted( KIO::Job *job )
{
- khtml::ChildFrame *child = frame( sender() );
+ khtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender()) );
assert( child );
@@ -5057,7 +5057,7 @@ void KHTMLPart::slotChildCompleted()
void KHTMLPart::slotChildCompleted( bool pendingAction )
{
- khtml::ChildFrame *child = frame( sender() );
+ khtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender()) );
if ( child ) {
kdDebug(6050) << this << " slotChildCompleted child=" << child << " m_frame=" << child->m_frame << endl;
@@ -5090,7 +5090,7 @@ void KHTMLPart::slotChildDocCreated()
void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &args )
{
- khtml::ChildFrame *child = frame( sender()->parent() );
+ khtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender())->tqparent() );
KHTMLPart *callingHtmlPart = const_cast<KHTMLPart *>(dynamic_cast<const KHTMLPart *>(sender()->parent()));
// TODO: handle child target correctly! currently the script are always executed fur the parent
@@ -5116,7 +5116,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
else if ( frameName == TQString::tqfromLatin1( "_parent" ) )
{
KParts::URLArgs newArgs( args );
- newArgs.frameName = TQString::null;
+ newArgs.frameName = TQString();
emit d->m_extension->openURLRequest( url, newArgs );
return;
@@ -5142,7 +5142,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
} else if ( frameName== "_self" ) // this is for embedded objects (via <object>) which want to replace the current document
{
KParts::URLArgs newArgs( args );
- newArgs.frameName = TQString::null;
+ newArgs.frameName = TQString();
emit d->m_extension->openURLRequest( url, newArgs );
}
}
@@ -5224,7 +5224,7 @@ KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f
if (!childFrame && !parentPart() && (TQString::fromLocal8Bit(name()) == f))
return this;
- FrameIt it = d->m_frames.tqfind( f );
+ FrameIt it = d->m_frames.find( f );
const FrameIt end = d->m_frames.end();
if ( it != end )
{
@@ -5287,7 +5287,7 @@ KParts::ReadOnlyPart *KHTMLPart::currentFrame() const
bool KHTMLPart::frameExists( const TQString &frameName )
{
- ConstFrameIt it = d->m_frames.tqfind( frameName );
+ ConstFrameIt it = d->m_frames.find( frameName );
if ( it == d->m_frames.end() )
return false;
@@ -5728,7 +5728,7 @@ void KHTMLPart::setZoomFactor (int percent)
d->m_zoomFactor = percent;
if(d->m_doc) {
- TQApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( tqwaitCursor );
if (d->m_doc->styleSelector())
d->m_doc->styleSelector()->computeFontSizes(d->m_doc->paintDeviceMetrics(), d->m_zoomFactor);
d->m_doc->recalcStyle( NodeImpl::Force );
@@ -5816,14 +5816,14 @@ TQString KHTMLPart::pageReferrer() const
if ((protocol == "http") ||
((protocol == "https") && (m_url.protocol() == "https")))
{
- referrerURL.setRef(TQString::null);
- referrerURL.setUser(TQString::null);
- referrerURL.setPass(TQString::null);
+ referrerURL.setRef(TQString());
+ referrerURL.setUser(TQString());
+ referrerURL.setPass(TQString());
return referrerURL.url();
}
}
- return TQString::null;
+ return TQString();
}
@@ -5874,7 +5874,7 @@ void KHTMLPart::reparseConfiguration()
delete d->m_settings;
d->m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
- TQApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( tqwaitCursor );
khtml::CSSStyleSelector::reparseConfiguration();
if(d->m_doc) d->m_doc->updateStyleSelector();
TQApplication::restoreOverrideCursor();
@@ -5912,7 +5912,7 @@ TQPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
bool KHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
{
kdDebug( 6050 ) << this << "KHTMLPart::openURLInFrame " << url << endl;
- FrameIt it = d->m_frames.tqfind( urlArgs.frameName );
+ FrameIt it = d->m_frames.find( urlArgs.frameName );
if ( it == d->m_frames.end() )
return false;
@@ -6055,15 +6055,15 @@ void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
d->m_strSelectedURLTarget = event->target().string();
}
else
- d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString();
- if ( _mouse->button() == LeftButton ||
- _mouse->button() == MidButton )
+ if ( _mouse->button() == Qt::LeftButton ||
+ _mouse->button() == Qt::MidButton )
{
d->m_bMousePressed = true;
#ifndef KHTML_NO_SELECTION
- if ( _mouse->button() == LeftButton )
+ if ( _mouse->button() == Qt::LeftButton )
{
if ( (!d->m_strSelectedURL.isNull() && !isEditable())
|| (!d->m_mousePressNode.isNull() && d->m_mousePressNode.elementId() == ID_IMG) )
@@ -6111,10 +6111,10 @@ void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
#endif
}
- if ( _mouse->button() == RightButton && parentPart() != 0 && d->m_bBackRightClick )
+ if ( _mouse->button() == Qt::RightButton && parentPart() != 0 && d->m_bBackRightClick )
{
d->m_bRightMousePressed = true;
- } else if ( _mouse->button() == RightButton )
+ } else if ( _mouse->button() == Qt::RightButton )
{
popupMenu( d->m_strSelectedURL );
// might be deleted, don't touch "this"
@@ -6124,7 +6124,7 @@ void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
void KHTMLPart::khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent *event )
{
TQMouseEvent *_mouse = event->qmouseEvent();
- if ( _mouse->button() == LeftButton )
+ if ( _mouse->button() == Qt::LeftButton )
{
d->m_bMousePressed = true;
DOM::Node innerNode = event->innerNode();
@@ -6248,7 +6248,7 @@ void KHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& se
//kdDebug() << "obj=" << obj << endl;
if ( obj ) {
//kdDebug() << "isText=" << obj->isText() << endl;
- str = TQString::null;
+ str = TQString();
if ( obj->isText() )
str = static_cast<khtml::RenderText *>(obj)->data().string();
else if ( obj->isBR() )
@@ -6378,7 +6378,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
if( d->m_bRightMousePressed && parentPart() != 0 && d->m_bBackRightClick )
{
popupMenu( d->m_strSelectedURL );
- d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString();
d->m_bRightMousePressed = false;
}
@@ -6415,7 +6415,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium);
}
- u.setPass(TQString::null);
+ u.setPass(TQString());
KURLDrag* urlDrag = new KURLDrag( u, img ? 0 : d->m_view->viewport() );
if ( !d->m_referrer.isEmpty() )
@@ -6439,7 +6439,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
// when we finish our drag, we need to undo our mouse press
d->m_bMousePressed = false;
- d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString();
return;
}
#endif
@@ -6493,7 +6493,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
#ifndef KHTML_NO_SELECTION
// selection stuff
if( d->m_bMousePressed && innerNode.handle() && innerNode.handle()->renderer() &&
- ( (_mouse->state() & LeftButton) != 0 )) {
+ ( (_mouse->state() & Qt::LeftButton) != 0 )) {
extendSelectionTo(event->x(), event->y(),
event->absX(), event->absY(), innerNode);
#else
@@ -6516,7 +6516,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
d->m_mousePressNode = DOM::Node();
if ( d->m_bMousePressed ) {
- setStatusBarText(TQString::null, BarHoverText);
+ setStatusBarText(TQString(), BarHoverText);
stopAutoScroll();
}
@@ -6525,7 +6525,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
d->m_bMousePressed = false;
TQMouseEvent *_mouse = event->qmouseEvent();
- if ( _mouse->button() == RightButton && parentPart() != 0 && d->m_bBackRightClick )
+ if ( _mouse->button() == Qt::RightButton && parentPart() != 0 && d->m_bBackRightClick )
{
d->m_bRightMousePressed = false;
KParts::BrowserInterface *tmp_iface = d->m_extension->browserInterface();
@@ -6534,7 +6534,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
}
}
#ifndef QT_NO_CLIPBOARD
- if ((d->m_guiProfile == BrowserViewGUI) && (_mouse->button() == MidButton) && (event->url().isNull())) {
+ if ((d->m_guiProfile == BrowserViewGUI) && (_mouse->button() == Qt::MidButton) && (event->url().isNull())) {
kdDebug( 6050 ) << "KHTMLPart::khtmlMouseReleaseEvent() MMB shouldOpen="
<< d->m_bOpenMiddleClick << endl;
@@ -6660,9 +6660,9 @@ void KHTMLPart::slotPrintFrame()
TQMetaObject *mo = ext->tqmetaObject();
- int idx = mo->findSlot( "print()", true );
+ int idx = mo->tqfindSlot( "print()", true );
if ( idx >= 0 ) {
- QUObject o[ 1 ];
+ TQUObject o[ 1 ];
ext->qt_invoke( idx, o );
}
}
@@ -6854,7 +6854,7 @@ void KHTMLPart::slotPartRemoved( KParts::Part *part )
if (factory()) {
factory()->removeClient( part );
}
- if (childClients()->containsRef(part)) {
+ if (childClients()->tqcontainsRef(part)) {
removeChildClient( part );
}
}
@@ -6999,7 +6999,7 @@ bool KHTMLPart::pluginPageQuestionAsked(const TQString& mimetype) const
if ( parent )
return parent->pluginPageQuestionAsked(mimetype);
- return d->m_pluginPageQuestionAsked.contains(mimetype);
+ return d->m_pluginPageQuestionAsked.tqcontains(mimetype);
}
void KHTMLPart::setPluginPageQuestionAsked(const TQString& mimetype)
@@ -7072,7 +7072,7 @@ void KHTMLPart::slotAutomaticDetectionLanguage( int _id )
d->m_paSetEncoding->popupMenu()->setItemChecked( 0, true );
- setEncoding( TQString::null, false );
+ setEncoding( TQString(), false );
if( d->m_manualDetection )
d->m_manualDetection->setCurrentItem( -1 );
@@ -7379,7 +7379,7 @@ void KHTMLPart::setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart
if ( enable && originPart ) {
d->m_openableSuppressedPopups++;
- if ( d->m_suppressedPopupOriginParts.findIndex( originPart ) == -1 )
+ if ( d->m_suppressedPopupOriginParts.tqfindIndex( originPart ) == -1 )
d->m_suppressedPopupOriginParts.append( originPart );
}
diff --git a/khtml/khtml_printsettings.cpp b/khtml/khtml_printsettings.cpp
index 1b3e9c245..466e3066c 100644
--- a/khtml/khtml_printsettings.cpp
+++ b/khtml/khtml_printsettings.cpp
@@ -80,7 +80,7 @@ KHTMLPrintSettings::KHTMLPrintSettings(TQWidget *parent, const char *name)
TQWhatsThis::add(m_printheader, whatsThisPrintHeader);
m_printheader->setChecked(true);
- QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
+ TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(m_printfriendly);
l0->addWidget(m_printimages);
l0->addWidget(m_printheader);
diff --git a/khtml/khtml_printsettings.h b/khtml/khtml_printsettings.h
index 3c8456849..b26c98144 100644
--- a/khtml/khtml_printsettings.h
+++ b/khtml/khtml_printsettings.h
@@ -35,9 +35,9 @@ public:
void setOptions(const TQMap<TQString,TQString>& opts);
private:
- QCheckBox *m_printfriendly;
- QCheckBox *m_printimages;
- QCheckBox *m_printheader;
+ TQCheckBox *m_printfriendly;
+ TQCheckBox *m_printimages;
+ TQCheckBox *m_printheader;
};
#endif
diff --git a/khtml/khtml_settings.cc b/khtml/khtml_settings.cc
index bcefa88c6..57ff92689 100644
--- a/khtml/khtml_settings.cc
+++ b/khtml/khtml_settings.cc
@@ -878,7 +878,7 @@ const TQString &KHTMLSettings::availableFamilies()
if ( !avFamilies ) {
avFamilies = new TQString;
TQFontDatabase db;
- TQStringList families = db.families();
+ TQStringList families = db.tqfamilies();
TQStringList s;
TQRegExp foundryExp(" \\[.+\\]");
@@ -888,7 +888,7 @@ const TQString &KHTMLSettings::availableFamilies()
for ( ; f != fEnd; ++f ) {
(*f).replace( foundryExp, "");
- if (!s.contains(*f))
+ if (!s.tqcontains(*f))
s << *f;
}
s.sort();
diff --git a/khtml/khtml_settings.h b/khtml/khtml_settings.h
index d7ef32eab..8641c3131 100644
--- a/khtml/khtml_settings.h
+++ b/khtml/khtml_settings.h
@@ -214,7 +214,7 @@ public:
// Meta refresh/redirect (http-equiv)
bool isAutoDelayedActionsEnabled () const;
- TQValueList< QPair< TQString, TQChar > > fallbackAccessKeysAssignments() const;
+ TQValueList< TQPair< TQString, TQChar > > fallbackAccessKeysAssignments() const;
// Whether to show passive popup when windows are blocked
// @since 3.5
diff --git a/khtml/khtmldefaults.h b/khtml/khtmldefaults.h
index 6480611ed..8b674ffe0 100644
--- a/khtml/khtmldefaults.h
+++ b/khtml/khtmldefaults.h
@@ -19,10 +19,10 @@
*/
// browser window color defaults -- Bernd
-#define HTML_DEFAULT_LNK_COLOR Qt::blue
-#define HTML_DEFAULT_TXT_COLOR Qt::black
-#define HTML_DEFAULT_VLNK_COLOR Qt::magenta
-#define HTML_DEFAULT_BASE_COLOR Qt::white
+#define HTML_DEFAULT_LNK_COLOR TQt::blue
+#define HTML_DEFAULT_TXT_COLOR TQt::black
+#define HTML_DEFAULT_VLNK_COLOR TQt::magenta
+#define HTML_DEFAULT_BASE_COLOR TQt::white
#define HTML_DEFAULT_VIEW_FONT "Sans Serif"
#define HTML_DEFAULT_VIEW_FIXED_FONT "Monospace"
diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp
index 58306a4a5..37bbbb443 100644
--- a/khtml/khtmlview.cpp
+++ b/khtml/khtmlview.cpp
@@ -114,7 +114,7 @@ class KHTMLToolTip;
#ifndef QT_NO_TOOLTIP
-class KHTMLToolTip : public QToolTip
+class KHTMLToolTip : public TQToolTip
{
public:
KHTMLToolTip(KHTMLView *view, KHTMLViewPrivate* vp) : TQToolTip(view->viewport())
@@ -485,7 +485,7 @@ void KHTMLToolTip::maybeTip(const TQPoint& p)
#endif
KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name)
- : TQScrollView( parent, name, WResizeNoErase | WRepaintNoErase )
+ : TQScrollView( parent, name, (WFlags)(WResizeNoErase | WRepaintNoErase) )
{
m_medium = "screen";
@@ -499,7 +499,7 @@ KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name)
// initialize QScrollView
enableClipper(true);
// hack to get unclipped painting on the viewport.
- static_cast<KHTMLView *>(static_cast<TQWidget *>(viewport()))->setWFlags(WPaintUnclipped);
+ static_cast<KHTMLView *>(TQT_TQWIDGET(viewport()))->setWFlags(WPaintUnclipped);
setResizePolicy(Manual);
viewport()->setMouseTracking(true);
@@ -546,7 +546,7 @@ void KHTMLView::init()
d->vertPaintBuffer = new TQPixmap(10, PAINT_BUFFER_HEIGHT);
if(!d->tp) d->tp = new TQPainter();
- setFocusPolicy(TQWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
viewport()->setFocusProxy(this);
_marginWidth = -1; // undefined
@@ -579,7 +579,7 @@ void KHTMLView::clear()
if ( d->cursor_icon_widget )
d->cursor_icon_widget->hide();
d->reset();
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
emit cleared();
TQScrollView::setHScrollBarMode(d->hmode);
@@ -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, palette().active().brush(TQColorGroup::Base));
+ p->fillRect(ex, ey, ew, eh, tqpalette().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, palette().active().brush(TQColorGroup::Base));
+ d->tp->fillRect(ex, ey, ew, eh, tqpalette().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, palette().active().brush(TQColorGroup::Base));
+ d->tp->fillRect(ex, ey+py, ew, ph, tqpalette().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, palette().active().brush(TQColorGroup::Base));
+ p->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base));
m_part->xmlDocImpl()->renderer()->layer()->paint(p, pr);
#endif // DEBUG_NO_PAINT_BUFFER
@@ -911,8 +911,8 @@ void KHTMLView::closeChildDialogs()
}
else
{
- kdWarning() << "closeChildDialogs: not a KDialogBase! Don't use QDialogs in KDE! " << static_cast<TQWidget*>(dlg) << endl;
- static_cast<TQWidget*>(dlg)->hide();
+ kdWarning() << "closeChildDialogs: not a KDialogBase! Don't use QDialogs in KDE! " << TQT_TQWIDGET(dlg) << endl;
+ TQT_TQWIDGET(dlg)->hide();
}
}
delete dlgs;
@@ -941,7 +941,7 @@ void KHTMLView::closeEvent( TQCloseEvent* ev )
void KHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
{
if (!m_part->xmlDocImpl()) return;
- if (d->possibleTripleClick && ( _mouse->button() & MouseButtonMask ) == LeftButton)
+ if (d->possibleTripleClick && ( _mouse->button() & Qt::MouseButtonMask ) == Qt::LeftButton)
{
viewportMouseDoubleClickEvent( _mouse ); // it handles triple clicks too
return;
@@ -958,7 +958,7 @@ void KHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
//kdDebug(6000) << "innerNode="<<mev.innerNode.nodeName().string()<<endl;
- if ( (_mouse->button() == MidButton) &&
+ if ( (_mouse->button() == Qt::MidButton) &&
!m_part->d->m_bOpenMiddleClick && !d->m_mouseScrollTimer &&
mev.url.isNull() && (mev.innerNode.elementId() != ID_INPUT) ) {
TQPoint point = mapFromGlobal( _mouse->globalPos() );
@@ -1114,9 +1114,9 @@ static inline void forwardPeripheralEvent(khtml::RenderWidget* r, TQMouseEvent*
TQWidget* w = r->widget();
TQScrollView* sc = ::tqqt_cast<TQScrollView*>(w);
if (sc && !::tqqt_cast<TQListBox*>(w))
- static_cast<khtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(&fw);
+ static_cast<khtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(TQT_TQEVENT(&fw));
else if(w)
- static_cast<khtml::RenderWidget::EventPropagator*>(w)->sendEvent(&fw);
+ static_cast<khtml::RenderWidget::EventPropagator*>(w)->sendEvent(TQT_TQEVENT(&fw));
}
@@ -1147,8 +1147,8 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
(deltaX > 0) ? d->m_mouseScroll_byX = 1 : d->m_mouseScroll_byX = -1;
(deltaY > 0) ? d->m_mouseScroll_byY = 1 : d->m_mouseScroll_byY = -1;
- double adX = QABS(deltaX)/30.0;
- double adY = QABS(deltaY)/30.0;
+ double adX = TQABS(deltaX)/30.0;
+ double adY = TQABS(deltaY)/30.0;
d->m_mouseScroll_byX = kMax(kMin(d->m_mouseScroll_byX * int(adX*adX), SHRT_MAX), SHRT_MIN);
d->m_mouseScroll_byY = kMax(kMin(d->m_mouseScroll_byY * int(adY*adY), SHRT_MAX), SHRT_MIN);
@@ -1285,8 +1285,8 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
attr.save_under = True;
XChangeWindowAttributes( qt_xdisplay(), d->cursor_icon_widget->winId(), CWSaveUnder, &attr );
d->cursor_icon_widget->resize( icon_pixmap.width(), icon_pixmap.height());
- if( icon_pixmap.mask() )
- d->cursor_icon_widget->setMask( *icon_pixmap.mask());
+ if( icon_pixmap.tqmask() )
+ d->cursor_icon_widget->setMask( *icon_pixmap.tqmask());
else
d->cursor_icon_widget->clearMask();
d->cursor_icon_widget->setBackgroundPixmap( icon_pixmap );
@@ -1341,7 +1341,7 @@ void KHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse )
DOM::NodeImpl* fn = m_part->xmlDocImpl()->focusNode();
if (fn && fn != mev.innerNode.handle() &&
fn->renderer() && fn->renderer()->isWidget() &&
- _mouse->button() != MidButton) {
+ _mouse->button() != Qt::MidButton) {
forwardPeripheralEvent(static_cast<khtml::RenderWidget*>(fn->renderer()), _mouse, xm, ym);
}
@@ -1472,7 +1472,7 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke )
_ke->accept();
return;
}
- else if(_ke->key() == Key_Space || !_ke->text().stripWhiteSpace().isEmpty())
+ else if(_ke->key() == Key_Space || !TQString(_ke->text()).stripWhiteSpace().isEmpty())
{
d->findString += _ke->text();
@@ -1528,7 +1528,7 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke )
}
int offs = (clipper()->height() < 30) ? clipper()->height() : 30;
- if (_ke->state() & Qt::ShiftButton)
+ if (_ke->state() & TQt::ShiftButton)
switch(_ke->key())
{
case Key_Space:
@@ -1729,8 +1729,8 @@ void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke)
if( d->scrollSuspendPreActivate && _ke->key() != Key_Shift )
d->scrollSuspendPreActivate = false;
- if( _ke->key() == Key_Shift && d->scrollSuspendPreActivate && _ke->state() == Qt::ShiftButton
- && !(KApplication::keyboardMouseState() & Qt::ShiftButton))
+ if( _ke->key() == Key_Shift && d->scrollSuspendPreActivate && _ke->state() == TQt::ShiftButton
+ && !(KApplication::keyboardMouseState() & TQt::ShiftButton))
{
if (d->scrollTimerId)
{
@@ -1746,7 +1746,7 @@ void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke)
{
if (d->accessKeysPreActivate && _ke->key() != Key_Control)
d->accessKeysPreActivate=false;
- if (d->accessKeysPreActivate && _ke->state() == Qt::ControlButton && !(KApplication::keyboardMouseState() & Qt::ControlButton))
+ if (d->accessKeysPreActivate && _ke->state() == TQt::ControlButton && !(KApplication::keyboardMouseState() & TQt::ControlButton))
{
displayAccessKeys();
m_part->setStatusBarText(i18n("Access Keys activated"),KHTMLPart::BarOverrideText);
@@ -1854,7 +1854,7 @@ void KHTMLView::doAutoScroll()
}
-class HackWidget : public QWidget
+class HackWidget : public TQWidget
{
public:
inline void setNoErase() { setWFlags(getWFlags()|WRepaintNoErase); }
@@ -1895,13 +1895,13 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
TQWidget *view = viewport();
- if (o == view) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(view)) {
// we need to install an event filter on all children of the viewport to
// be able to get correct stacking of children within the document.
if(e->type() == TQEvent::ChildInserted) {
- TQObject *c = static_cast<TQChildEvent *>(e)->child();
+ TQObject *c = TQT_TQOBJECT(TQT_TQCHILDEVENT(e)->child());
if (c->isWidgetType()) {
- TQWidget *w = static_cast<TQWidget *>(c);
+ TQWidget *w = TQT_TQWIDGET(c);
// don't install the event filter on toplevels
if (w->tqparentWidget(true) == view) {
if (!strcmp(w->name(), "__khtml")) {
@@ -1910,8 +1910,8 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
if (!::tqqt_cast<TQFrame*>(w))
w->setBackgroundMode( TQWidget::NoBackground );
static_cast<HackWidget *>(w)->setNoErase();
- if (w->children()) {
- TQObjectListIterator it(*w->children());
+ if (!w->childrenListObject().isEmpty()) {
+ TQObjectListIterator it(w->childrenListObject());
for (; it.current(); ++it) {
TQWidget *widget = ::tqqt_cast<TQWidget *>(it.current());
if (widget && !widget->isTopLevel()) {
@@ -1927,7 +1927,7 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
}
}
} else if (o->isWidgetType()) {
- TQWidget *v = static_cast<TQWidget *>(o);
+ TQWidget *v = TQT_TQWIDGET(o);
TQWidget *c = v;
while (v && v != view) {
c = v;
@@ -1936,7 +1936,7 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
if (v && !strcmp(c->name(), "__khtml")) {
bool block = false;
- TQWidget *w = static_cast<TQWidget *>(o);
+ TQWidget *w = TQT_TQWIDGET(o);
switch(e->type()) {
case TQEvent::Paint:
if (!allowWidgetPaintEvents) {
@@ -1951,7 +1951,7 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
v = v->tqparentWidget();
}
viewportToContents( x, y, x, y );
- TQPaintEvent *pe = static_cast<TQPaintEvent *>(e);
+ TQPaintEvent *pe = TQT_TQPAINTEVENT(e);
bool asap = !d->contentsMoving && ::tqqt_cast<TQScrollView *>(c);
// TQScrollView needs fast tqrepaints
@@ -1970,7 +1970,7 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::MouseButtonRelease:
case TQEvent::MouseButtonDblClick: {
if ( (w->tqparentWidget() == view || ::tqqt_cast<TQScrollView*>(c)) && !::tqqt_cast<TQScrollBar *>(w)) {
- TQMouseEvent *me = static_cast<TQMouseEvent *>(e);
+ TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
TQPoint pt = w->mapTo( view, me->pos());
TQMouseEvent me2(me->type(), pt, me->button(), me->state());
@@ -1989,7 +1989,7 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::KeyPress:
case TQEvent::KeyRelease:
if (w->tqparentWidget() == view && !::tqqt_cast<TQScrollBar *>(w)) {
- TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
if (e->type() == TQEvent::KeyPress)
keyPressEvent(ke);
else
@@ -2275,14 +2275,14 @@ void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQVal
if( tqFind( taken.begin(), taken.end(), a ) == taken.end()) // !contains
accesskey = a;
}
- if( accesskey.isNull() && fallbacks.contains( en )) {
+ if( accesskey.isNull() && fallbacks.tqcontains( en )) {
TQChar a = fallbacks[ en ].upper();
if( tqFind( taken.begin(), taken.end(), a ) == taken.end()) // !contains
accesskey = TQString( "<qt><i>" ) + a + "</i></qt>";
}
if( !accesskey.isNull()) {
TQRect rec=en->getRect();
- TQLabel *lab=new TQLabel(accesskey,viewport(),0,Qt::WDestructiveClose);
+ TQLabel *lab=new TQLabel(accesskey,viewport(),0,(WFlags)WDestructiveClose);
connect( origview, TQT_SIGNAL(hideAccessKeys()), lab, TQT_SLOT(close()) );
connect( this, TQT_SIGNAL(tqrepaintAccessKeys()), lab, TQT_SLOT(tqrepaint()));
lab->setPalette(TQToolTip::palette());
@@ -2409,9 +2409,13 @@ bool KHTMLView::focusNodeWithAccessKey( TQChar c, KHTMLView* caller )
guard = node;
}
// Set focus node on the document
+#ifdef USE_QT4
+ m_part->xmlDocImpl()->setFocusNode(node);
+#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Shortcut );
m_part->xmlDocImpl()->setFocusNode(node);
TQFocusEvent::resetReason();
+#endif // USE_QT4
if( node != NULL && node->hasOneRef()) // deleted, only held by guard
return true;
emit m_part->nodeActivated(Node(node));
@@ -2621,7 +2625,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
}
if( ignore )
continue;
- if( text.isNull() && labels.contains( element ))
+ if( text.isNull() && labels.tqcontains( element ))
text = labels[ element ];
if( text.isNull() && text_before )
text = getElementText( element, false );
@@ -2629,9 +2633,9 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
text = getElementText( element, true );
text = text.stripWhiteSpace();
// increase priority of items which have explicitly specified accesskeys in the config
- TQValueList< QPair< TQString, TQChar > > priorities
+ TQValueList< TQPair< TQString, TQChar > > priorities
= m_part->settings()->fallbackAccessKeysAssignments();
- for( TQValueList< QPair< TQString, TQChar > >::ConstIterator it = priorities.begin();
+ for( TQValueList< TQPair< TQString, TQChar > >::ConstIterator it = priorities.begin();
it != priorities.end();
++it ) {
if( text == (*it).first )
@@ -2676,12 +2680,12 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
TQString text = (*it).text;
TQChar key;
if( key.isNull() && !text.isEmpty()) {
- TQValueList< QPair< TQString, TQChar > > priorities
+ TQValueList< TQPair< TQString, TQChar > > priorities
= m_part->settings()->fallbackAccessKeysAssignments();
- for( TQValueList< QPair< TQString, TQChar > >::ConstIterator it = priorities.begin();
+ for( TQValueList< TQPair< TQString, TQChar > >::ConstIterator it = priorities.begin();
it != priorities.end();
++it )
- if( text == (*it).first && keys.contains( (*it).second )) {
+ if( text == (*it).first && keys.tqcontains( (*it).second )) {
key = (*it).second;
break;
}
@@ -2694,7 +2698,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
for( TQStringList::ConstIterator it = words.begin();
it != words.end();
++it ) {
- if( keys.contains( (*it)[ 0 ].upper())) {
+ if( keys.tqcontains( (*it)[ 0 ].upper())) {
key = (*it)[ 0 ].upper();
break;
}
@@ -2704,7 +2708,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
for( unsigned int i = 0;
i < text.length();
++i ) {
- if( keys.contains( text[ i ].upper())) {
+ if( keys.tqcontains( text[ i ].upper())) {
key = text[ i ].upper();
break;
}
@@ -2717,7 +2721,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
TQString url = (*it).url;
it = data.remove( it );
// assign the same accesskey also to other elements pointing to the same url
- if( !url.isEmpty() && !url.startsWith( "javascript:", false )) {
+ if( !url.isEmpty() && !url.tqstartsWith( "javascript:", false )) {
for( TQValueList< AccessKeyData >::Iterator it2 = data.begin();
it2 != data.end();
) {
@@ -2753,7 +2757,7 @@ bool KHTMLView::pagedMode() const
void KHTMLView::setWidgetVisible(RenderWidget* w, bool vis)
{
if (vis) {
- d->visibleWidgets.replace(w, w->widget());
+ d->visibleWidgets.tqreplace(w, w->widget());
}
else
d->visibleWidgets.remove(w);
@@ -2781,7 +2785,7 @@ void KHTMLView::print(bool quick)
if ( !docname.isEmpty() )
docname = KStringHandler::csqueeze(docname, 80);
if(quick || printer->setup(this, i18n("Print %1").arg(docname))) {
- viewport()->setCursor( waitCursor ); // only viewport(), no TQApplication::, otherwise we get the busy cursor in kdeprint's dialogs
+ viewport()->setCursor( tqwaitCursor ); // only viewport(), no TQApplication::, otherwise we get the busy cursor in kdeprint's dialogs
// set up KPrinter
printer->setFullPage(false);
printer->setCreator(TQString("KDE %1.%2.%3 HTML Library").arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(KDE_VERSION_RELEASE));
@@ -2835,7 +2839,7 @@ void KHTMLView::print(bool quick)
int headerHeight = 0;
TQFont headerFont("Sans Serif", 8);
- TQString headerLeft = KGlobal::locale()->formatDate(TQDate::tqcurrentDate(),true);
+ TQString headerLeft = KGlobal::locale()->formatDate(TQDate::currentDate(),true);
TQString headerMid = docname;
TQString headerRight;
@@ -2951,7 +2955,7 @@ void KHTMLView::print(bool quick)
d->paged = false;
khtml::setPrintPainter( 0 );
setMediaType( oldMediaType );
- m_part->xmlDocImpl()->setPaintDevice( this );
+ m_part->xmlDocImpl()->setPaintDevice( TQT_TQPAINTDEVICE(this) );
m_part->xmlDocImpl()->styleSelector()->computeFontSizes(m_part->xmlDocImpl()->paintDeviceMetrics(), m_part->zoomFactor());
m_part->xmlDocImpl()->updateStyleSelector();
viewport()->unsetCursor();
@@ -2979,7 +2983,7 @@ void KHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more)
khtml::RenderCanvas *root = static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer());
if(!root) return;
- m_part->xmlDocImpl()->setPaintDevice(p->device());
+ m_part->xmlDocImpl()->setPaintDevice(p->tqdevice());
root->setPagedMode(true);
root->setStaticMode(true);
root->setWidth(rc.width());
@@ -3002,7 +3006,7 @@ void KHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more)
root->setPagedMode(false);
root->setStaticMode(false);
- m_part->xmlDocImpl()->setPaintDevice( this );
+ m_part->xmlDocImpl()->setPaintDevice( TQT_TQPAINTDEVICE(this) );
}
@@ -3081,7 +3085,7 @@ void KHTMLView::addFormCompletionItem(const TQString &name, const TQString &valu
if (cc_number)
return;
TQStringList items = formCompletionItems(name);
- if (!items.contains(value))
+ if (!items.tqcontains(value))
items.prepend(value);
while ((int)items.count() > m_part->settings()->maxFormCompletionItems())
items.remove(items.fromLast());
@@ -3156,13 +3160,13 @@ bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
int screenY = _mouse->globalY();
int button = -1;
switch (_mouse->button()) {
- case LeftButton:
+ case Qt::LeftButton:
button = 0;
break;
- case MidButton:
+ case Qt::MidButton:
button = 1;
break;
- case RightButton:
+ case Qt::RightButton:
button = 2;
break;
default:
@@ -3278,12 +3282,12 @@ void KHTMLView::viewportWheelEvent(TQWheelEvent* e)
{
e->accept();
}
- else if( ( (e->orientation() == Vertical &&
+ else if( ( (e->orientation() == Qt::Vertical &&
((d->ignoreWheelEvents && !verticalScrollBar()->isVisible())
|| e->delta() > 0 && contentsY() <= 0
|| e->delta() < 0 && contentsY() >= contentsHeight() - visibleHeight()))
||
- (e->orientation() == Horizontal &&
+ (e->orientation() == Qt::Horizontal &&
((d->ignoreWheelEvents && !horizontalScrollBar()->isVisible())
|| e->delta() > 0 && contentsX() <=0
|| e->delta() < 0 && contentsX() >= contentsWidth() - visibleWidth())))
@@ -3511,7 +3515,7 @@ void KHTMLView::timerEvent ( TQTimerEvent *e )
d->tqrepaintTimerId = 0;
TQRect updateRegion;
- TQMemArray<TQRect> rects = d->updateRegion.rects();
+ TQMemArray<TQRect> rects = d->updateRegion.tqrects();
d->updateRegion = TQRegion();
@@ -3609,7 +3613,7 @@ void KHTMLView::scheduleRepaint(int x, int y, int w, int h, bool asap)
int vx, vy;
contentsToViewport( x, y, vx, vy );
- p.fillRect( vx, vy, w, h, Qt::red );
+ p.fillRect( vx, vy, w, h, TQt::red );
p.end();
#endif
@@ -4600,13 +4604,13 @@ void KHTMLView::scrollViewWheelEvent( TQWheelEvent *e )
{
int pageStep = verticalScrollBar()->pageStep();
int lineStep = verticalScrollBar()->lineStep();
- int step = QMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
+ int step = TQMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) )
step = pageStep;
- if(e->orientation() == Horizontal)
+ if(e->orientation() == Qt::Horizontal)
scrollBy(-((e->delta()*step)/120), 0);
- else if(e->orientation() == Vertical)
+ else if(e->orientation() == Qt::Vertical)
scrollBy(0,-((e->delta()*step)/120));
e->accept();
diff --git a/khtml/kjserrordlg.ui b/khtml/kjserrordlg.ui
index 7a86c2569..1cf9f88af 100644
--- a/khtml/kjserrordlg.ui
+++ b/khtml/kjserrordlg.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KJSErrorDlg</class>
<author>George Staikos &lt;staikos@kde.org&gt;</author>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KJSErrorDlg</cstring>
</property>
@@ -23,7 +23,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="4" column="2">
+ <widget class="TQPushButton" row="4" column="2">
<property name="name">
<cstring>_close</cstring>
</property>
@@ -31,7 +31,7 @@
<string>&amp;Close</string>
</property>
</widget>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>_clear</cstring>
</property>
@@ -70,7 +70,7 @@
</size>
</property>
</spacer>
- <widget class="QTextBrowser" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQTextBrowser" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>_errorText</cstring>
</property>
@@ -119,12 +119,12 @@
<include location="global" impldecl="in declaration">kdialog.h</include>
<include location="global" impldecl="in declaration">ksqueezedtextlabel.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot>init()</slot>
- <slot>addError( const QString &amp; error )</slot>
- <slot>setURL( const QString &amp; url )</slot>
+ <slot>addError( const TQString &amp; error )</slot>
+ <slot>setURL( const TQString &amp; url )</slot>
<slot>clear()</slot>
-</slots>
+</Q_SLOTS>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
diff --git a/khtml/kmultipart/kmultipart.cpp b/khtml/kmultipart/kmultipart.cpp
index ef76339ab..187e051d1 100644
--- a/khtml/kmultipart/kmultipart.cpp
+++ b/khtml/kmultipart/kmultipart.cpp
@@ -51,7 +51,7 @@ public:
Q_ASSERT( !m_lineComplete );
if ( storeNewline || c != '\n' ) {
int sz = m_currentLine.size();
- m_currentLine.resize( sz+1, TQGArray::SpeedOptim );
+ m_currentLine.tqresize( sz+1, TQGArray::SpeedOptim );
m_currentLine[sz] = c;
}
if ( c == '\n' )
@@ -68,7 +68,7 @@ public:
reset();
}
void reset() {
- m_currentLine.resize( 0, TQGArray::SpeedOptim );
+ m_currentLine.tqresize( 0, TQGArray::SpeedOptim );
m_lineComplete = false;
}
private:
diff --git a/khtml/misc/knsplugininstaller.cpp b/khtml/misc/knsplugininstaller.cpp
index 1a9bf62bb..09de5a149 100644
--- a/khtml/misc/knsplugininstaller.cpp
+++ b/khtml/misc/knsplugininstaller.cpp
@@ -49,7 +49,7 @@
/*
* Utility class to associate a list item with a pluginInfo object
*/
-class PluginListItem : public QListViewItem
+class PluginListItem : public TQListViewItem
{
public:
diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp
index 3d9d7b531..bc25991ea 100644
--- a/khtml/misc/loader.cpp
+++ b/khtml/misc/loader.cpp
@@ -264,7 +264,7 @@ void CachedCSSStyleSheet::data( TQBuffer &buffer, bool eof )
m_charset = c->name();
}
TQString data = c->toUnicode( buffer.buffer().data(), m_size );
- // workaround Qt bugs
+ // workaround TQt bugs
m_sheet = static_cast<TQChar>(data[0]) == TQChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
m_loading = false;
@@ -380,7 +380,7 @@ void CachedScript::error( int /*err*/, const char* /*text*/ )
namespace khtml
{
-class ImageSource : public QDataSource
+class ImageSource : public TQDataSource
{
public:
ImageSource(TQByteArray buf)
@@ -397,7 +397,7 @@ public:
void sendTo(TQDataSink* sink, int n)
{
- sink->receive((const uchar*)&buffer.at(pos), n);
+ sink->receive((const uchar*)&buffer.tqat(pos), n);
pos += n;
@@ -526,7 +526,7 @@ void CachedImage::deref( CachedObjectClient *c )
const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int xHeight)
{
- static QRgb bgTransparent = tqRgba( 0, 0, 0, 0xFF );
+ static TQRgb bgTransparent = tqRgba( 0, 0, 0, 0xFF );
TQSize s(pixmap_size());
int w = xWidth;
@@ -564,7 +564,7 @@ const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int x
bgSize = TQSize(xWidth, xHeight);
//See whether we can - and should - pre-blend
- if (isvalid && (r.hasAlphaChannel() || r.mask() )) {
+ if (isvalid && (r.hasAlphaChannel() || r.tqmask() )) {
bg = new TQPixmap(xWidth, xHeight, r.depth());
bg->fill(newc);
bitBlt(bg, 0, 0, src);
@@ -618,7 +618,7 @@ const TQPixmap &CachedImage::scaled_pixmap( int xWidth, int xHeight )
// kdDebug() << "scaling " << r.width() << "," << r.height() << " to " << xWidth << "," << xHeight << endl;
- TQImage image = r.convertToImage().smoothScale(xWidth, xHeight);
+ TQImage image = TQImage(r.convertToImage()).smoothScale(xWidth, xHeight);
scaled = new TQPixmap(xWidth, xHeight, r.depth());
scaled->convertFromImage(image);
@@ -671,7 +671,7 @@ TQSize CachedImage::pixmap_size() const
TQRect CachedImage::valid_rect() const
{
if (m_wasBlocked) return Cache::blockedPixmap->rect();
- return (m_hadError ? Cache::brokenPixmap->rect() : m ? m->getValidRect() : ( p ? p->rect() : TQRect()) );
+ return (m_hadError ? Cache::brokenPixmap->rect() : m ? TQRect(m->getValidRect()) : ( p ? TQRect(p->rect()) : TQRect()) );
}
@@ -702,7 +702,7 @@ void CachedImage::movieStatus(int status)
// netscape). We have a problem though where an image is present, and js code creates a new Image object,
// which uses the same CachedImage, the one in the document is not supposed to be notified
- // just another Qt 2.2.0 bug. we cannot call
+ // just another TQt 2.2.0 bug. we cannot call
// TQMovie::frameImage if we're after TQMovie::EndOfMovie
if(status == TQMovie::EndOfFrame)
{
@@ -748,9 +748,9 @@ void CachedImage::movieStatus(int status)
if (p && monochrome && p->depth() > 1)
{
TQPixmap* pix = new TQPixmap;
- pix->convertFromImage( p->convertToImage().convertDepth( 1 ), MonoOnly|AvoidDither );
- if ( p->mask() )
- pix->setMask( *p->mask() );
+ pix->convertFromImage( TQImage(p->convertToImage()).convertDepth( 1 ), MonoOnly|AvoidDither );
+ if ( p->tqmask() )
+ pix->setMask( *p->tqmask() );
delete p;
p = pix;
monochrome = false;
@@ -787,7 +787,7 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati
delete p;
p = new TQPixmap(m->framePixmap());
m->disconnectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
- m->disconnectStatus( this, TQT_SLOT( movieStatus( int ) ));
+ m->disconnectqStatus( this, TQT_SLOT( movieStatus( int ) ));
m->disconnectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
TQTimer::singleShot(0, this, TQT_SLOT( deleteMovie()));
imgSource = 0;
@@ -850,7 +850,7 @@ void CachedImage::data ( TQBuffer &_buffer, bool eof )
imgSource = new ImageSource( _buffer.buffer());
m = new TQMovie( imgSource, 8192 );
m->connectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
- m->connectStatus( this, TQT_SLOT( movieStatus(int)));
+ m->connectqStatus( this, TQT_SLOT( movieStatus(int)));
m->connectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
}
}
@@ -993,7 +993,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL)
bool reload = false;
if (m_cachePolicy == KIO::CC_Verify)
{
- if (!m_reloadedURLs.contains(fullURL))
+ if (!m_reloadedURLs.tqcontains(fullURL))
{
if (existing && existing->isExpired())
{
@@ -1005,7 +1005,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL)
}
else if ((m_cachePolicy == KIO::CC_Reload) || (m_cachePolicy == KIO::CC_Refresh))
{
- if (!m_reloadedURLs.contains(fullURL))
+ if (!m_reloadedURLs.tqcontains(fullURL))
{
if (existing)
{
@@ -1427,7 +1427,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
KIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : KIO::CC_Verify;
TQString url = kurl.url();
- CachedObject* o = cache->find(url);
+ CachedObject* o = cache->tqfind(url);
if ( o && o->type() != CachedType ) {
removeCacheEntry( o );
@@ -1464,7 +1464,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_data)
{
- CachedObject *o = cache->find(url);
+ CachedObject *o = cache->tqfind(url);
if(o)
removeCacheEntry(o);
@@ -1474,7 +1474,7 @@ void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_d
void Cache::preloadScript( const TQString &url, const TQString &script_data)
{
- CachedObject *o = cache->find(url);
+ CachedObject *o = cache->tqfind(url);
if(o)
removeCacheEntry(o);
diff --git a/khtml/misc/loader_jpeg.cpp b/khtml/misc/loader_jpeg.cpp
index 8c6404924..b1fa4aeed 100644
--- a/khtml/misc/loader_jpeg.cpp
+++ b/khtml/misc/loader_jpeg.cpp
@@ -186,7 +186,7 @@ khtml_jpeg_source_mgr::khtml_jpeg_source_mgr()
// -----------------------------------------------------------------------------
-class KJPEGFormat : public QImageFormat
+class KJPEGFormat : public TQImageFormat
{
public:
KJPEGFormat();
@@ -312,7 +312,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
{
if(jpeg_read_header(&cinfo, true) != JPEG_SUSPENDED) {
// do some simple memory requirements limitations
- // as long as we use that stupid Qt stuff
+ // as long as we use that stupid TQt stuff
int s = cinfo.image_width * cinfo.image_height;
if ( s > 16384 * 12388 )
cinfo.scale_denom = 8;
@@ -427,7 +427,7 @@ again:
// Expand 24->32 bpp.
for (int j=oldoutput_scanline; j<oldoutput_scanline+completed_scanlines; j++) {
uchar *in = image.scanLine(j) + cinfo.output_width * 3;
- QRgb *out = (QRgb*)image.scanLine(j);
+ TQRgb *out = (TQRgb*)image.scanLine(j);
for (uint i=cinfo.output_width; i--; ) {
in-=3;
@@ -519,7 +519,7 @@ again:
}
// -----------------------------------------------------------------------------
-// This is the factory that teaches Qt about progressive JPEG's
+// This is the factory that teaches TQt about progressive JPEG's
TQImageFormat* khtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length)
{
diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp
index 64ede83e3..766c89840 100644
--- a/khtml/rendering/font.cpp
+++ b/khtml/rendering/font.cpp
@@ -407,7 +407,7 @@ bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font)
/* Cache size info */
if (!scalSizesCache)
scalSizesCache = new TQMap<ScalKey, TQValueList<int> >;
- (*scalSizesCache)[key] = db.smoothSizes(font.family(), db.styleString(font));
+ (*scalSizesCache)[key] = db.tqsmoothSizes(font.family(), db.styleString(font));
}
}
diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp
index 602b07d0a..e558352af 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()->palette().active().color(TQColorGroup::Base);
+ bgColor = canvas()->view()->tqpalette().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 2065d8b1a..c06f9f15d 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()->palette().active().color(TQColorGroup::Base));
+ paintInfo.p->fillRect(paintInfo.r, view()->tqpalette().active().color(TQColorGroup::Base));
}
void RenderCanvas::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool f)
@@ -492,7 +492,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
no = no->nextSibling();
}
}
- if (os->selectionState() == SelectionInside && !oldSelectedInside.containsRef(os))
+ if (os->selectionState() == SelectionInside && !oldSelectedInside.tqcontainsRef(os))
oldSelectedInside.append(os);
os = no;
@@ -550,7 +550,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
if (no)
no = no->nextSibling();
}
- if (o->selectionState() == SelectionInside && !newSelectedInside.containsRef(o))
+ if (o->selectionState() == SelectionInside && !newSelectedInside.tqcontainsRef(o))
newSelectedInside.append(o);
o=no;
@@ -581,7 +581,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
TQPtrListIterator<RenderObject> oldIterator(oldSelectedInside);
bool firstRect = true;
for (; oldIterator.current(); ++oldIterator){
- if (!newSelectedInside.containsRef(oldIterator.current())){
+ if (!newSelectedInside.tqcontainsRef(oldIterator.current())){
if (firstRect){
updateRect = enclosingPositionedRect(oldIterator.current());
firstRect = false;
@@ -601,7 +601,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
TQPtrListIterator<RenderObject> newIterator(newSelectedInside);
firstRect = true;
for (; newIterator.current(); ++newIterator){
- if (!oldSelectedInside.containsRef(newIterator.current())){
+ if (!oldSelectedInside.tqcontainsRef(newIterator.current())){
if (firstRect){
updateRect = enclosingPositionedRect(newIterator.current());
firstRect = false;
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index f06dd4a62..272d402b4 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -104,20 +104,20 @@ TQ_Alignment RenderFormElement::textAlignment() const
switch (style()->textAlign()) {
case LEFT:
case KHTML_LEFT:
- return AlignLeft;
+ return Qt::AlignLeft;
case RIGHT:
case KHTML_RIGHT:
- return AlignRight;
+ return Qt::AlignRight;
case CENTER:
case KHTML_CENTER:
- return AlignHCenter;
+ return Qt::AlignHCenter;
case JUSTIFY:
// Just fall into the auto code for justify.
case TAAUTO:
- return style()->direction() == RTL ? AlignRight : AlignLeft;
+ return style()->direction() == RTL ? Qt::AlignRight : Qt::AlignLeft;
}
assert(false); // Should never be reached.
- return AlignLeft;
+ return Qt::AlignLeft;
}
// -------------------------------------------------------------------------
@@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget );
- TQSize s( cb->style().tqpixelMetric( TQStyle::PM_IndicatorWidth ),
- cb->style().tqpixelMetric( TQStyle::PM_IndicatorHeight ) );
+ TQSize s( cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorWidth ),
+ cb->tqstyle().tqpixelMetric( 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->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
- rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
+ TQSize s( rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
+ rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -263,14 +263,14 @@ void RenderSubmitButton::calcMinMaxWidth()
raw = TQString::tqfromLatin1("X");
TQFontMetrics fm = pb->fontMetrics();
TQSize ts = fm.size( ShowPrefix, raw);
- TQSize s(pb->style().sizeFromContents( TQStyle::CT_PushButton, pb, ts )
+ TQSize s(pb->tqstyle().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts )
.expandedTo(TQApplication::globalStrut()));
- int margin = pb->style().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) +
- pb->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
+ int margin = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) +
+ pb->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
int w = ts.width() + margin;
int h = s.height();
if (pb->isDefault() || pb->autoDefault()) {
- int dbw = pb->style().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
+ int dbw = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
w += dbw;
}
@@ -312,7 +312,7 @@ LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view
{
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_spellAction = KStdAction::spelling( this, TQT_SLOT( slotCheckSpelling() ), ac );
+ m_spellAction = KStdAction::spelling( TQT_TQOBJECT(this), TQT_SLOT( slotCheckSpelling() ), ac );
}
LineEditWidget::~LineEditWidget()
@@ -328,7 +328,7 @@ void LineEditWidget::slotCheckSpelling()
}
delete m_spell;
- m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+ m_spell = new KSpell( this, i18n( "Spell Checking" ), TQT_TQOBJECT(this), TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
connect( m_spell, TQT_SIGNAL( death() ),this, TQT_SLOT( spellCheckerFinished() ) );
connect( m_spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) );
@@ -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->style().sizeFromContents(TQStyle::CT_LineEdit,
+ TQSize s = edit->tqstyle().tqsizeFromContents(TQStyle::CT_LineEdit,
edit,
TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
.expandedTo(TQApplication::globalStrut());
@@ -890,7 +890,7 @@ bool ComboBoxWidget::event(TQEvent *e)
return true;
if (e->type()==TQEvent::KeyPress)
{
- TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
switch(ke->key())
{
case Key_Return:
@@ -907,9 +907,9 @@ bool ComboBoxWidget::event(TQEvent *e)
bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{
- if (dest==listBox() && e->type()==TQEvent::KeyPress)
+ if (TQT_BASE_OBJECT(dest)==TQT_BASE_OBJECT(listBox()) && e->type()==TQEvent::KeyPress)
{
- TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
bool forward = false;
switch(ke->key())
{
@@ -1295,9 +1295,9 @@ TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent)
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_findAction = KStdAction::find( this, TQT_SLOT( slotFind() ), ac );
- m_findNextAction = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac );
- m_replaceAction = KStdAction::replace( this, TQT_SLOT( slotReplace() ), ac );
+ m_findAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( slotFind() ), ac );
+ m_findNextAction = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( slotFindNext() ), ac );
+ m_replaceAction = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( slotReplace() ), ac );
}
diff --git a/khtml/rendering/render_form.h b/khtml/rendering/render_form.h
index c414e079c..db5088d20 100644
--- a/khtml/rendering/render_form.h
+++ b/khtml/rendering/render_form.h
@@ -95,7 +95,7 @@ public:
protected:
virtual bool isRenderButton() const { return false; }
virtual bool isEditable() const { return false; }
- AlignmentFlags textAlignment() const;
+ TQ_Alignment textAlignment() const;
TQPoint m_mousePos;
int m_state;
diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp
index b157df16d..08f26b8bd 100644
--- a/khtml/rendering/render_frames.cpp
+++ b/khtml/rendering/render_frames.cpp
@@ -550,7 +550,7 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt )
TQPainter paint( view );
paint.setPen( Qt::gray );
paint.setBrush( Qt::gray );
- paint.setRasterOp( Qt::XorROP );
+ paint.setRasterOp( TQt::XorROP );
TQRect r(xPos(), yPos(), width(), height());
const int rBord = 3;
int sw = element()->border();
@@ -634,7 +634,7 @@ void RenderPart::setWidget( TQWidget *widget )
#endif
setQWidget( widget );
- widget->setFocusPolicy(TQWidget::WheelFocus);
+ widget->setFocusPolicy(TQ_WheelFocus);
if(widget->inherits("KHTMLView"))
connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) );
diff --git a/khtml/rendering/render_frames.h b/khtml/rendering/render_frames.h
index c6e93cbe0..3dd7ed0d9 100644
--- a/khtml/rendering/render_frames.h
+++ b/khtml/rendering/render_frames.h
@@ -61,7 +61,7 @@ public:
bool canResize( int _x, int _y);
void setResizing(bool e);
- Qt::tqCursorShape cursorShape() const { return m_cursor; }
+ Qt::CursorShape cursorShape() const { return m_cursor; }
bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction hitTestAction, bool inside);
@@ -73,7 +73,7 @@ public:
#endif
private:
- Qt::tqCursorShape m_cursor;
+ Qt::CursorShape m_cursor;
int m_oldpos;
int m_gridLen[2];
int* m_gridDelta[2];
diff --git a/khtml/rendering/render_generated.cpp b/khtml/rendering/render_generated.cpp
index ba80a5aa1..f5fc70687 100644
--- a/khtml/rendering/render_generated.cpp
+++ b/khtml/rendering/render_generated.cpp
@@ -379,7 +379,7 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
diamond[2] = TQPoint(x+s, y+2*s);
diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
- p->drawConvexPolygon( diamond, 0, 4 );
+ p->tqdrawConvexPolygon( diamond, 0, 4 );
return;
}
case LNONE:
diff --git a/khtml/rendering/render_image.cpp b/khtml/rendering/render_image.cpp
index 2db7e56bb..1cd79eb55 100644
--- a/khtml/rendering/render_image.cpp
+++ b/khtml/rendering/render_image.cpp
@@ -115,7 +115,7 @@ void RenderImage::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
// we have an alt and the user meant it (its not a text we invented)
if ( element() && !alt.isEmpty() && !element()->getAttribute( ATTR_ALT ).isNull()) {
const TQFontMetrics &fm = style()->fontMetrics();
- TQRect br = fm.boundingRect ( 0, 0, 1024, 256, Qt::AlignAuto|Qt::WordBreak, alt.string() );
+ TQRect br = fm.boundingRect ( 0, 0, 1024, 256, TQt::AlignAuto|TQt::WordBreak, alt.string() );
if ( br.width() > iw )
iw = br.width();
if ( br.height() > ih )
@@ -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::palette().inactive(), true, 1 );
+ KApplication::tqpalette().inactive(), true, 1 );
}
TQPixmap const* pix = i ? &i->pixmap() : 0;
if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) )
@@ -283,7 +283,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
int ay = _ty + topBorder + topPad + 2;
const TQFontMetrics &fm = style()->fontMetrics();
if (cWidth>5 && cHeight>=fm.height())
- paintInfo.p->drawText(ax, ay+1, cWidth - 4, cHeight - 4, Qt::WordBreak, text );
+ paintInfo.p->drawText(ax, ay+1, cWidth - 4, cHeight - 4, TQt::WordBreak, text );
}
}
}
diff --git a/khtml/rendering/render_layer.cpp b/khtml/rendering/render_layer.cpp
index d1cdfa63e..fbb7a8dd6 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->style().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
+ return m_vBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@@ -650,7 +650,7 @@ int RenderLayer::horizontalScrollbarHeight()
#ifdef APPLE_CHANGES
return m_hBar->height();
#else
- return m_hBar->style().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
+ return m_hBar->tqstyle().tqpixelMetric(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->style().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
+ int sw = b->tqstyle().tqpixelMetric(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_list.cpp b/khtml/rendering/render_list.cpp
index 45767a8bb..515283f8b 100644
--- a/khtml/rendering/render_list.cpp
+++ b/khtml/rendering/render_list.cpp
@@ -333,7 +333,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
diamond[2] = TQPoint(x+s, y+2*s);
diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
- p->drawConvexPolygon( diamond, 0, 4 );
+ p->tqdrawConvexPolygon( diamond, 0, 4 );
return;
}
case LNONE:
@@ -342,25 +342,25 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
if (!m_item.isEmpty()) {
if(listPositionInside()) {
if( style()->direction() == LTR) {
- p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
- p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip,
+ p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
+ p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip,
TQString::tqfromLatin1(". "));
}
else {
const TQString& punct(TQString::tqfromLatin1(" ."));
- p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, punct);
- p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
+ p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct);
+ p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
}
} else {
if (style()->direction() == LTR) {
const TQString& punct(TQString::tqfromLatin1(". "));
- p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|Qt::DontClip, punct);
- p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|Qt::DontClip, m_item);
+ p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|TQt::DontClip, punct);
+ p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|TQt::DontClip, m_item);
}
else {
const TQString& punct(TQString::tqfromLatin1(" ."));
- p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, punct);
- p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
+ p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct);
+ p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
}
}
}
diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp
index 2efeae238..999bded25 100644
--- a/khtml/rendering/render_object.cpp
+++ b/khtml/rendering/render_object.cpp
@@ -748,7 +748,7 @@ void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
if(!c.isValid()) {
if(invalidisInvert)
{
- p->setRasterOp(Qt::XorROP);
+ p->setRasterOp(TQt::XorROP);
c = Qt::white;
}
else {
@@ -766,8 +766,8 @@ void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
case BNONE:
case BHIDDEN:
// should not happen
- if(invalidisInvert && p->rasterOp() == Qt::XorROP)
- p->setRasterOp(Qt::CopyROP);
+ if(invalidisInvert && p->rasterOp() == TQt::XorROP)
+ p->setRasterOp(TQt::CopyROP);
return;
case DOTTED:
@@ -964,8 +964,8 @@ void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
break;
}
- if(invalidisInvert && p->rasterOp() == Qt::XorROP)
- p->setRasterOp(Qt::CopyROP);
+ if(invalidisInvert && p->rasterOp() == TQt::XorROP)
+ p->setRasterOp(TQt::CopyROP);
}
void RenderObject::paintBorder(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin, bool end)
@@ -2223,7 +2223,7 @@ CounterNode* RenderObject::lookupCounter(const TQString& counter) const
{
TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (counters)
- return counters->find(counter);
+ return counters->tqfind(counter);
else
return 0;
}
diff --git a/khtml/rendering/render_replaced.cpp b/khtml/rendering/render_replaced.cpp
index 300328688..49c5097f6 100644
--- a/khtml/rendering/render_replaced.cpp
+++ b/khtml/rendering/render_replaced.cpp
@@ -139,11 +139,11 @@ RenderWidget::~RenderWidget()
}
}
-class QWidgetResizeEvent : public QEvent
+class TQWidgetResizeEvent : public TQEvent
{
public:
enum { Type = TQEvent::User + 0xbee };
- QWidgetResizeEvent( int _w, int _h ) :
+ TQWidgetResizeEvent( int _w, int _h ) :
TQEvent( ( TQEvent::Type ) Type ), w( _w ), h( _h ) {}
int w;
int h;
@@ -160,7 +160,7 @@ void RenderWidget::resizeWidget( int w, int h )
m_resizePending = isKHTMLWidget();
ref();
element()->ref();
- TQApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
+ TQApplication::postEvent( this, new TQWidgetResizeEvent( w, h ) );
element()->deref();
deref();
}
@@ -171,17 +171,17 @@ void RenderWidget::cancelPendingResize()
if (!m_widget)
return;
m_discardResizes = true;
- TQApplication::sendPostedEvents(this, QWidgetResizeEvent::Type);
+ TQApplication::sendPostedEvents(this, TQWidgetResizeEvent::Type);
m_discardResizes = false;
}
bool RenderWidget::event( TQEvent *e )
{
- if ( m_widget && (e->type() == (TQEvent::Type)QWidgetResizeEvent::Type) ) {
+ if ( m_widget && (e->type() == (TQEvent::Type)TQWidgetResizeEvent::Type) ) {
m_resizePending = false;
if (m_discardResizes)
return true;
- QWidgetResizeEvent *re = static_cast<QWidgetResizeEvent *>(e);
+ TQWidgetResizeEvent *re = static_cast<TQWidgetResizeEvent *>(e);
m_widget->resize( re->w, re->h );
tqrepaint();
}
@@ -193,7 +193,7 @@ bool RenderWidget::event( TQEvent *e )
void RenderWidget::flushWidgetResizes() //static
{
- TQApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type );
+ TQApplication::sendPostedEvents( 0, TQWidgetResizeEvent::Type );
}
void RenderWidget::setQWidget(TQWidget *widget)
@@ -215,8 +215,8 @@ void RenderWidget::setQWidget(TQWidget *widget)
if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::tqqt_cast<TQFrame*>(m_widget))
m_widget->setBackgroundMode( TQWidget::NoBackground );
- if (m_widget->focusPolicy() > TQWidget::StrongFocus)
- m_widget->setFocusPolicy(TQWidget::StrongFocus);
+ if (m_widget->focusPolicy() > TQ_StrongFocus)
+ m_widget->setFocusPolicy(TQ_StrongFocus);
// if we've already received a layout, apply the calculated space to the
// widget immediately, but we have to have really been full constructed (with a non-null
// style pointer).
@@ -439,7 +439,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty)
paintWidget(paintInfo, m_widget, xPos, yPos);
}
-#include <private/qinternal_p.h>
+#include <tqinternal_p.h>
// The PaintBuffer class provides a shared buffer for widget painting.
//
@@ -449,7 +449,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty)
// is still needed. If not, it shrinks down to the biggest size < maxPixelBuffering
// that was requested during the overflow lapse.
-class PaintBuffer: public QObject
+class PaintBuffer: public TQObject
{
public:
static const int maxPixelBuffering = 320*200;
@@ -527,9 +527,9 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
TQValueVector<TQWidget*> cw;
TQValueVector<TQRect> cr;
- if (widget->children()) {
+ if (!widget->childrenListObject().isEmpty()) {
// build region
- TQObjectListIterator it = *widget->children();
+ TQObjectListIterator it = widget->childrenListObject();
for (; it.current(); ++it) {
TQWidget* const w = ::tqqt_cast<TQWidget *>(it.current());
if ( w && !w->isTopLevel() && !w->isHidden()) {
@@ -542,10 +542,10 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
}
}
}
- TQMemArray<TQRect> br = blit.rects();
+ TQMemArray<TQRect> br = blit.tqrects();
const int cnt = br.size();
- const bool external = p->device()->isExtDev();
+ const bool external = p->tqdevice()->isExtDev();
TQPixmap* const pm = PaintBuffer::grab( widget->size() );
if (!pm)
{
@@ -598,13 +598,13 @@ void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty)
TQPainter* const p = pI.p;
allowWidgetPaintEvents = true;
- const bool dsbld = QSharedDoubleBuffer::isDisabled();
- QSharedDoubleBuffer::setDisabled(true);
+ const bool dsbld = TQSharedDoubleBuffer::isDisabled();
+ TQSharedDoubleBuffer::setDisabled(true);
TQRect rr = pI.r;
rr.moveBy(-tx, -ty);
const TQRect r = widget->rect().intersect( rr );
copyWidget(r, p, widget, tx, ty);
- QSharedDoubleBuffer::setDisabled(dsbld);
+ TQSharedDoubleBuffer::setDisabled(dsbld);
allowWidgetPaintEvents = false;
}
@@ -641,7 +641,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// Don't count popup as a valid reason for losing the focus
// (example: opening the options of a select combobox shouldn't emit onblur)
- if ( TQFocusEvent::reason() != TQFocusEvent::Popup )
+ if ( TQT_TQFOCUSEVENT(e)->reason() != TQFocusEvent::Popup )
handleFocusOut();
break;
case TQEvent::FocusIn:
@@ -662,7 +662,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
case TQEvent::KeyRelease:
// TODO this seems wrong - Qt events are not correctly translated to DOM ones,
// like in KHTMLView::dispatchKeyEvent()
- if (element()->dispatchKeyEvent(static_cast<TQKeyEvent*>(e),false))
+ if (element()->dispatchKeyEvent(TQT_TQKEYEVENT(e),false))
filtered = true;
break;
@@ -672,8 +672,8 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// currently focused. this avoids accidentally changing a select box
// or something while wheeling a webpage.
if (tqApp->tqfocusWidget() != widget() &&
- widget()->focusPolicy() <= TQWidget::StrongFocus) {
- static_cast<TQWheelEvent*>(e)->ignore();
+ widget()->focusPolicy() <= TQ_StrongFocus) {
+ TQT_TQWHEELEVENT(e)->ignore();
TQApplication::sendEvent(view(), e);
filtered = true;
}
@@ -696,22 +696,22 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
case TQEvent::MouseButtonPress:
- mousePressEvent(static_cast<TQMouseEvent *>(e));
+ mousePressEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonRelease:
- mouseReleaseEvent(static_cast<TQMouseEvent *>(e));
+ mouseReleaseEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
+ mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseMove:
- mouseMoveEvent(static_cast<TQMouseEvent *>(e));
+ mouseMoveEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::KeyPress:
- keyPressEvent(static_cast<TQKeyEvent *>(e));
+ keyPressEvent(TQT_TQKEYEVENT(e));
break;
case TQEvent::KeyRelease:
- keyReleaseEvent(static_cast<TQKeyEvent *>(e));
+ keyReleaseEvent(TQT_TQKEYEVENT(e));
break;
default:
break;
@@ -721,22 +721,22 @@ void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
case TQEvent::MouseButtonPress:
- viewportMousePressEvent(static_cast<TQMouseEvent *>(e));
+ viewportMousePressEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonRelease:
- viewportMouseReleaseEvent(static_cast<TQMouseEvent *>(e));
+ viewportMouseReleaseEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonDblClick:
- viewportMouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
+ viewportMouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseMove:
- viewportMouseMoveEvent(static_cast<TQMouseEvent *>(e));
+ viewportMouseMoveEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::KeyPress:
- keyPressEvent(static_cast<TQKeyEvent *>(e));
+ keyPressEvent(TQT_TQKEYEVENT(e));
break;
case TQEvent::KeyRelease:
- keyReleaseEvent(static_cast<TQKeyEvent *>(e));
+ keyReleaseEvent(TQT_TQKEYEVENT(e));
break;
default:
break;
@@ -783,13 +783,13 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
}
switch (me.button()) {
case 0:
- button = LeftButton;
+ button = Qt::LeftButton;
break;
case 1:
- button = MidButton;
+ button = Qt::MidButton;
break;
case 2:
- button = RightButton;
+ button = Qt::RightButton;
break;
default:
break;
@@ -810,9 +810,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
TQMouseEvent e(type, p, button, state);
TQScrollView * sc = ::tqqt_cast<TQScrollView*>(m_widget);
if (sc && !::tqqt_cast<TQListBox*>(m_widget))
- static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(&e);
+ static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(TQT_TQEVENT(&e));
else
- static_cast<EventPropagator *>(m_widget)->sendEvent(&e);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&e));
ret = e.isAccepted();
break;
}
@@ -826,7 +826,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break;
TQKeyEvent* const ke = domKeyEv.qKeyEvent();
- static_cast<EventPropagator *>(m_widget)->sendEvent(ke);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke));
ret = ke->isAccepted();
break;
}
@@ -853,9 +853,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (ke->isAutoRepeat()) {
TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->count() );
- static_cast<EventPropagator *>(m_widget)->sendEvent(&releaseEv);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&releaseEv));
}
- static_cast<EventPropagator *>(m_widget)->sendEvent(ke);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke));
ret = ke->isAccepted();
break;
}
diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp
index f1ce83155..8f5879f21 100644
--- a/khtml/rendering/render_table.cpp
+++ b/khtml/rendering/render_table.cpp
@@ -2800,7 +2800,7 @@ public:
static void addBorderStyle(TQValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue)
{
- if (!borderValue.exists() || borderStyles.contains(borderValue))
+ if (!borderValue.exists() || borderStyles.tqcontains(borderValue))
return;
TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp
index 788110a6d..ffae3a624 100644
--- a/khtml/rendering/render_text.cpp
+++ b/khtml/rendering/render_text.cpp
@@ -318,10 +318,10 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty,
const int thickness = shadow->blur;
const int w = m_width+2*thickness;
const int h = m_height+2*thickness;
- const QRgb color = shadow->color.rgb();
+ const TQRgb color = shadow->color.rgb();
const int gray = tqGray(color);
const bool inverse = (gray < 100);
- const QRgb bgColor = (inverse) ? tqRgb(255,255,255) : tqRgb(0,0,0);
+ const TQRgb bgColor = (inverse) ? tqRgb(255,255,255) : tqRgb(0,0,0);
TQPixmap pixmap(w, h);
pixmap.fill(bgColor);
TQPainter p;
@@ -334,7 +334,7 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty,
m_reversed ? TQPainter::RTL : TQPainter::LTR);
p.end();
- TQImage img = pixmap.convertToImage().convertDepth(32);
+ TQImage img = TQT_TQIMAGE_OBJECT(pixmap.convertToImage()).convertDepth(32);
int md = thickness*thickness; // max-dist^2
@@ -363,7 +363,7 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty,
memset(amap, 0, h*w*(sizeof(float)));
for(int j=thickness; j<h-thickness; j++) {
for(int i=thickness; i<w-thickness; i++) {
- QRgb col= img.pixel(i,j);
+ TQRgb col= img.pixel(i,j);
if (col == bgColor) continue;
float g = tqGray(col);
if (inverse)
@@ -642,7 +642,7 @@ int InlineTextBoxArray::compareItems( Item d1, Item d2 )
return static_cast<InlineTextBox*>(d1)->m_y - static_cast<InlineTextBox*>(d2)->m_y;
}
-// remove this once QVector::bsearch is fixed
+// remove this once TQVector::bsearch is fixed
int InlineTextBoxArray::findFirstMatching(Item d) const
{
int len = count();
@@ -729,7 +729,7 @@ RenderText::~RenderText()
void RenderText::deleteInlineBoxes(RenderArena* arena)
{
- // this is a slight variant of QArray::clear().
+ // this is a slight variant of TQArray::clear().
// We don't delete the array itself here because its
// likely to be used in the same size later again, saves
// us resize() calls
diff --git a/khtml/rendering/render_text.h b/khtml/rendering/render_text.h
index 2e14b95cd..0923837b3 100644
--- a/khtml/rendering/render_text.h
+++ b/khtml/rendering/render_text.h
@@ -136,7 +136,7 @@ public:
bool m_reversed : 1;
unsigned m_toAdd : 14; // for justified text
private:
- // this is just for QVector::bsearch. Don't use it otherwise
+ // this is just for TQVector::bsearch. Don't use it otherwise
InlineTextBox(int _x, int _y)
:InlineBox(0)
{
diff --git a/khtml/xml/dom2_eventsimpl.cpp b/khtml/xml/dom2_eventsimpl.cpp
index c648ed63e..1c13ab5ce 100644
--- a/khtml/xml/dom2_eventsimpl.cpp
+++ b/khtml/xml/dom2_eventsimpl.cpp
@@ -546,8 +546,8 @@ IDTranslator<unsigned, unsigned, unsigned>::Info virtKeyToQtKeyTable[] =
{KeyEventBaseImpl::DOM_VK_RIGHT, Qt::Key_Right},
{KeyEventBaseImpl::DOM_VK_UP, Qt::Key_Up},
{KeyEventBaseImpl::DOM_VK_DOWN, Qt::Key_Down},
- {KeyEventBaseImpl::DOM_VK_PAGE_DOWN, Qt::Key_Next},
- {KeyEventBaseImpl::DOM_VK_PAGE_UP, Qt::Key_Prior},
+ {KeyEventBaseImpl::DOM_VK_PAGE_DOWN, TQt::Key_Next},
+ {KeyEventBaseImpl::DOM_VK_PAGE_UP, TQt::Key_Prior},
{KeyEventBaseImpl::DOM_VK_F1, Qt::Key_F1},
{KeyEventBaseImpl::DOM_VK_F2, Qt::Key_F2},
{KeyEventBaseImpl::DOM_VK_F3, Qt::Key_F3},
@@ -593,7 +593,7 @@ KeyEventBaseImpl::KeyEventBaseImpl(EventId id, bool canBubbleArg, bool cancelabl
// m_keyVal should contain the tqunicode value
// of the pressed key if available.
if (m_virtKeyVal == DOM_VK_UNDEFINED && !key->text().isEmpty())
- m_keyVal = key->text().tqunicode()[0];
+ m_keyVal = TQString(key->text()).tqunicode()[0];
// key->state returns enum ButtonState, which is ShiftButton, ControlButton and AltButton or'ed together.
m_modifier = key->state();
@@ -723,10 +723,10 @@ MAKE_TRANSLATOR(keyIdentifiersToVirtKeys, TQCString, unsigned, const char*, keyI
/** These are the modifiers we currently support */
static const IDTranslator<TQCString, unsigned, const char*>::Info keyModifiersToCodeTable[] = {
- {"Alt", Qt::AltButton},
- {"Control", Qt::ControlButton},
- {"Shift", Qt::ShiftButton},
- {"Meta", Qt::MetaButton},
+ {"Alt", TQt::AltButton},
+ {"Control", TQt::ControlButton},
+ {"Shift", TQt::ShiftButton},
+ {"Meta", TQt::MetaButton},
{0, 0}
};
@@ -842,7 +842,7 @@ bool TextEventImpl::isTextInputEvent() const
TextEventImpl::TextEventImpl(TQKeyEvent* key, DOM::AbstractViewImpl* view) :
KeyEventBaseImpl(KEYPRESS_EVENT, true, true, view, key)
{
- m_outputString = key->text();
+ m_outputString = TQString(key->text());
}
void TextEventImpl::initTextEvent(const DOMString &typeArg,
diff --git a/khtml/xml/dom2_eventsimpl.h b/khtml/xml/dom2_eventsimpl.h
index 1e7a37a16..fab2225e5 100644
--- a/khtml/xml/dom2_eventsimpl.h
+++ b/khtml/xml/dom2_eventsimpl.h
@@ -317,10 +317,10 @@ public:
unsigned long virtKeyVal,
unsigned long modifiers);
- bool ctrlKey() const { return m_modifier & Qt::ControlButton; }
- bool shiftKey() const { return m_modifier & Qt::ShiftButton; }
- bool altKey() const { return m_modifier & Qt::AltButton; }
- bool metaKey() const { return m_modifier & Qt::MetaButton; }
+ bool ctrlKey() const { return m_modifier & TQt::ControlButton; }
+ bool shiftKey() const { return m_modifier & TQt::ShiftButton; }
+ bool altKey() const { return m_modifier & TQt::AltButton; }
+ bool metaKey() const { return m_modifier & TQt::MetaButton; }
bool inputGenerated() const { return m_virtKeyVal == 0; }
unsigned long keyVal() const { return m_keyVal; }
diff --git a/khtml/xml/dom_docimpl.cpp b/khtml/xml/dom_docimpl.cpp
index 347adb510..9de636704 100644
--- a/khtml/xml/dom_docimpl.cpp
+++ b/khtml/xml/dom_docimpl.cpp
@@ -308,7 +308,7 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v)
if ( v ) {
m_docLoader = new DocLoader(v->part(), this );
- setPaintDevice( m_view );
+ setPaintDevice( TQT_TQPAINTDEVICE(m_view) );
}
else
m_docLoader = new DocLoader( 0, this );
@@ -1231,7 +1231,7 @@ void DocumentImpl::attach()
assert(!attached());
if ( m_view )
- setPaintDevice( m_view );
+ setPaintDevice( TQT_TQPAINTDEVICE(m_view) );
if (!m_renderArena)
m_renderArena.reset(new RenderArena());
@@ -2143,7 +2143,7 @@ void DocumentImpl::recalcStyleSelector()
title = title.replace('&', "&&");
- if ( !m_availableSheets.contains( title ) )
+ if ( !m_availableSheets.tqcontains( title ) )
m_availableSheets.append( title );
}
}
@@ -2170,7 +2170,7 @@ void DocumentImpl::recalcStyleSelector()
// or we found the sheet we selected
if (sheetUsed.isEmpty() ||
(!canResetSheet && tokenizer()) ||
- m_availableSheets.contains(sheetUsed)) {
+ m_availableSheets.tqcontains(sheetUsed)) {
break;
}
@@ -2710,7 +2710,7 @@ NodeListImpl::Cache* DOM::DocumentImpl::acquireCachedNodeListInfo(
if (type != NodeListImpl::UNCACHEABLE) {
newInfo->ref(); //Add the cache's reference
- m_nodeListCache.replace(key.hash(), newInfo);
+ m_nodeListCache.tqreplace(key.hash(), newInfo);
}
return newInfo;
diff --git a/khtml/xml/dom_nodeimpl.cpp b/khtml/xml/dom_nodeimpl.cpp
index f38be728a..4da9b5c1f 100644
--- a/khtml/xml/dom_nodeimpl.cpp
+++ b/khtml/xml/dom_nodeimpl.cpp
@@ -520,9 +520,9 @@ void NodeImpl::dispatchMouseEvent(TQMouseEvent *_mouse, int overrideId, int over
default:
break;
}
- bool ctrlKey = (_mouse->state() & Qt::ControlButton);
- bool altKey = (_mouse->state() & Qt::AltButton);
- bool shiftKey = (_mouse->state() & Qt::ShiftButton);
+ bool ctrlKey = (_mouse->state() & TQt::ControlButton);
+ bool altKey = (_mouse->state() & TQt::AltButton);
+ bool shiftKey = (_mouse->state() & TQt::ShiftButton);
bool metaKey = false; // ### qt support?
EventImpl* const evt = new MouseEventImpl(evtId,true,cancelable,getDocument()->defaultView(),
@@ -2060,7 +2060,7 @@ bool RegisteredListenerList::stillContainsListener(const RegisteredEventListener
{
if (!listeners)
return false;
- return listeners->find(listener) != listeners->end();
+ return listeners->tqfind(listener) != listeners->end();
}
RegisteredListenerList::~RegisteredListenerList() {
diff --git a/khtml/xml/dom_restyler.cpp b/khtml/xml/dom_restyler.cpp
index 699a5ab59..0050c4a03 100644
--- a/khtml/xml/dom_restyler.cpp
+++ b/khtml/xml/dom_restyler.cpp
@@ -45,7 +45,7 @@ void DynamicDomRestyler::removeDependency(ElementImpl* subject, ElementImpl* dep
void DynamicDomRestyler::removeDependencies(ElementImpl* subject, StructuralDependencyType type)
{
- KMultiMap<ElementImpl>::List* my_dependencies = reverse_map.tqfind(subject);
+ KMultiMap<ElementImpl>::List* my_dependencies = reverse_map.find(subject);
if (!my_dependencies) return;
@@ -60,7 +60,7 @@ void DynamicDomRestyler::removeDependencies(ElementImpl* subject, StructuralDepe
void DynamicDomRestyler::resetDependencies(ElementImpl* subject)
{
- KMultiMap<ElementImpl>::List* my_dependencies = reverse_map.tqfind(subject);
+ KMultiMap<ElementImpl>::List* my_dependencies = reverse_map.find(subject);
if (!my_dependencies) return;
@@ -78,7 +78,7 @@ void DynamicDomRestyler::resetDependencies(ElementImpl* subject)
void DynamicDomRestyler::restyleDepedent(ElementImpl* dependency, StructuralDependencyType type)
{
assert(type < LastStructuralDependency);
- KMultiMap<ElementImpl>::List* dep = dependency_map[type].tqfind(dependency);
+ KMultiMap<ElementImpl>::List* dep = dependency_map[type].find(dependency);
if (!dep) return;
diff --git a/khtml/xml/dom_stringimpl.cpp b/khtml/xml/dom_stringimpl.cpp
index d4e568408..3f904ae76 100644
--- a/khtml/xml/dom_stringimpl.cpp
+++ b/khtml/xml/dom_stringimpl.cpp
@@ -281,12 +281,12 @@ khtml::Length* DOMStringImpl::toCoordsArray(int& len) const
TQString str(s, l);
for(unsigned int i=0; i < l; i++) {
TQChar cc = s[i];
- if (cc > '9' || (cc < '0' && cc != '-' && cc != '*' && cc != '.'))
+ if (cc > TQChar('9') || (cc < TQChar('0') && cc != '-' && cc != '*' && cc != '.'))
str[i] = ' ';
}
str = str.simplifyWhiteSpace();
- len = str.contains(' ') + 1;
+ len = str.tqcontains(' ') + 1;
khtml::Length* r = new khtml::Length[len];
int i = 0;
@@ -307,7 +307,7 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const
TQString str(s, l);
str = str.simplifyWhiteSpace();
- len = str.contains(',') + 1;
+ len = str.tqcontains(',') + 1;
// If we have no commas, we have no array.
if( len == 1 )
diff --git a/khtml/xml/xml_tokenizer.cpp b/khtml/xml/xml_tokenizer.cpp
index a0f3f665c..37fc36f02 100644
--- a/khtml/xml/xml_tokenizer.cpp
+++ b/khtml/xml/xml_tokenizer.cpp
@@ -156,7 +156,7 @@ void XMLHandler::fixUpNSURI(TQString& uri, const TQString& qname)
TQXmlNamespaceSupport ns;
TQString localName, prefix;
ns.splitName(qname, prefix, localName);
- if (namespaceInfo.contains(prefix)) {
+ if (namespaceInfo.tqcontains(prefix)) {
uri = namespaceInfo[prefix].top();
}
}