summaryrefslogtreecommitdiffstats
path: root/kstyles
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 /kstyles
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
Diffstat (limited to 'kstyles')
-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
6 files changed, 29 insertions, 29 deletions
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();