Update kdebase inherits() to use new object name defines instead of string literals

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1226899 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 161e6c2e3a
commit cbecd3a8a7

@ -73,7 +73,7 @@ void BackTrace::start()
{ {
TQObject * o = tqparent(); TQObject * o = tqparent();
if (o && !o->inherits("QWidget")) if (o && !o->inherits(TQWIDGET_OBJECT_NAME_STRING))
{ {
o = NULL; o = NULL;
} }

@ -604,7 +604,7 @@ void FaxCtrl::slotCloseLog()
{ {
TQTextEdit *view = m_logview; TQTextEdit *view = m_logview;
m_logview = 0; m_logview = 0;
if (obj && obj->inherits("QPushButton")) if (obj && obj->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
delete view->tqparentWidget(); delete view->tqparentWidget();
kdDebug() << "slotClose()" << endl; kdDebug() << "slotClose()" << endl;
} }

@ -1016,10 +1016,10 @@ bool KlipperWidget::ignoreClipboardChanges() const
TQWidget *tqfocusWidget = tqApp->tqfocusWidget(); TQWidget *tqfocusWidget = tqApp->tqfocusWidget();
if ( tqfocusWidget ) if ( tqfocusWidget )
{ {
if ( tqfocusWidget->inherits( "QSpinBox" ) || if ( tqfocusWidget->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ||
(tqfocusWidget->tqparentWidget() && (tqfocusWidget->tqparentWidget() &&
tqfocusWidget->inherits("QLineEdit") && tqfocusWidget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) &&
tqfocusWidget->tqparentWidget()->inherits("QSpinWidget")) ) tqfocusWidget->tqparentWidget()->inherits(TQSPINWIDGET_OBJECT_NAME_STRING)) )
{ {
return true; return true;
} }

@ -94,7 +94,7 @@ int KonqBidiHistoryAction::plug( TQWidget *widget, int index )
return -1; return -1;
// Go menu // Go menu
if ( widget->inherits("QPopupMenu") ) if ( widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) )
{ {
m_goMenu = (TQPopupMenu*)widget; m_goMenu = (TQPopupMenu*)widget;
// Forward signal (to main view) // Forward signal (to main view)

@ -1044,7 +1044,7 @@ TQObject *KonqMainWindow::lastFrame( KonqView *view )
TQObject *nextFrame, *viewFrame; TQObject *nextFrame, *viewFrame;
nextFrame = TQT_TQOBJECT(view->frame()); nextFrame = TQT_TQOBJECT(view->frame());
viewFrame = 0; viewFrame = 0;
while ( nextFrame != 0 && ! nextFrame->inherits( "QWidgetStack" ) ) { while ( nextFrame != 0 && ! nextFrame->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
viewFrame = nextFrame; viewFrame = nextFrame;
nextFrame = nextFrame->tqparent(); nextFrame = nextFrame->tqparent();
} }

@ -472,7 +472,7 @@ void KonqView::connectPart( )
m_pPart->widget()->installEventFilter( this ); m_pPart->widget()->installEventFilter( this );
if (m_bBackRightClick && m_pPart->widget()->inherits("QScrollView") ) if (m_bBackRightClick && m_pPart->widget()->inherits(TQSCROLLVIEW_OBJECT_NAME_STRING) )
{ {
(static_cast<TQScrollView *>(m_pPart->widget()))->viewport()->installEventFilter( this ); (static_cast<TQScrollView *>(m_pPart->widget()))->viewport()->installEventFilter( this );
} }
@ -1220,7 +1220,7 @@ void KonqView::reparseConfiguration()
bool b = KonqSettings::backRightClick(); bool b = KonqSettings::backRightClick();
if ( m_bBackRightClick != b ) if ( m_bBackRightClick != b )
{ {
if (m_bBackRightClick && m_pPart->widget()->inherits("QScrollView") ) if (m_bBackRightClick && m_pPart->widget()->inherits(TQSCROLLVIEW_OBJECT_NAME_STRING) )
{ {
(static_cast<TQScrollView *>(m_pPart->widget()))->viewport()->installEventFilter( this ); (static_cast<TQScrollView *>(m_pPart->widget()))->viewport()->installEventFilter( this );
} }

@ -480,7 +480,7 @@ void Konsole::makeGUI()
// Remove the empty separator Qt inserts if the menu is empty on popup, // Remove the empty separator Qt inserts if the menu is empty on popup,
// not sure if this will be "fixed" in Qt, for now use this hack (malte) // not sure if this will be "fixed" in Qt, for now use this hack (malte)
if(!(isRestored)) { if(!(isRestored)) {
if (sender() && sender()->inherits("QPopupMenu") && if (sender() && sender()->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) &&
static_cast<const TQPopupMenu *>(sender())->count() == 1) static_cast<const TQPopupMenu *>(sender())->count() == 1)
const_cast<TQPopupMenu *>(static_cast<const TQPopupMenu *>(sender()))->removeItemAt(0); const_cast<TQPopupMenu *>(static_cast<const TQPopupMenu *>(sender()))->removeItemAt(0);
} }

@ -1907,7 +1907,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
if ( !w ) if ( !w )
return state; return state;
TQWidget* widget = TQWidget::tqfind( w ); TQWidget* widget = TQWidget::tqfind( w );
if ( (!widget || widget->inherits("QToolButton") ) && !findClient( WindowMatchPredicate( w )) ) if ( (!widget || widget->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) ) && !findClient( WindowMatchPredicate( w )) )
{ {
int x, y; int x, y;
Window xw; Window xw;

Loading…
Cancel
Save