summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-02 02:23:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-02 02:23:08 +0000
commitbfb063893534c33acd9abd340c80979205dc82f9 (patch)
tree75f450e2d7a85066bbff654b0a8f014e240197aa
parentccb3b5e486e55a0b014cbc3357c209c3d822ed47 (diff)
downloadtdelibs-bfb063893534c33acd9abd340c80979205dc82f9.tar.gz
tdelibs-bfb063893534c33acd9abd340c80979205dc82f9.zip
[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
-rw-r--r--kdeprint/management/kiconselectaction.cpp2
-rw-r--r--kdeui/kactionselector.cpp2
-rw-r--r--kdeui/kcompletionbox.cpp2
-rw-r--r--kdeui/kdockwidget.cpp2
-rw-r--r--kdeui/ktoolbar.cpp2
-rw-r--r--khtml/html/html_formimpl.cpp2
-rw-r--r--khtml/khtml_ext.cpp16
-rw-r--r--khtml/khtml_part.cpp4
-rw-r--r--khtml/rendering/render_frames.cpp4
-rw-r--r--kmdi/kmdichildfrm.cpp4
-rw-r--r--kparts/partmanager.cpp2
-rw-r--r--kstyles/highcolor/highcolor.cpp12
-rw-r--r--kstyles/highcontrast/highcontrast.cpp30
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp4
-rw-r--r--kstyles/light/lightstyle-v2.cpp2
-rw-r--r--kstyles/light/lightstyle-v3.cpp2
-rw-r--r--kstyles/web/webstyle.cpp8
17 files changed, 50 insertions, 50 deletions
diff --git a/kdeprint/management/kiconselectaction.cpp b/kdeprint/management/kiconselectaction.cpp
index 6b22dbee8..d2c4c873f 100644
--- a/kdeprint/management/kiconselectaction.cpp
+++ b/kdeprint/management/kiconselectaction.cpp
@@ -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);
diff --git a/kdeui/kactionselector.cpp b/kdeui/kactionselector.cpp
index a34582d35..9bbf52dbf 100644
--- a/kdeui/kactionselector.cpp
+++ b/kdeui/kactionselector.cpp
@@ -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() )
{
diff --git a/kdeui/kcompletionbox.cpp b/kdeui/kcompletionbox.cpp
index 68f5f6343..ed75ecd21 100644
--- a/kdeui/kcompletionbox.cpp
+++ b/kdeui/kcompletionbox.cpp
@@ -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);
diff --git a/kdeui/kdockwidget.cpp b/kdeui/kdockwidget.cpp
index 33ba5e362..462c616f3 100644
--- a/kdeui/kdockwidget.cpp
+++ b/kdeui/kdockwidget.cpp
@@ -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 )
diff --git a/kdeui/ktoolbar.cpp b/kdeui/ktoolbar.cpp
index 6f3eddba2..79607099a 100644
--- a/kdeui/ktoolbar.cpp
+++ b/kdeui/ktoolbar.cpp
@@ -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;
}
diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp
index 1d581d78b..a72df3743 100644
--- a/khtml/html/html_formimpl.cpp
+++ b/khtml/html/html_formimpl.cpp
@@ -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);
}
};
diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp
index 9ffce6794..7cadfb944 100644
--- a/khtml/khtml_ext.cpp
+++ b/khtml/khtml_ext.cpp
@@ -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();
}
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index ddd5cd25e..338b9605d 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -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)
diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp
index 8f072dda6..3d06b7e6d 100644
--- a/khtml/rendering/render_frames.cpp
+++ b/khtml/rendering/render_frames.cpp
@@ -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
diff --git a/kmdi/kmdichildfrm.cpp b/kmdi/kmdichildfrm.cpp
index 3c33e1cc5..f471cf6c3 100644
--- a/kmdi/kmdichildfrm.cpp
+++ b/kmdi/kmdichildfrm.cpp
@@ -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
diff --git a/kparts/partmanager.cpp b/kparts/partmanager.cpp
index 57d2073b5..0ff139532 100644
--- a/kparts/partmanager.cpp
+++ b/kparts/partmanager.cpp
@@ -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
diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp
index 3f559d0fa..a3a520f84 100644
--- a/kstyles/highcolor/highcolor.cpp
+++ b/kstyles/highcolor/highcolor.cpp
@@ -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�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();
diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp
index b5be5cff8..0b9c0cfcf 100644
--- a/kstyles/highcontrast/highcontrast.cpp
+++ b/kstyles/highcontrast/highcontrast.cpp
@@ -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());
}
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp
index 5ed132eea..4927c67bc 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -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�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)
diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index 13569379b..8f673a707 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -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();
}
diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp
index 49900c8f5..5a902d7f5 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -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();
}
diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp
index 41cbd9339..f4ed7f931 100644
--- a/kstyles/web/webstyle.cpp
+++ b/kstyles/web/webstyle.cpp
@@ -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();