From 36c049e135b0cec7cf97b41888860186813df5f0 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 12 Jul 2023 11:09:49 +0900 Subject: Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3. Signed-off-by: Michele Calgaro --- tdestyles/highcolor/highcolor.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tdestyles/highcolor') diff --git a/tdestyles/highcolor/highcolor.cpp b/tdestyles/highcolor/highcolor.cpp index d1666406f..6f06a18e4 100644 --- a/tdestyles/highcolor/highcolor.cpp +++ b/tdestyles/highcolor/highcolor.cpp @@ -190,19 +190,19 @@ HighColorStyle::~HighColorStyle() void HighColorStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); // Put in order of highest occurrence to maximise hit rate - if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) { + if (widget->inherits("TQPushButton")) { installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING) || widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { + } else if (widget->inherits("TQMenuBar") || widget->inherits("TQPopupMenu")) { widget->setBackgroundMode(TQWidget::NoBackground); - } else if (type == HighColor && widget->inherits(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) { + } else if (type == HighColor && widget->inherits("TQToolBarExtensionWidget")) { installObjectEventHandler(ceData, elementFlags, ptr, this); } else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) { widget->setBackgroundMode( NoBackground ); // We paint the whole background. installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if (widget->inherits(TQTOOLBOXBUTTON_OBJECT_NAME_STRING)) { + } else if (widget->inherits("TQToolBoxButton")) { TQFont font = widget->font(); font.setBold(true); widget->setFont(font); @@ -215,14 +215,14 @@ void HighColorStyle::polish(const TQStyleControlElementData &ceData, ControlElem void HighColorStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); - if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) { + if (widget->inherits("TQPushButton")) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING) || widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { + else if (widget->inherits("TQMenuBar") || widget->inherits("TQPopupMenu")) { widget->setBackgroundMode(TQWidget::PaletteBackground); - } else if (type == HighColor && widget->inherits(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) { + } else if (type == HighColor && widget->inherits("TQToolBarExtensionWidget")) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) { removeObjectEventHandler(ceData, elementFlags, ptr, this); @@ -1683,7 +1683,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, } else if (!ceData.parentWidgetData.widgetObjectTypes.isEmpty()) { - if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) + if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) { TQToolBar* parent = (TQToolBar*)widget->parent(); TQRect pr = parent->rect(); @@ -1692,7 +1692,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, parent->orientation() == Qt::Vertical, r.x(), r.y(), pr.width()-2, pr.height()-2); } - else if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) + else if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) { TQWidget* parent = (TQWidget*)widget->parent(); TQToolBar* toolbar = (TQToolBar*)parent->parent(); @@ -2016,7 +2016,7 @@ bool HighColorStyle::objectEventHandler( const TQStyleControlElementData &ceData TQToolBar* toolbar; - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) + if (ceData.widgetObjectTypes.contains("TQObject")) { TQObject* object = reinterpret_cast(source); -- cgit v1.2.1