Drop TQT_BASE_OBJECT* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/220/head
Michele Calgaro 1 year ago
parent 23278d2593
commit 48b07a0ff1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -17,7 +17,7 @@ Win::Win()
{ {
KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" ); KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );
assert( factory ); assert( factory );
KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) ); KParts::Part* p = factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) ;
setCentralWidget( p->widget() ); setCentralWidget( p->widget() );
TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p ); TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );

@ -163,9 +163,9 @@ void KateCodeCompletion::showCompletionBox(
bool KateCodeCompletion::eventFilter( TQObject *o, TQEvent *e ) bool KateCodeCompletion::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_completionPopup) && if ( o != m_completionPopup &&
TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_completionListBox) && o != m_completionListBox &&
TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_completionListBox->viewport()) ) o != m_completionListBox->viewport() )
return false; return false;
if( e->type() == TQEvent::Hide ) if( e->type() == TQEvent::Hide )

@ -446,7 +446,7 @@ bool KateSuperRange::boundaryOn(uint lineNum) const
void KateSuperRange::slotEvaluateChanged() void KateSuperRange::slotEvaluateChanged()
{ {
if (sender() == static_cast<TQObject*>(m_start)) { if (sender() == m_start) {
if (m_evaluate) { if (m_evaluate) {
if (!m_endChanged) { if (!m_endChanged) {
// Only one was changed // Only one was changed
@ -484,7 +484,7 @@ void KateSuperRange::slotEvaluateChanged()
void KateSuperRange::slotEvaluateUnChanged() void KateSuperRange::slotEvaluateUnChanged()
{ {
if (sender() == static_cast<TQObject*>(m_start)) { if (sender() == m_start) {
if (m_evaluate) { if (m_evaluate) {
if (m_endChanged) { if (m_endChanged) {
// Only one changed // Only one changed

@ -2438,7 +2438,7 @@ bool KateViewInternal::isTargetSelected( const TQPoint& p )
bool KateViewInternal::eventFilter( TQObject *obj, TQEvent *e ) bool KateViewInternal::eventFilter( TQObject *obj, TQEvent *e )
{ {
if (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_lineScroll)) if (obj == m_lineScroll)
{ {
// the second condition is to make sure a scroll on the vertical bar doesn't cause a horizontal scroll ;) // the second condition is to make sure a scroll on the vertical bar doesn't cause a horizontal scroll ;)
if (e->type() == TQEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue()) if (e->type() == TQEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue())

@ -204,7 +204,7 @@ void ISearchPluginView::setAutoWrap( bool autoWrap )
bool ISearchPluginView::eventFilter( TQObject* o, TQEvent* e ) bool ISearchPluginView::eventFilter( TQObject* o, TQEvent* e )
{ {
if( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_combo->lineEdit()) ) if( o != m_combo->lineEdit() )
return false; return false;
if( e->type() == TQEvent::FocusIn ) { if( e->type() == TQEvent::FocusIn ) {

@ -90,7 +90,7 @@ void KScreenSaver::embed( TQWidget *w )
bool KScreenSaver::eventFilter( TQObject *o, TQEvent *e ) bool KScreenSaver::eventFilter( TQObject *o, TQEvent *e )
{ {
// make sure events get to the original window owner // make sure events get to the original window owner
if ( d->owner && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { if ( d->owner && o == this ) {
TQApplication::sendEvent( d->owner, e ); TQApplication::sendEvent( d->owner, e );
return false; return false;
} }

@ -615,7 +615,7 @@ void LdapConfigWidget::setFlags( int flags )
obj = ch2.first(); obj = ch2.first();
while ( obj != 0 ) { while ( obj != 0 ) {
widget = dynamic_cast<TQWidget*> (obj); widget = dynamic_cast<TQWidget*> (obj);
if ( widget && TQT_BASE_OBJECT(widget->parent()) == TQT_BASE_OBJECT(this) ) { if ( widget && widget->parent() == this ) {
mainLayout->remove( widget ); mainLayout->remove( widget );
delete ( widget ); delete ( widget );
} }

@ -150,7 +150,7 @@ namespace KDEPrivate
const TQStringList &args, Type2Type<TQWidget> ) const TQStringList &args, Type2Type<TQWidget> )
{ {
WidgetParentType *p = dynamic_cast<WidgetParentType *>( static_cast<TQT_BASE_OBJECT_NAME*>(parent) ); WidgetParentType *p = dynamic_cast<WidgetParentType *>( parent );
if ( parent && !p ) if ( parent && !p )
return 0; return 0;
return new Product( p, name, args ); return new Product( p, name, args );
@ -160,7 +160,7 @@ namespace KDEPrivate
TQObject *parent, const char *name, TQObject *parent, const char *name,
const TQStringList &args, Type2Type<TQObject> ) const TQStringList &args, Type2Type<TQObject> )
{ {
ParentType *p = dynamic_cast<ParentType *>( static_cast<TQT_BASE_OBJECT_NAME*>(parent) ); ParentType *p = dynamic_cast<ParentType *>( parent );
if ( parent && !p ) if ( parent && !p )
return 0; return 0;
return new Product( p, name, args ); return new Product( p, name, args );
@ -179,9 +179,9 @@ namespace KDEPrivate
const char *className, const char *className,
const TQStringList &args ) const TQStringList &args )
{ {
return static_cast<TQObject*>(static_cast<QObject*>(ConcreteFactory<Product, ParentType>::create( parentWidget, widgetName, return static_cast<TQObject*>(ConcreteFactory<Product, ParentType>::create( parentWidget, widgetName,
parent, name, className, parent, name, className,
args ))); args ));
} }
}; };

@ -678,7 +678,7 @@ bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Quit: case TQEvent::Quit:
while (o->parent()) while (o->parent())
o = TQT_TQOBJECT(o->parent()); o = TQT_TQOBJECT(o->parent());
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) if (o == this)
return TQWidget::eventFilter(o,e); return TQWidget::eventFilter(o,e);
else else
return true; return true;

@ -907,7 +907,7 @@ bool ComboBoxWidget::event(TQEvent *e)
bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e) bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{ {
if (TQT_BASE_OBJECT(dest)==TQT_BASE_OBJECT(listBox()) && e->type()==TQEvent::KeyPress) if (dest==listBox() && e->type()==TQEvent::KeyPress)
{ {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = TQT_TQKEYEVENT(e);
bool forward = false; bool forward = false;

@ -1895,7 +1895,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
TQWidget *view = viewport(); TQWidget *view = viewport();
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(view)) { if (o == view) {
// we need to install an event filter on all children of the viewport to // we need to install an event filter on all children of the viewport to
// be able to get correct stacking of children within the document. // be able to get correct stacking of children within the document.
if(e->type() == TQEvent::ChildInserted) { if(e->type() == TQEvent::ChildInserted) {

@ -358,9 +358,9 @@ bool KCombiView::eventFilter( TQObject *o, TQEvent *e )
// only the focused view may have a selection // only the focused view may have a selection
if ( type == TQEvent::FocusIn ) if ( type == TQEvent::FocusIn )
{ {
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(left) ) if ( o == left )
right->clearSelection(); right->clearSelection();
else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(right->widget()) ) else if ( o == right->widget() )
left->clearSelection(); left->clearSelection();
} }

@ -386,7 +386,7 @@ void KURLRequester::slotUpdateURL()
bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev ) bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev )
{ {
if ( ( TQT_BASE_OBJECT(d->edit) == TQT_BASE_OBJECT(obj) ) || ( TQT_BASE_OBJECT(d->combo) == TQT_BASE_OBJECT(obj) ) ) if ( ( d->edit == obj ) || ( d->combo == obj ) )
{ {
if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut )) if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut ))
// Forward focusin/focusout events to the urlrequester; needed by file form element in tdehtml // Forward focusin/focusout events to the urlrequester; needed by file form element in tdehtml

@ -1560,7 +1560,7 @@ void KDirOperator::resizeEvent( TQResizeEvent * )
if (m_fileView) if (m_fileView)
m_fileView->widget()->resize( size() ); m_fileView->widget()->resize( size() );
if ( TQT_BASE_OBJECT(progress->parent()) == TQT_BASE_OBJECT(this) ) // might be reparented into a statusbar if ( progress->parent() == this ) // might be reparented into a statusbar
progress->move(2, height() - progress->height() -2); progress->move(2, height() - progress->height() -2);
} }

@ -179,7 +179,7 @@ void KFileFilterCombo::slotFilterChanged()
bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e ) bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit()) && e->type() == TQEvent::FocusOut ) { if ( o == lineEdit() && e->type() == TQEvent::FocusOut ) {
if ( currentText() != d->lastFilter ) if ( currentText() != d->lastFilter )
emit filterChanged(); emit filterChanged();
} }

@ -737,7 +737,7 @@ void KFileIconView::listingCompleted()
// need to remove our tooltip, eventually // need to remove our tooltip, eventually
bool KFileIconView::eventFilter( TQObject *o, TQEvent *e ) bool KFileIconView::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { if ( o == viewport() || o == this ) {
int type = e->type(); int type = e->type();
if ( type == TQEvent::Leave || if ( type == TQEvent::Leave ||
type == TQEvent::FocusOut ) type == TQEvent::FocusOut )

@ -233,7 +233,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt
bool DockContainer::eventFilter( TQObject *obj, TQEvent *event ) bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
{ {
if (TQT_BASE_OBJECT(obj)==TQT_BASE_OBJECT(m_tb)) { if (obj==m_tb) {
if ( (event->type()==TQEvent::Resize) && (m_ws->isHidden()) ) { if ( (event->type()==TQEvent::Resize) && (m_ws->isHidden()) ) {
TQSize size=((TQResizeEvent*)event)->size(); TQSize size=((TQResizeEvent*)event)->size();
if (m_vertical) if (m_vertical)

@ -775,7 +775,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
delete list; // delete the list, not the objects delete list; // delete the list, not the objects
//Reparent if needed //Reparent if needed
if ( TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(this) ) if ( w->parent() != this )
{ {
//reparent to this widget , no flags , point , show it //reparent to this widget , no flags , point , show it
TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos ); TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
@ -1085,7 +1085,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
TQObject* pObj = obj; TQObject* pObj = obj;
while ( ( pObj != 0L ) && !bIsChild ) while ( ( pObj != 0L ) && !bIsChild )
{ {
bIsChild = ( TQT_BASE_OBJECT(pObj) == TQT_BASE_OBJECT(this) ); bIsChild = ( pObj == this );
pObj = pObj->parent(); pObj = pObj->parent();
} }
// unset the resize cursor if the cursor moved from the frame into a inner widget // unset the resize cursor if the cursor moved from the frame into a inner widget
@ -1101,7 +1101,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() ) if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() )
bIsSecondClick = true; // of a possible double click bIsSecondClick = true; // of a possible double click
if ( !( ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pWinIcon) ) || ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pUnixIcon) ) ) && bIsSecondClick ) ) if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) )
{ {
// in case we didn't click on the icon button // in case we didn't click on the icon button
TQFocusEvent focusEvent( TQFocusEvent::FocusIn ); TQFocusEvent focusEvent( TQFocusEvent::FocusIn );
@ -1112,7 +1112,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
m_pClient->activate(); m_pClient->activate();
} }
if ( ( TQT_BASE_OBJECT(obj->parent()) != TQT_BASE_OBJECT(m_pCaption) ) && ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(m_pCaption) ) ) if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
{ {
TQWidget* w = ( TQWidget* ) obj; TQWidget* w = ( TQWidget* ) obj;
if ( ( w->focusPolicy() == TQ_ClickFocus ) || ( w->focusPolicy() == TQ_StrongFocus ) ) if ( ( w->focusPolicy() == TQ_ClickFocus ) || ( w->focusPolicy() == TQ_StrongFocus ) )
@ -1121,7 +1121,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
} }
} }
} }
if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pWinIcon) ) || ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pUnixIcon) ) ) if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) )
{ {
// in case we clicked on the icon button // in case we clicked on the icon button
if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() ) if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() )

@ -629,14 +629,14 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( e->type() == TQEvent::IconChange ) if ( e->type() == TQEvent::IconChange )
{ {
// tqDebug("KMDiChildView:: TQEvent:IconChange intercepted\n"); // tqDebug("KMDiChildView:: TQEvent:IconChange intercepted\n");
if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) if ( obj == this )
iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() ); iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_trackChanges) ) else if ( obj == m_trackChanges )
setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() ); setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() );
} }
if ( e->type() == TQEvent::CaptionChange ) if ( e->type() == TQEvent::CaptionChange )
{ {
if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) if ( obj == this )
captionUpdated( this, caption() ); captionUpdated( this, caption() );
} }
} }

