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 --- tdefx/tdestyle.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tdefx') diff --git a/tdefx/tdestyle.cpp b/tdefx/tdestyle.cpp index e2fadb17f..43cb4329a 100644 --- a/tdefx/tdestyle.cpp +++ b/tdefx/tdestyle.cpp @@ -263,7 +263,7 @@ TQString TDEStyle::defaultStyle() void TDEStyle::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); if ( d->useFilledFrameWorkaround ) { @@ -287,7 +287,7 @@ void TDEStyle::polish( const TQStyleControlElementData &ceData, ControlElementFl void TDEStyle::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 ( d->useFilledFrameWorkaround ) { @@ -310,7 +310,7 @@ void TDEStyle::polishPopupMenu( const TQStyleControlElementData &ceData, Control widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable); } - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget* widget = reinterpret_cast(ptr); TQPopupMenu *p = dynamic_cast(widget); if (p) { @@ -615,13 +615,13 @@ void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe, // Check if we are a normal toolbar or a hidden dockwidget. if ( parent && - (parent->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || // Normal toolbar - (parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock + (parent->inherits("TQToolBar") || // Normal toolbar + (parent->inherits("TQMainWindow")) )) // Collapsed dock // Draw a toolbar handle drawTDEStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); - else if (ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) + else if (ceData.widgetObjectTypes.contains("TQDockWindowHandle")) // Draw a dock window handle drawTDEStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); @@ -1025,9 +1025,9 @@ int TDEStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData // Check that we are not a normal toolbar or a hidden dockwidget, // in which case we need to adjust the height for font size if (widget - && !(ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) - && !(ceData.parentWidgetData.widgetObjectTypes.contains(TQMAINWINDOW_OBJECT_NAME_STRING)) - && (ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) ) + && !(ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) + && !(ceData.parentWidgetData.widgetObjectTypes.contains("TQMainWindow")) + && (ceData.widgetObjectTypes.contains("TQDockWindowHandle")) ) return widget->fontMetrics().lineSpacing(); else return TQCommonStyle::pixelMetric(m, ceData, elementFlags, widget); @@ -1086,7 +1086,7 @@ int TDEStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData // SPLITTER // ------------------------------------------------------------------------ case PM_SplitterWidth: - if (ceData.widgetObjectTypes.contains(TQDOCKWINDOWRESIZEHANDLE_OBJECT_NAME_STRING)) + if (ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle")) return 8; // ### why do we need 2pix extra? else return 6; @@ -1936,7 +1936,7 @@ int TDEStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceDat bool TDEStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQObject")) { TQObject* object = reinterpret_cast(source); if ( d->useFilledFrameWorkaround ) { -- cgit v1.2.1