[CRITICAL] Repair borken rendering due to incorrect inherited object logic

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1181768 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent ccb3b5e486
commit bfb0638935

@ -76,7 +76,7 @@ void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& ic
int KIconSelectAction::plug(TQWidget* widget, int index)
{
int value(-1);
if (widget->inherits("TQPopupMenu"))
if (widget->inherits("QPopupMenu"))
{
createPopupMenu();
value = KSelectAction::plug(widget, index);

@ -392,7 +392,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
}
return true;
}
else if ( o->inherits( "TQListBox" ) )
else if ( o->inherits( "QListBox" ) )
{
switch ( ((TQKeyEvent*)e)->key() )
{

@ -343,7 +343,7 @@ TQRect KCompletionBox::calculateGeometry() const
// to adjust it. Do that here as well, for consistency
const TQObject* combo;
if ( d->m_parent && (combo = d->m_parent->parent() ) &&
combo->inherits("TQComboBox") )
combo->inherits("QComboBox") )
{
const TQComboBox* cb = static_cast<const TQComboBox*>(combo);

@ -1699,7 +1699,7 @@ void KDockManager::activate()
obj->show();
}
}
if ( !main->inherits("TQDialog") ) main->show();
if ( !main->inherits("QDialog") ) main->show();
}
bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )

@ -2231,7 +2231,7 @@ void KToolBar::slotContextAboutToHide()
TQPtrListIterator<TQWidget> it( widgets );
TQWidget *wdg;
while ( ( wdg = it.current() ) != 0 ) {
if ( wdg->inherits( "TQToolButton" ) )
if ( wdg->inherits( "QToolButton" ) )
static_cast<TQToolButton*>( wdg )->setDown( false );
++it;
}

@ -964,7 +964,7 @@ class FocusHandleWidget : public QWidget
{
public:
void focusNextPrev(bool n) {
if (!focusNextPrevChild(n) && inherits("TQTextEdit"))
if (!focusNextPrevChild(n) && inherits("QTextEdit"))
TQWidget::focusNextPrevChild(n);
}
};

@ -115,7 +115,7 @@ void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget )
connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
this, TQT_SLOT( updateEditActions() ) );
if ( m_editableFormWidget->inherits( "TQLineEdit" ) || m_editableFormWidget->inherits( "TQTextEdit" ) )
if ( m_editableFormWidget->inherits( "QLineEdit" ) || m_editableFormWidget->inherits( "QTextEdit" ) )
connect( m_editableFormWidget, TQT_SIGNAL( selectionChanged() ),
this, TQT_SLOT( updateEditActions() ) );
@ -140,7 +140,7 @@ void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ )
if ( oldWidget )
{
if ( oldWidget->inherits( "TQLineEdit" ) || oldWidget->inherits( "TQTextEdit" ) )
if ( oldWidget->inherits( "QLineEdit" ) || oldWidget->inherits( "QTextEdit" ) )
disconnect( oldWidget, TQT_SIGNAL( selectionChanged() ),
this, TQT_SLOT( updateEditActions() ) );
}
@ -201,9 +201,9 @@ void KHTMLPartBrowserExtension::cut()
if ( !m_editableFormWidget )
return;
if ( m_editableFormWidget->inherits( "TQLineEdit" ) )
if ( m_editableFormWidget->inherits( "QLineEdit" ) )
static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->cut();
else if ( m_editableFormWidget->inherits( "TQTextEdit" ) )
else if ( m_editableFormWidget->inherits( "QTextEdit" ) )
static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->cut();
}
@ -254,9 +254,9 @@ void KHTMLPartBrowserExtension::copy()
}
else
{
if ( m_editableFormWidget->inherits( "TQLineEdit" ) )
if ( m_editableFormWidget->inherits( "QLineEdit" ) )
static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->copy();
else if ( m_editableFormWidget->inherits( "TQTextEdit" ) )
else if ( m_editableFormWidget->inherits( "QTextEdit" ) )
static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->copy();
}
}
@ -304,9 +304,9 @@ void KHTMLPartBrowserExtension::paste()
if ( !m_editableFormWidget )
return;
if ( m_editableFormWidget->inherits( "TQLineEdit" ) )
if ( m_editableFormWidget->inherits( "QLineEdit" ) )
static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->paste();
else if ( m_editableFormWidget->inherits( "TQTextEdit" ) )
else if ( m_editableFormWidget->inherits( "QTextEdit" ) )
static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->paste();
}