@ -1187,7 +1187,7 @@ KColorDialog::~KColorDialog()
bool bool
KColorDialog::eventFilter( TQObject *obj, TQEvent *ev ) KColorDialog::eventFilter( TQObject *obj, TQEvent *ev )
{ {
if ((TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->htmlName)) || (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->hsSelector))) if ((obj == d->htmlName) || (obj == d->hsSelector))
switch(ev->type()) switch(ev->type())
{ {
case TQEvent::DragEnter: case TQEvent::DragEnter:

@ -317,7 +317,7 @@ TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const
bool KCursorPrivateAutoHideEventFilter::eventFilter( TQObject *o, TQEvent *e ) bool KCursorPrivateAutoHideEventFilter::eventFilter( TQObject *o, TQEvent *e )
{ {
Q_ASSERT( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_widget) ); Q_ASSERT( o == m_widget );
switch ( e->type() ) switch ( e->type() )
{ {

@ -122,7 +122,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
void KDockMainWindow::setView( TQWidget *view ) void KDockMainWindow::setView( TQWidget *view )
{ {
if ( view->isA("KDockWidget") ){ if ( view->isA("KDockWidget") ){
if ( TQT_BASE_OBJECT(view->parent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this ); if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
} }
#ifndef NO_KDE2 #ifndef NO_KDE2
@ -778,7 +778,7 @@ void KDockWidget::updateHeader()
setCursor(TQCursor(ArrowCursor)); setCursor(TQCursor(ArrowCursor));
#endif #endif
if ( (TQT_BASE_OBJECT(parent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){ if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
header->hide(); header->hide();
} else { } else {
header->setTopLevel( false ); header->setTopLevel( false );
@ -799,7 +799,7 @@ void KDockWidget::updateHeader()
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{ {
if ( TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(s) ) if ( parent() != s )
{ {
hide(); hide();
reparent(s, 0, TQPoint(0,0), false); reparent(s, 0, TQPoint(0,0), false);
@ -1449,7 +1449,7 @@ void KDockWidget::setWidget( TQWidget* mw )
{ {
if ( !mw ) return; if ( !mw ) return;
if ( TQT_BASE_OBJECT(mw->parent()) != TQT_BASE_OBJECT(this) ){ if ( mw->parent() != this ){
mw->reparent(this, 0, TQPoint(0,0), false); mw->reparent(this, 0, TQPoint(0,0), false);
} }
@ -1505,13 +1505,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
bool KDockWidget::mayBeHide() const bool KDockWidget::mayBeHide() const
{ {
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main)); bool f = (parent() != manager->main);
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) ); return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
} }
bool KDockWidget::mayBeShow() const bool KDockWidget::mayBeShow() const
{ {
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main)); bool f = (parent() != manager->main);
return ( !isGroup && !isTabGroup && f && !isVisible() ); return ( !isGroup && !isTabGroup && f && !isVisible() );
} }
@ -2213,7 +2213,7 @@ void KDockManager::writeConfig(TQDomElement &base)
TQObjectListIt it(*childDock); TQObjectListIt it(*childDock);
KDockWidget *obj1; KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) { while ( (obj1=(KDockWidget*)it.current()) ) {
if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) ) if ( obj1->parent() == main )
mainWidgetStr = TQString::fromLatin1(obj1->name()); mainWidgetStr = TQString::fromLatin1(obj1->name());
nList.append(obj1->name()); nList.append(obj1->name());
++it; ++it;
@ -2548,7 +2548,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group )
++it; ++it;
//debug(" +Add subdock %s", obj->name()); //debug(" +Add subdock %s", obj->name());
nList.append( obj->name() ); nList.append( obj->name() );
if ( TQT_BASE_OBJECT(obj->parent()) == TQT_BASE_OBJECT(main) ) if ( obj->parent() == main )
c->writeEntry( "Main:view", obj->name() ); c->writeEntry( "Main:view", obj->name() );
} }

@ -536,7 +536,7 @@ bool KJanusWidget::setSwallowedWidget( TQWidget *widget )
} }
else else
{ {
if( TQT_BASE_OBJECT(widget->parent()) != TQT_BASE_OBJECT(mSwallowPage) ) if( widget->parent() != mSwallowPage )
{ {
widget->reparent( mSwallowPage, 0, TQPoint(0,0) ); widget->reparent( mSwallowPage, 0, TQPoint(0,0) );
} }

@ -1006,7 +1006,7 @@ void KLineEdit::dropEvent(TQDropEvent *e)
bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev ) bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev )
{ {
if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) if( o == this )
{ {
KCursor::autoHideEventFilter( TQT_TQOBJECT(this), ev ); KCursor::autoHideEventFilter( TQT_TQOBJECT(this), ev );
if ( ev->type() == TQEvent::AccelOverride ) if ( ev->type() == TQEvent::AccelOverride )

@ -609,7 +609,7 @@ void KDictSpellingHighlighter::slotKSpellNotResponding()
bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e) bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e)
{ {
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(textEdit()) && (e->type() == TQEvent::FocusIn)) { if (o == textEdit() && (e->type() == TQEvent::FocusIn)) {
if ( d->globalConfig ) { if ( d->globalConfig ) {
TQString skey = spellKey(); TQString skey = spellKey();
if ( d->spell && d->spellKey != skey ) { if ( d->spell && d->spellKey != skey ) {
@ -619,7 +619,7 @@ bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e)
} }
} }
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(textEdit()) && (e->type() == TQEvent::KeyPress)) { if (o == textEdit() && (e->type() == TQEvent::KeyPress)) {
TQKeyEvent *k = TQT_TQKEYEVENT(e); TQKeyEvent *k = TQT_TQKEYEVENT(e);
d->autoReady = true; d->autoReady = true;
if (d->rehighlightRequest->isActive()) // try to stay out of the users way if (d->rehighlightRequest->isActive()) // try to stay out of the users way
@ -661,7 +661,7 @@ bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e)
} }
} }
else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(textEdit()->viewport()) && else if ( o == textEdit()->viewport() &&
( e->type() == TQEvent::MouseButtonPress )) { ( e->type() == TQEvent::MouseButtonPress )) {
d->autoReady = true; d->autoReady = true;
if ( intraWordEditing() ) { if ( intraWordEditing() ) {

@ -425,7 +425,7 @@ static TQString fixTip(TQString tip)
bool KTipDialog::eventFilter(TQObject *o, TQEvent *e) bool KTipDialog::eventFilter(TQObject *o, TQEvent *e)
{ {
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mTipText) && e->type()== TQEvent::KeyPress && if (o == mTipText && e->type()== TQEvent::KeyPress &&
(((TQKeyEvent *)e)->key() == Key_Return || (((TQKeyEvent *)e)->key() == Key_Return ||
((TQKeyEvent *)e)->key() == Key_Space )) ((TQKeyEvent *)e)->key() == Key_Space ))
accept(); accept();

@ -310,7 +310,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
// active and has just been given the Qt focus (L0614) or // active and has just been given the Qt focus (L0614) or
// because the widget already had the Qt focus and just became // because the widget already had the Qt focus and just became
// active (L0615). // active (L0615).
if ( TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && if ( tqApp->focusWidget() == o &&
((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
TQFocusEvent* fe = (TQFocusEvent*) e; TQFocusEvent* fe = (TQFocusEvent*) e;
if ( obeyFocus || fe->reason() != TQFocusEvent::ActiveWindow /*|| fe->reason() == TQFocusEvent::Mouse || if ( obeyFocus || fe->reason() != TQFocusEvent::ActiveWindow /*|| fe->reason() == TQFocusEvent::Mouse ||
@ -344,7 +344,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
} }
break; break;
case TQEvent::KeyPress: case TQEvent::KeyPress:
if (TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && if (tqApp->focusWidget() == o &&
((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
// L0620: The following code replaces the Qt code that // L0620: The following code replaces the Qt code that
// handles focus focus changes with the tab key. See the // handles focus focus changes with the tab key. See the
@ -810,7 +810,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
switch ( e->type() ) { switch ( e->type() ) {
case TQEvent::WindowActivate: case TQEvent::WindowActivate:
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { if ( o == topLevelWidget() ) {
// L1310: Qt thinks the application window has just been activated. // L1310: Qt thinks the application window has just been activated.
// Make sure the X11 focus is on the focus proxy window. See L0686. // Make sure the X11 focus is on the focus proxy window. See L0686.
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
@ -826,7 +826,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
} }
break; break;
case TQEvent::WindowDeactivate: case TQEvent::WindowDeactivate:
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { if ( o == topLevelWidget() ) {
if (d->xplain) if (d->xplain)
// L1321: Activation has changed. Grab state might change. See L2800. // L1321: Activation has changed. Grab state might change. See L2800.
checkGrab(); checkGrab();
@ -838,9 +838,9 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
case TQEvent::Move: case TQEvent::Move:
{ {
TQWidget* pos = this; TQWidget* pos = this;
while( TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(o) && TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(topLevelWidget())) while( pos != o && pos != topLevelWidget())
pos = pos->parentWidget(); pos = pos->parentWidget();
if( TQT_BASE_OBJECT(pos) == TQT_BASE_OBJECT(o) ) { if( pos == o ) {
// L1390: Send fake configure notify events whenever the // L1390: Send fake configure notify events whenever the
// global position of the client changes. See L2900. // global position of the client changes. See L2900.
TQPoint globalPos = mapToGlobal(TQPoint(0,0)); TQPoint globalPos = mapToGlobal(TQPoint(0,0));

@ -2103,7 +2103,7 @@ void TDEToggleFullScreenAction::setChecked( bool c )
bool TDEToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) bool TDEToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e )
{ {
if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(window) ) if( o == window )
if( e->type() == TQEvent::WindowStateChange ) if( e->type() == TQEvent::WindowStateChange )
{ {
if( window->isFullScreen() != isChecked()) if( window->isFullScreen() != isChecked())

@ -109,7 +109,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e )
{ {
int type = e->type(); int type = e->type();
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->m_parent) ) { if ( o == d->m_parent ) {
if ( isVisible() ) { if ( isVisible() ) {
if ( type == TQEvent::KeyPress ) { if ( type == TQEvent::KeyPress ) {
TQKeyEvent *ev = TQT_TQKEYEVENT( e ); TQKeyEvent *ev = TQT_TQKEYEVENT( e );

@ -244,7 +244,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
{ {
if ( d->topLevel ) if ( d->topLevel )
{ {
if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget()) ) if ( parentWidget() && obj == parentWidget()->topLevelWidget() )
{ {
if( ev->type() == TQEvent::Resize ) if( ev->type() == TQEvent::Resize )
return false; // ignore resizing of parent, TQMenuBar would try to adjust size return false; // ignore resizing of parent, TQMenuBar would try to adjust size
@ -257,7 +257,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
// will update the state properly // will update the state properly
setTopLevelMenuInternal( d->topLevel ); setTopLevelMenuInternal( d->topLevel );
} }
if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()) && ev->type() == TQEvent::Reparent ) if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent )
{ {
#ifdef Q_WS_X11 #ifdef Q_WS_X11
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@ -266,7 +266,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
#endif #endif
setShown( parentWidget()->isTopLevel() || parentWidget()->isVisible()); setShown( parentWidget()->isTopLevel() || parentWidget()->isVisible());
} }
if( parentWidget() && !parentWidget()->isTopLevel() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget())) if( parentWidget() && !parentWidget()->isTopLevel() && obj == parentWidget())
{ // if the parent is not toplevel, KMenuBar needs to match its visibility status { // if the parent is not toplevel, KMenuBar needs to match its visibility status
if( ev->type() == TQEvent::Show ) if( ev->type() == TQEvent::Show )
{ {
@ -283,7 +283,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
} }
else else
{ {
if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget())) if( parentWidget() && obj == parentWidget()->topLevelWidget())
{ {
if( ev->type() == TQEvent::WindowStateChange if( ev->type() == TQEvent::WindowStateChange
&& !parentWidget()->topLevelWidget()->isFullScreen() ) && !parentWidget()->topLevelWidget()->isFullScreen() )

@ -410,7 +410,7 @@ void TDEToolBarButton::enterEvent(TQEvent *)
bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
{ {
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) if (o == this)
{ {
// Popup the menu when the left mousebutton is pressed and the mouse // Popup the menu when the left mousebutton is pressed and the mouse

@ -10,7 +10,7 @@ int main( int argc, char **argv )
{ {
TDEApplication app( argc, argv, "tdeactiontest" ); TDEApplication app( argc, argv, "tdeactiontest" );
TDEActionCollection coll( static_cast<TQObject *>( 0 ) ); TDEActionCollection coll( 0 );
TQGuardedPtr<TDEAction> action1 = new TDERadioAction("test",0, &coll); TQGuardedPtr<TDEAction> action1 = new TDERadioAction("test",0, &coll);
TQGuardedPtr<TDEAction> action2 = new TDERadioAction("test",0, &coll); TQGuardedPtr<TDEAction> action2 = new TDERadioAction("test",0, &coll);

Loading…
Cancel
Save