From db22462503588f4942c9c73aad278413206e4228 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 24 Feb 2011 07:08:32 +0000 Subject: [PATCH] Fix a number of runtime object identification problems which led to an even larger array of minor glitches NOTE: kdevelop and kdewebdev still need to be fully repaired git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1222475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- cervisia/qttableview.cpp | 4 ++-- kbabel/commonui/kactionselector.cpp | 2 +- kcachegrind/kcachegrind/tabview.cpp | 2 +- kuiviewer/kuiviewer_part.cpp | 2 +- scheck/scheck.cpp | 22 +++++++++++----------- umbrello/umbrello/umllistview.cpp | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cervisia/qttableview.cpp b/cervisia/qttableview.cpp index 7e877ef8..d62557a9 100644 --- a/cervisia/qttableview.cpp +++ b/cervisia/qttableview.cpp @@ -1390,7 +1390,7 @@ void QtTableView::paintEvent( TQPaintEvent *e ) TQRect r = viewR; r.setLeft( xPos ); r.setBottom( yPosinherits( "TQListBox" ) ) + else if ( o->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) { switch ( ((TQKeyEvent*)e)->key() ) { diff --git a/kcachegrind/kcachegrind/tabview.cpp b/kcachegrind/kcachegrind/tabview.cpp index 318920b6..13ec85d4 100644 --- a/kcachegrind/kcachegrind/tabview.cpp +++ b/kcachegrind/kcachegrind/tabview.cpp @@ -580,7 +580,7 @@ TQString TabView::whatsThis() const void TabView::installFocusFilters() { - TQObjectList *l = queryList("TQWidget"); + TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it( *l ); TQObject *obj; diff --git a/kuiviewer/kuiviewer_part.cpp b/kuiviewer/kuiviewer_part.cpp index e4a87a45..5f231361 100644 --- a/kuiviewer/kuiviewer_part.cpp +++ b/kuiviewer/kuiviewer_part.cpp @@ -185,7 +185,7 @@ void KUIViewerPart::slotStyle(int) TQApplication::setOverrideCursor( WaitCursor ); m_widget->setStyle( style); - TQObjectList *l = m_widget->queryList( "TQWidget" ); + TQObjectList *l = m_widget->queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) ( static_cast(o) )->setStyle( style ); delete l; diff --git a/scheck/scheck.cpp b/scheck/scheck.cpp index bf00d699..263a77ce 100644 --- a/scheck/scheck.cpp +++ b/scheck/scheck.cpp @@ -945,21 +945,21 @@ void StyleCheckStyle::polish(TQWidget* widget) // // Put in order of highest occurance to maximise hit rate - if (widget->inherits("TQPushButton")) { + if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) { widget->installEventFilter(this); } - if (widget->inherits("TQLabel")) + if (widget->inherits(TQLABEL_OBJECT_NAME_STRING)) { widget->installEventFilter(this); } - if (widget->inherits("TQGroupBox")) + if (widget->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) { widget->installEventFilter(this); } - if (widget->inherits("TQMainWindow") || widget->inherits("TQDialog" ) ) + if (widget->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) || widget->inherits(TQDIALOG_OBJECT_NAME_STRING) ) { watcher->addWatched(widget); } @@ -970,16 +970,16 @@ void StyleCheckStyle::polish(TQWidget* widget) void StyleCheckStyle::unPolish(TQWidget* widget) { - if (widget->inherits("TQPushButton")) { + if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) { widget->removeEventFilter(this); } - if (widget->inherits("TQLabel")) + if (widget->inherits(TQLABEL_OBJECT_NAME_STRING)) { widget->removeEventFilter(this); } - if (widget->inherits("TQGroupBox")) + if (widget->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) { widget->removeEventFilter(this); } @@ -2332,7 +2332,7 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control, } else if (widget->parent()) { - if (widget->parent()->inherits("TQToolBar")) + if (widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) { TQToolBar* parent = (TQToolBar*)widget->parent(); TQRect pr = parent->rect(); @@ -2611,7 +2611,7 @@ bool StyleCheckStyle::eventFilter( TQObject *object, TQEvent *event ) } } - if ( event->type() == TQEvent::Paint && object->inherits("TQLabel") ) + if ( event->type() == TQEvent::Paint && object->inherits(TQLABEL_OBJECT_NAME_STRING) ) { TQLabel* lb = static_cast(object); if (lb->pixmap() || lb->picture() || lb->movie() || (lb->textFormat() == Qt::RichText) || @@ -2675,7 +2675,7 @@ bool StyleCheckStyle::eventFilter( TQObject *object, TQEvent *event ) return true; } - if ( event->type() == TQEvent::Paint && object->inherits("TQGroupBox") ) + if ( event->type() == TQEvent::Paint && object->inherits(TQGROUPBOX_OBJECT_NAME_STRING) ) { TQPaintEvent * pevent = static_cast(event); TQGroupBox* gb = static_cast(object); @@ -2689,7 +2689,7 @@ bool StyleCheckStyle::eventFilter( TQObject *object, TQEvent *event ) // I suggested that it could eat me. GCC won. while ( (parent = parent->parent()) ) { - if (parent->inherits("TQGroupBox")) + if (parent->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) { nestedGroupBox = true; break; diff --git a/umbrello/umbrello/umllistview.cpp b/umbrello/umbrello/umllistview.cpp index 29e270ce..f213c01d 100644 --- a/umbrello/umbrello/umllistview.cpp +++ b/umbrello/umbrello/umllistview.cpp @@ -142,7 +142,7 @@ UMLListView::UMLListView(TQWidget *parent, const char *name) UMLListView::~UMLListView() {} bool UMLListView::eventFilter(TQObject *o, TQEvent *e) { - if (e->type() != TQEvent::MouseButtonPress || !o->isA("TQHeader")) + if (e->type() != TQEvent::MouseButtonPress || !o->isA(TQHEADER_OBJECT_NAME_STRING)) return TQListView::eventFilter(o, e); TQMouseEvent *me = static_cast(e); if (me->button() == Qt::RightButton) {