@ -6871,7 +6871,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
return;
}
// kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl;
if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "TQFrame" ) )
if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "QFrame" ) )
{
TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() );
if (frame->frameStyle() != TQFrame::NoFrame)
@ -6899,7 +6899,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
d->m_activeFrame = part;
if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "TQFrame" ) )
if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "QFrame" ) )
{
TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() );
if (frame->frameStyle() != TQFrame::NoFrame)

@ -674,7 +674,7 @@ RenderFrame::RenderFrame( DOM::HTMLFrameElementImpl *frame )
void RenderFrame::slotViewCleared()
{
if(m_widget->inherits("TQScrollView")) {
if(m_widget->inherits("QScrollView")) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "frame is a scrollview!" << endl;
#endif
@ -989,7 +989,7 @@ void RenderPartObject::layout( )
void RenderPartObject::slotViewCleared()
{
if(m_widget->inherits("TQScrollView") ) {
if(m_widget->inherits("QScrollView") ) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "iframe is a scrollview!" << endl;
#endif

@ -899,7 +899,7 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
if ( pFocPol != 0 )
widg->setFocusPolicy( *pFocPol );
if ( !( widg->inherits( "TQPopupMenu" ) ) )
if ( !( widg->inherits( "QPopupMenu" ) ) )
widg->installEventFilter( this );
}
@ -1155,7 +1155,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
TQObject* pLostChild = ( ( TQChildEvent* ) e )->child();
if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("TQWidget"))*/ )
if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("QWidget"))*/ )
{
TQObjectList* list = pLostChild->queryList();
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code

@ -209,7 +209,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
if ( !d->m_managedTopLevelWidgets.containsRef( w->topLevelWidget() ) )
return false;
if ( d->m_bIgnoreScrollBars && w->inherits( "TQScrollBar" ) )
if ( d->m_bIgnoreScrollBars && w->inherits( "QScrollBar" ) )
return false;
if ( mev ) // mouse press or mouse double-click event

@ -3,7 +3,7 @@
*
* KDE3 HighColor Style (version 1.0)
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
* (C) 2001-2002 Fredrik Höglund <fredrik@kde.org>
* (C) 2001-2002 Fredrik H<EFBFBD>glund <fredrik@kde.org>
*
* Drawing routines adapted from the KDE2 HCStyle,
* Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
@ -189,9 +189,9 @@ HighColorStyle::~HighColorStyle()
void HighColorStyle::polish(TQWidget* widget)
{
// Put in order of highest occurrence to maximise hit rate
if (widget->inherits("TQPushButton")) {
if (widget->inherits("QPushButton")) {
widget->installEventFilter(this);
} else if (widget->inherits("TQMenuBar") || widget->inherits("TQPopupMenu")) {
} else if (widget->inherits("QMenuBar") || widget->inherits("QPopupMenu")) {
widget->setBackgroundMode(TQWidget::NoBackground);
} else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) {
widget->installEventFilter(this);
@ -210,10 +210,10 @@ void HighColorStyle::polish(TQWidget* widget)
void HighColorStyle::unPolish(TQWidget* widget)
{
if (widget->inherits("TQPushButton")) {
if (widget->inherits("QPushButton")) {
widget->removeEventFilter(this);
}
else if (widget->inherits("TQMenuBar") || widget->inherits("TQPopupMenu")) {
else if (widget->inherits("QMenuBar") || widget->inherits("QPopupMenu")) {
widget->setBackgroundMode(TQWidget::PaletteBackground);
} else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) {
widget->removeEventFilter(this);
@ -1648,7 +1648,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
}
else if (widget->parent())
{
if (widget->parent()->inherits("TQToolBar"))
if (widget->parent()->inherits("QToolBar"))
{
TQToolBar* parent = (TQToolBar*)widget->parent();
TQRect pr = parent->rect();

@ -152,11 +152,11 @@ void HighContrastStyle::polish( TQPalette& pal )
void HighContrastStyle::polish (TQWidget* widget)
{
if (widget->inherits ("TQButton")
|| widget->inherits ("TQComboBox")
|| widget->inherits ("TQSpinWidget")
|| widget->inherits ("TQLineEdit")
|| widget->inherits ("TQTextEdit"))
if (widget->inherits ("QButton")
|| widget->inherits ("QComboBox")
|| widget->inherits ("QSpinWidget")
|| widget->inherits ("QLineEdit")
|| widget->inherits ("QTextEdit"))
{
widget->installEventFilter (this);
@ -171,7 +171,7 @@ void HighContrastStyle::polish (TQWidget* widget)
void HighContrastStyle::unPolish (TQWidget* widget)
{
if (widget->inherits ("TQWidget") || widget->inherits ("TQComboBox") || widget->inherits ("TQSpinWidget") || widget->inherits ("TQLineEdit") || widget->inherits ("TQTextEdit"))
if (widget->inherits ("QWidget") || widget->inherits ("QComboBox") || widget->inherits ("QSpinWidget") || widget->inherits ("QLineEdit") || widget->inherits ("QTextEdit"))
widget->removeEventFilter (this);
KStyle::unPolish (widget);
}
@ -1592,7 +1592,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
case PM_DefaultFrameWidth: {
if (widget && (widget->inherits ("TQLineEdit") || widget->inherits ("TQTextEdit")))
if (widget && (widget->inherits ("QLineEdit") || widget->inherits ("QTextEdit")))
return 2*basicLineWidth;
else
return basicLineWidth;
@ -1802,17 +1802,17 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
{
// Handle hover effects.
if (event->type() == TQEvent::Enter
&& (widget->inherits ("TQButton")
|| widget->inherits ("TQComboBox")
|| widget->inherits ("TQSpinWidget")))
&& (widget->inherits ("QButton")
|| widget->inherits ("QComboBox")
|| widget->inherits ("QSpinWidget")))
{
hoverWidget = widget;
widget->repaint (false);
}
else if (event->type() == TQEvent::Leave
&& (widget->inherits ("TQButton")
|| widget->inherits ("TQComboBox")
|| widget->inherits ("TQSpinWidget")))
&& (widget->inherits ("QButton")
|| widget->inherits ("QComboBox")
|| widget->inherits ("QSpinWidget")))
{
if (object == hoverWidget)
hoverWidget = 0L;
@ -1823,8 +1823,8 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
{
TQWidget* widgetparent = dynamic_cast<TQWidget*>(widget->parent());
while (widgetparent
&& ! widgetparent->inherits ("TQComboBox")
&& ! widgetparent->inherits ("TQSpinWidget"))
&& ! widgetparent->inherits ("QComboBox")
&& ! widgetparent->inherits ("QSpinWidget"))
{
widgetparent = dynamic_cast<TQWidget*>(widgetparent->parent());
}

@ -15,7 +15,7 @@ Port version 0.9.7
KDE3 HighColor Style
Copyright (C) 2001 Karol Szwed <gallium@kde.org>
(C) 2001 Fredrik Höglund <fredrik@kde.org>
(C) 2001 Fredrik H<EFBFBD>glund <fredrik@kde.org>
Drawing routines adapted from the KDE2 HCStyle,
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
@ -488,7 +488,7 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
w->setPalette(pal);
}
}
if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("TQLabel"))
if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("QLabel"))
{
TQWidget* lb = static_cast<TQWidget*>(object);
if (lb->backgroundMode() == Qt::PaletteButton)

@ -295,7 +295,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
TQWidget *p = w->parentWidget();
if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
}

@ -427,7 +427,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
TQWidget *p = w->parentWidget();
if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
}

@ -250,10 +250,10 @@ WebStyle::unPolish(TQApplication *)
void
WebStyle::polish(TQWidget * w)
{
if (w->inherits("TQPushButton"))
if (w->inherits("QPushButton"))
w->installEventFilter(this);
else if (w->inherits("TQGroupBox") || w->inherits("TQFrame"))
else if (w->inherits("QGroupBox") || w->inherits("QFrame"))
{
TQFrame * f(static_cast<TQFrame *>(w));
@ -282,7 +282,7 @@ WebStyle::polish(TQWidget * w)
void
WebStyle::unPolish(TQWidget * w)
{
if (w->inherits("TQPushButton"))
if (w->inherits("QPushButton"))
w->removeEventFilter(this);
else if (w == _currentFrame)
@ -1046,7 +1046,7 @@ WebStyle::drawKToolBarButton
{
bool toggleAndOn = false;
if (button->inherits("TQButton"))
if (button->inherits("QButton"))
{
TQButton * b = static_cast<TQButton *>(button);
toggleAndOn = b->isToggleButton() && b->isOn();

Loading…
Cancel
Save