From ec073d6411b2ddf044ffafd07770affa052b7871 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 26 Nov 2023 02:19:00 +0900 Subject: [PATCH] Replaced various '#define' with actual strings - part 4 Signed-off-by: Michele Calgaro (cherry picked from commit 0fc192d2827d9bb160fce57b7e359f116a206aa7) --- src/gui/kdeext/klearlook.cpp | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/gui/kdeext/klearlook.cpp b/src/gui/kdeext/klearlook.cpp index 5a2f9ff..b6e7399 100644 --- a/src/gui/kdeext/klearlook.cpp +++ b/src/gui/kdeext/klearlook.cpp @@ -592,33 +592,33 @@ void KlearlookStyle::polish( const TQStyleControlElementData &ceData, ControlEle if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); - if ( ::tqqt_cast( widget ) - || ::tqqt_cast( widget ) - || ::tqqt_cast( widget ) + if ( ::tqt_cast( widget ) + || ::tqt_cast( widget ) + || ::tqt_cast( widget ) || widget->inherits( "TQSplitterHandle" ) ) { widget->setMouseTracking( true ); installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if ( ::tqqt_cast( widget ) || ::tqqt_cast( widget ) || + } else if ( ::tqt_cast( widget ) || ::tqt_cast( widget ) || widget->inherits( "TQToolBarExtensionWidget" ) ) { widget->setBackgroundMode( TQWidget::PaletteBackground ); installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if ( ::tqqt_cast( widget ) - || ::tqqt_cast( widget ) - || ::tqqt_cast( widget ) ) + } else if ( ::tqt_cast( widget ) + || ::tqt_cast( widget ) + || ::tqt_cast( widget ) ) widget->setBackgroundMode( TQWidget::PaletteBackground ); else if ( widget->inherits( "TDEToolBarSeparator" ) ) { widget->setBackgroundMode( TQWidget::NoBackground ); installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if ( ::tqqt_cast( widget ) ) { + } else if ( ::tqt_cast( widget ) ) { widget->setMouseTracking( true ); installObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode( TQWidget::NoBackground ); - } else if ( ::tqqt_cast( widget ) || ::tqqt_cast( widget ) ) { + } else if ( ::tqt_cast( widget ) || ::tqt_cast( widget ) ) { widget->setMouseTracking( true ); installObjectEventHandler(ceData, elementFlags, ptr, this); @@ -635,34 +635,34 @@ void KlearlookStyle::unPolish( const TQStyleControlElementData &ceData, ControlE if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); - if ( ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) || + if ( ::tqt_cast( widget ) || + ::tqt_cast( widget ) || + ::tqt_cast( widget ) || widget->inherits( "TQSplitterHandle" ) ) { widget->setMouseTracking( false ); removeObjectEventHandler(ceData, elementFlags, ptr, this); - } else if ( ::tqqt_cast( widget ) || ::tqqt_cast( widget ) || + } else if ( ::tqt_cast( widget ) || ::tqt_cast( widget ) || widget->inherits( "TQToolBarExtensionWidget" ) ) { widget->setBackgroundMode( TQWidget::PaletteButton ); removeObjectEventHandler(ceData, elementFlags, ptr, this); - } else if ( ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) ) + } else if ( ::tqt_cast( widget ) || + ::tqt_cast( widget ) || + ::tqt_cast( widget ) ) widget->setBackgroundMode( TQWidget::PaletteBackground ); else if ( widget->inherits( "TDEToolBarSeparator" ) ) { widget->setBackgroundMode( PaletteBackground ); removeObjectEventHandler(ceData, elementFlags, ptr, this); - } else if ( ::tqqt_cast( widget ) ) { + } else if ( ::tqt_cast( widget ) ) { widget->setMouseTracking( false ); removeObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode( TQWidget::PaletteButton ); - } else if ( ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) ) { + } else if ( ::tqt_cast( widget ) || + ::tqt_cast( widget ) ) { widget->setMouseTracking( false ); removeObjectEventHandler(ceData, elementFlags, ptr, this); @@ -2229,7 +2229,7 @@ void KlearlookStyle::drawControl( bool cornerWidget = false, firstTab = 0 == tb->indexOf( data.tab() ->identifier() ); - if ( ::tqqt_cast( tb->parent() ) ) { + if ( ::tqt_cast( tb->parent() ) ) { const TQTabWidget * tw = ( const TQTabWidget* ) tb->parent(); // is there a corner widget in the (top) left edge? @@ -3107,11 +3107,11 @@ void KlearlookStyle::drawComplexControl( } bool onControlButtons = false, - onToolbar = widget->parentWidget() && ::tqqt_cast( widget->parentWidget() ), + onToolbar = widget->parentWidget() && ::tqt_cast( widget->parentWidget() ), onExtender = !onToolbar && widget->parentWidget() && widget->parentWidget() ->inherits( "TQToolBarExtensionWidget" ) && - ::tqqt_cast( widget->parentWidget() ->parentWidget() ); + ::tqt_cast( widget->parentWidget() ->parentWidget() ); if ( !onToolbar && !onExtender && widget->parentWidget() && !qstrcmp( widget->parentWidget() ->name(), "qt_maxcontrols" ) ) @@ -3147,7 +3147,7 @@ void KlearlookStyle::drawComplexControl( p->drawTiledPixmap( r, *( toolbutton->parentWidget() ->backgroundPixmap() ), toolbutton->pos() ); } else if ( widget->parent() ) { - if ( ::tqqt_cast( widget->parent() ) ) { + if ( ::tqt_cast( widget->parent() ) ) { TQToolBar * parent = ( TQToolBar* ) widget->parent(); #ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS @@ -3425,7 +3425,7 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQStyleControlElement return 5; case PM_TabBarTabShiftVertical: { - const TQTabBar *tb = ::tqqt_cast( widget ); + const TQTabBar *tb = ::tqt_cast( widget ); return TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() ? 1 @@ -3450,9 +3450,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQStyleControlElement case PM_ButtonDefaultIndicator: return IND_BORDER == defBtnIndicator ? 1 : 0; case PM_DefaultFrameWidth: - return borderFrame && widget && ( ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) || - ::tqqt_cast( widget ) ) + return borderFrame && widget && ( ::tqt_cast( widget ) || + ::tqt_cast( widget ) || + ::tqt_cast( widget ) ) ? 2 : TQTC_DEF_FRAME_WIDTH; case PM_SpinBoxFrameWidth: @@ -3576,7 +3576,7 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t, } case CT_ToolButton: { - if ( widget->parent() && ::tqqt_cast( widget->parent() ) ) + if ( widget->parent() && ::tqt_cast( widget->parent() ) ) return TQSize( s.width() + 2 * 4, s.height() + 2 * 4 ); else { return TDEStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget );