From bfb063893534c33acd9abd340c80979205dc82f9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 2 Oct 2010 02:23:08 +0000 Subject: [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 --- kstyles/highcontrast/highcontrast.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'kstyles/highcontrast/highcontrast.cpp') 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(widget->parent()); while (widgetparent - && ! widgetparent->inherits ("TQComboBox") - && ! widgetparent->inherits ("TQSpinWidget")) + && ! widgetparent->inherits ("QComboBox") + && ! widgetparent->inherits ("QSpinWidget")) { widgetparent = dynamic_cast(widgetparent->parent()); } -- cgit v1.2.1