From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/rendering/render_form.cpp | 242 ++++++++++++++++++++-------------------- 1 file changed, 121 insertions(+), 121 deletions(-) (limited to 'khtml/rendering/render_form.cpp') diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp index ca556ecb5..58a9a8d33 100644 --- a/khtml/rendering/render_form.cpp +++ b/khtml/rendering/render_form.cpp @@ -81,7 +81,7 @@ void RenderFormElement::updateFromElement() RenderWidget::updateFromElement(); } -void RenderFormElement::tqlayout() +void RenderFormElement::layout() { KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast( m_widget ); - TQSize s( cb->style().tqpixelMetric( TQStyle::PM_IndicatorWidth ), - cb->style().tqpixelMetric( TQStyle::PM_IndicatorHeight ) ); + TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ), + cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast( m_widget ); - TQSize s( rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), - rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); + TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), + rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -260,17 +260,17 @@ void RenderSubmitButton::calcMinMaxWidth() bool empty = raw.isEmpty(); if ( empty ) - raw = TQString::tqfromLatin1("X"); + raw = TQString::fromLatin1("X"); TQFontMetrics fm = pb->fontMetrics(); TQSize ts = fm.size( ShowPrefix, raw); TQSize s(pb->style().sizeFromContents( 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->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) + + pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; int w = ts.width() + margin; int h = s.height(); if (pb->isDefault() || pb->autoDefault()) { - int dbw = pb->style().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; + int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; w += dbw; } @@ -491,7 +491,7 @@ void RenderLineEdit::setStyle(RenderStyle* _style) { RenderFormElement::setStyle( _style ); - widget()->tqsetAlignment(textAlignment()); + widget()->setAlignment(textAlignment()); } void RenderLineEdit::highLightWord( unsigned int length, unsigned int pos ) @@ -642,13 +642,13 @@ RenderFieldset::RenderFieldset(HTMLGenericFormElementImpl *element) { } -RenderObject* RenderFieldset::tqlayoutLegend(bool retqlayoutChildren) +RenderObject* RenderFieldset::layoutLegend(bool relayoutChildren) { - RenderObject* legend = tqfindLegend(); + RenderObject* legend = findLegend(); if (legend) { - if (retqlayoutChildren) + if (relayoutChildren) legend->setNeedsLayout(true); - legend->tqlayoutIfNeeded(); + legend->layoutIfNeeded(); int xPos = borderLeft() + paddingLeft() + legend->marginLeft(); if (style()->direction() == RTL) @@ -661,7 +661,7 @@ RenderObject* RenderFieldset::tqlayoutLegend(bool retqlayoutChildren) return legend; } -RenderObject* RenderFieldset::tqfindLegend() +RenderObject* RenderFieldset::findLegend() { for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibling()) { if (!legend->isFloatingOrPositioned() && legend->element() && @@ -675,7 +675,7 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty) { //kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl; - RenderObject* legend = tqfindLegend(); + RenderObject* legend = findLegend(); if (!legend) return RenderBlock::paintBoxDecorations(pI, _tx, _ty); @@ -768,8 +768,8 @@ void RenderFieldset::setStyle(RenderStyle* _style) RenderBlock::setStyle(_style); // WinIE renders fieldsets with display:inline like they're inline-blocks. For us, - // an inline-block is just a block element with tqreplaced set to true and inline set - // to true. Ensure that if we ended up being inline that we set our tqreplaced flag + // an inline-block is just a block element with replaced set to true and inline set + // to true. Ensure that if we ended up being inline that we set our replaced flag // so that we're treated like an inline-block. if (isInline()) setReplaced(true); @@ -809,7 +809,7 @@ void RenderFileButton::calcMinMaxWidth() edit, TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) .expandedTo(TQApplication::globalStrut()); - TQSize bs = static_cast( m_widget )->tqminimumSizeHint() - edit->tqminimumSizeHint(); + TQSize bs = static_cast( m_widget )->minimumSizeHint() - edit->minimumSizeHint(); setIntrinsicWidth( s.width() + bs.width() ); setIntrinsicHeight( kMax(s.height(), bs.height()) ); @@ -1018,7 +1018,7 @@ void RenderSelect::updateFromElement() DOMString label = optElem->getAttribute(ATTR_LABEL); if (!label.isEmpty()) text = label.string(); - text = TQString::tqfromLatin1(" ")+text; + text = TQString::fromLatin1(" ")+text; } if(m_useListBox) { @@ -1065,14 +1065,14 @@ void RenderSelect::calcMinMaxWidth() // ### ugly HACK FIXME!!! setMinMaxKnown(); - tqlayoutIfNeeded(); + layoutIfNeeded(); setNeedsLayoutAndMinMaxRecalc(); // ### end FIXME RenderFormElement::calcMinMaxWidth(); } -void RenderSelect::tqlayout( ) +void RenderSelect::layout( ) { KHTMLAssert(needsLayout()); KHTMLAssert(minMaxKnown()); @@ -1107,21 +1107,21 @@ void RenderSelect::tqlayout( ) if(size < 1) size = kMin(static_cast(m_widget)->count(), 10u); - width += 2*w->frameWidth() + w->verticalScrollBar()->tqsizeHint().width(); + width += 2*w->frameWidth() + w->verticalScrollBar()->sizeHint().width(); height = size*height + 2*w->frameWidth(); setIntrinsicWidth( width ); setIntrinsicHeight( height ); } else { - TQSize s(m_widget->tqsizeHint()); + TQSize s(m_widget->sizeHint()); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); } /// uuh, ignore the following line.. setNeedsLayout(true); - RenderFormElement::tqlayout(); + RenderFormElement::layout(); // and now disable the widget in case there is no