From 41f63196dd0642327c581dc22e0c206b35a22cb7 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 12 Jul 2023 11:34:47 +0900 Subject: Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3. Signed-off-by: Michele Calgaro (cherry picked from commit 8dac8f1a52cf3a2983af451aff69ca268cfbd6d7) --- scheck/scheck.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'scheck/scheck.cpp') diff --git a/scheck/scheck.cpp b/scheck/scheck.cpp index b8d6bf2d..9dc2fa4a 100644 --- a/scheck/scheck.cpp +++ b/scheck/scheck.cpp @@ -944,25 +944,25 @@ void StyleCheckStyle::polish(const TQStyleControlElementData &ceData, ControlEle topLevelAccelManageTimer->start(200, true); // - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); // Put in order of highest occurance to maximise hit rate - if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) { + if (widget->inherits("TQPushButton")) { installObjectEventHandler(ceData, elementFlags, ptr, this); } - if (widget->inherits(TQLABEL_OBJECT_NAME_STRING)) + if (widget->inherits("TQLabel")) { installObjectEventHandler(ceData, elementFlags, ptr, this); } - if (widget->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) + if (widget->inherits("TQGroupBox")) { installObjectEventHandler(ceData, elementFlags, ptr, this); } - if (widget->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) || widget->inherits(TQDIALOG_OBJECT_NAME_STRING) ) + if (widget->inherits("TQMainWindow") || widget->inherits("TQDialog") ) { watcher->addWatched(widget); } @@ -974,19 +974,19 @@ void StyleCheckStyle::polish(const TQStyleControlElementData &ceData, ControlEle void StyleCheckStyle::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); } - if (widget->inherits(TQLABEL_OBJECT_NAME_STRING)) + if (widget->inherits("TQLabel")) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } - if (widget->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) + if (widget->inherits("TQGroupBox")) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } @@ -2348,7 +2348,7 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control, } else if (widget->parent()) { - if (widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) + if (widget->parent()->inherits("TQToolBar")) { TQToolBar* parent = (TQToolBar*)widget->parent(); TQRect pr = parent->rect(); @@ -2616,7 +2616,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat if (TDEStyle::objectEventHandler( ceData, elementFlags, source, event )) return true; - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQObject")) { TQObject* object = reinterpret_cast(source); // Handle push button hover effects. @@ -2635,7 +2635,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat } } - if ( event->type() == TQEvent::Paint && object->inherits(TQLABEL_OBJECT_NAME_STRING) ) + if ( event->type() == TQEvent::Paint && object->inherits("TQLabel") ) { TQLabel* lb = static_cast(TQT_TQWIDGET(object)); if (lb->pixmap() || lb->picture() || lb->movie() || (lb->textFormat() == TQt::RichText) || @@ -2699,7 +2699,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat return true; } - if ( event->type() == TQEvent::Paint && object->inherits(TQGROUPBOX_OBJECT_NAME_STRING) ) + if ( event->type() == TQEvent::Paint && object->inherits("TQGroupBox") ) { TQPaintEvent * pevent = TQT_TQPAINTEVENT(event); TQGroupBox* gb = static_cast(TQT_TQWIDGET(object)); @@ -2713,7 +2713,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat // I suggested that it could eat me. GCC won. while ( (parent = parent->parent()) ) { - if (parent->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) + if (parent->inherits("TQGroupBox")) { nestedGroupBox = true; break; -- cgit v1.2.1