From e5cb335358db67ee9a68a15d99dc89d1e0da3111 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 12 Aug 2023 18:48:37 +0900 Subject: Drop TQT_BASE_OBJECT* defines Signed-off-by: Michele Calgaro (cherry picked from commit 0813a2c41340ea35119ba3225c8c9b710d9ced07) --- kdevdesigner/designer/actiondnd.cpp | 4 ++-- kdevdesigner/designer/command.cpp | 8 ++++---- kdevdesigner/designer/connectionitems.cpp | 2 +- kdevdesigner/designer/formfile.cpp | 4 ++-- kdevdesigner/designer/formwindow.cpp | 12 ++++++------ kdevdesigner/designer/hierarchyview.cpp | 4 ++-- kdevdesigner/designer/layout.cpp | 6 +++--- kdevdesigner/designer/mainwindow.cpp | 18 +++++++++--------- kdevdesigner/designer/mainwindowactions.cpp | 4 ++-- kdevdesigner/designer/menubareditor.cpp | 2 +- kdevdesigner/designer/metadatabase.cpp | 22 +++++++++++----------- kdevdesigner/designer/popupmenueditor.cpp | 2 +- kdevdesigner/designer/propertyeditor.cpp | 12 ++++++------ kdevdesigner/designer/qcompletionedit.cpp | 4 ++-- kdevdesigner/designer/resource.cpp | 16 ++++++++-------- kdevdesigner/designer/widgetfactory.cpp | 2 +- kdevdesigner/designer/workspace.cpp | 2 +- kdevdesigner/uilib/qwidgetfactory.cpp | 4 ++-- 18 files changed, 64 insertions(+), 64 deletions(-) (limited to 'kdevdesigner') diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index 604e45d4..66dd89ea 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -284,13 +284,13 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) if ( !o || !e || o->inherits( "TQDockWindowHandle" ) || o->inherits( "TQDockWindowTitleBar" ) ) return TQToolBar::eventFilter( o, e ); - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress && + if ( o == this && e->type() == TQEvent::MouseButtonPress && ( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) { mousePressEvent( (TQMouseEvent*)e ); return TRUE; } - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) + if ( o == this ) return TQToolBar::eventFilter( o, e ); if ( e->type() == TQEvent::MouseButtonPress ) { diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index 8d7888c2..8f11679a 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -1128,7 +1128,7 @@ void AddConnectionCommand::execute() { MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } @@ -1136,7 +1136,7 @@ void AddConnectionCommand::unexecute() { MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } @@ -1152,7 +1152,7 @@ void RemoveConnectionCommand::execute() { MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } @@ -1160,7 +1160,7 @@ void RemoveConnectionCommand::unexecute() { MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index d2371426..059fe6bf 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -353,7 +353,7 @@ void SignalItem::senderChanged( TQObject *sender ) lst << MetaDataBase::normalizeFunction( *it ); } - if ( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(formWindow->mainContainer()) ) { + if ( sender == formWindow->mainContainer() ) { TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); if ( !extra.isEmpty() ) lst += extra; diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp index 4ba5b7c7..1ef0b0b7 100644 --- a/kdevdesigner/designer/formfile.cpp +++ b/kdevdesigner/designer/formfile.cpp @@ -413,8 +413,8 @@ void FormFile::showFormWindow() return; if ( TQT_TQOBJECT(formWindow()) ) { if ( ( formWindow()->hasFocus() || - TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) && - TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) { + MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) && + MainWindow::self->propertyeditor()->formWindow() != formWindow() ) { MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), TQT_TQOBJECT(formWindow()->currentWidget()) ); diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index bad73971..8e3aa416 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -435,7 +435,7 @@ void FormWindow::insertWidget() ++it; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( o ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { + insertedWidgets.find( o ) && o != w ) { TQRect r2( ( (TQWidget*)o )->pos(), ( (TQWidget*)o )->size() ); if ( r.contains( r2 ) ) @@ -737,7 +737,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) } default: if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && - ( isMainContainer( w ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) ) + ( isMainContainer( w ) || w == this ) ) mainWindow()->editSource(); break; } @@ -2361,7 +2361,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) int num = 1; TQPtrDictIterator it( insertedWidgets ); for ( ; it.current();) { - if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && + if ( it.current() != w && qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { found = TRUE; if ( !changeIt ) @@ -2568,7 +2568,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) bool FormWindow::isMainContainer( TQObject *w ) const { - return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() ); + return w && w->isWidgetType() && ( w == this || w == mainContainer() ); } void FormWindow::setMainContainer( TQWidget *w ) @@ -2576,7 +2576,7 @@ void FormWindow::setMainContainer( TQWidget *w ) bool resetPropertyWidget = isMainContainer( propertyWidget ); if ( mContainer ) insertedWidgets.remove( mContainer ); - if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) ) + if ( propertyWidget == mContainer ) propertyWidget = 0; delete mContainer; mContainer = w; @@ -2691,7 +2691,7 @@ bool FormWindow::isCentralWidget( TQObject *w ) const { if ( !::tqqt_cast(mainContainer()) ) return FALSE; - return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); + return w == ((TQMainWindow*)mainContainer())->centralWidget(); } int FormWindow::layoutDefaultSpacing() const diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index 43e16601..7090a355 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -249,7 +249,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) TQObject *o = findObject( i ); if ( !o ) return 0; - if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) { + if ( formWindow == o ) { if ( deselect ) formWindow->clearSelection( FALSE ); formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); @@ -599,7 +599,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) return; if ( !o->isWidgetType() || - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) + ( o != formWindow && !formWindow->widgets()->find( (TQWidget*)o ) ) ) return; TQWidget *w = (TQWidget*)o; diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index be20989c..e4f772fc 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -314,7 +314,7 @@ void HorizontalLayout::doLayout() TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) @@ -378,7 +378,7 @@ void VerticalLayout::doLayout() TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) @@ -756,7 +756,7 @@ void GridLayout::doLayout() int r, c, rs, cs; for ( w = widgets.first(); w; w = widgets.next() ) { if ( grid->locateWidget( w, r, c, rs, cs) ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( rs * cs == 1 ) { layout->addWidget( w, r, c, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 6f98d371..8cec658f 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -1162,25 +1162,25 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) } break; case TQEvent::DragEnter: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); return TRUE; } break; case TQEvent::DragMove: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); return TRUE; } break; case TQEvent::Drop: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDropEvent( (TQDropEvent*)e ); return TRUE; } break; case TQEvent::Show: - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) + if ( o != this ) break; if ( ((TQShowEvent*)e)->spontaneous() ) break; @@ -1351,7 +1351,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) TQPtrList waitingForDelete; waitingForDelete.setAutoDelete( TRUE ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) + if ( e->object() == w ) waitingForDelete.append( e ); } @@ -3295,9 +3295,9 @@ void MainWindow::enableAll( bool enable ) menuBar()->setEnabled( enable ); TQObjectList *l = queryList( "TQDockWindow" ); for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || - TQT_BASE_OBJECT(o) == oWindow->parentWidget() || - TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) + if ( o == wspace->parentWidget() || + o == oWindow->parentWidget() || + o == hierarchyView->parentWidget() ) continue; ( (TQWidget*)o )->setEnabled( enable ); } @@ -3458,7 +3458,7 @@ TQObject *MainWindow::findRealObject( TQObject *o ) void MainWindow::formNameChanged( FormWindow *fw ) { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) + if ( e->object() == fw ) e->refresh( TRUE ); if ( e->project() == fw->project() ) e->resetContext(); diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index 161d3dae..6f6ff3ad 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -1345,7 +1345,7 @@ bool MainWindow::fileSave() bool MainWindow::fileSaveForm() { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { + if ( e->object() == formWindow() || e == qWorkspace()->activeWindow() ) { e->save(); } } @@ -1431,7 +1431,7 @@ void MainWindow::fileCreateTemplate() void MainWindow::createNewTemplate() { - CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast(sender()))->parent(); + CreateTemplate *dia = (CreateTemplate*)sender()->parent(); TQString fn = dia->editName->text(); TQString cn = dia->listClass->currentText(); if ( fn.isEmpty() || cn.isEmpty() ) { diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp index f62e15e0..ce0ae45d 100644 --- a/kdevdesigner/designer/menubareditor.cpp +++ b/kdevdesigner/designer/menubareditor.cpp @@ -571,7 +571,7 @@ void MenuBarEditor::paste() bool MenuBarEditor::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 ) { leaveEditMode(); lineEdit->hide(); update(); diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 39711a64..7c77565d 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -440,10 +440,10 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString r->connections.append( conn ); if ( addCode ) { TQString rec = receiver->name(); - if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqqt_cast(o) && receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; TQString sen = sender->name(); - if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqqt_cast(o) && sender ==( (FormWindow*)o )->mainContainer() ) sen = "this"; FormFile *ff = 0; if ( ::tqqt_cast(o) ) @@ -468,9 +468,9 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr return; for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && + if ( conn.sender ==sender && conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.receiver ==receiver && conn.slot == slot ) { r->connections.remove( it ); break; @@ -478,7 +478,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr } if ( ::tqqt_cast(o) ) { TQString rec = receiver->name(); - if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); } @@ -544,9 +544,9 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && + if ( conn.sender ==sender && conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.receiver ==receiver && conn.slot == slot ) return TRUE; } @@ -581,8 +581,8 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ TQValueList::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==sender && - TQT_BASE_OBJECT((*conn).receiver) ==receiver ) + if ( (*conn).sender ==sender && + (*conn).receiver ==receiver ) ret << *conn; } @@ -603,8 +603,8 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ TQValueList::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==object || - TQT_BASE_OBJECT((*conn).receiver) ==object ) + if ( (*conn).sender ==object || + (*conn).receiver ==object ) ret << *conn; } return ret; diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index d2a66750..a791cda9 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -714,7 +714,7 @@ void PopupMenuEditor::setFocusAt( const TQPoint & pos ) bool PopupMenuEditor::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 ) { leaveEditMode( 0 ); update(); } diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index d4826c7e..ee3afe75 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -3279,7 +3279,7 @@ void PropertyList::setupProperties() #ifndef TQT_NO_SQL if ( !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && parent_is_data_aware( ::tqqt_cast(editor->widget()) ) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); + item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) item->setChanged( TRUE, FALSE ); @@ -3376,7 +3376,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, case TQVariant::CString: item = new PropertyTextItem( this, item, 0, name, name == "name" && - TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), + editor->widget() == editor->formWindow()->mainContainer(), FALSE, TRUE ); break; case TQVariant::Bool: @@ -3542,10 +3542,10 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) else if ( e->type() == TQEvent::MouseButtonPress ) theLastEvent = MouseEvent; - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { + if ( o != this &&e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && + ( o != this || o != viewport() ) && !( ke->state() & ControlButton ) ) { TQApplication::sendEvent( this, (TQKeyEvent*)e ); return TRUE; @@ -3567,7 +3567,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) } } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast(o) && editor->formWindow() ) { TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { + } else if ( o == viewport() ) { TQMouseEvent *me; PropertyListItem* i; switch ( e->type() ) { @@ -3617,7 +3617,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) default: break; } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { + } else if ( o == header() ) { if ( e->type() == TQEvent::ContextMenu ) { ((TQContextMenuEvent *)e)->accept(); TQPopupMenu menu( 0 ); diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp index ed0c986e..4c773351 100644 --- a/kdevdesigner/designer/qcompletionedit.cpp +++ b/kdevdesigner/designer/qcompletionedit.cpp @@ -116,7 +116,7 @@ void QCompletionEdit::updateListBox() bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) { + if ( o == popup || o == listbox || o == listbox->viewport() ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) { @@ -159,7 +159,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) emit chosen( text() ); return TRUE; } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { + } else if ( o == this ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Up || diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index db41b131..8f74f39a 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -881,7 +881,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), includes ); } - if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) + if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) ) return; // we don't know anything about this thing TQString attributes; @@ -1454,7 +1454,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) changed << "resizeMode"; } - if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + if ( w == formwindow->mainContainer() ) { if ( changed.findIndex( "geometry" ) == -1 ) changed << "geometry"; if ( changed.findIndex( "caption" ) == -1 ) @@ -1464,7 +1464,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) if ( changed.isEmpty() ) return; - bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && + bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast(w) ); @@ -2282,11 +2282,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD } if ( prop == "geometry" ) { - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + if ( obj == toplevel ) { hadGeometry = TRUE; toplevel->resize( v.toRect().size() ); return; - } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + } else if ( obj == formwindow->mainContainer() ) { hadGeometry = TRUE; formwindow->resize( v.toRect().size() ); return; @@ -2312,7 +2312,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); obj->setName( s ); return; - } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + } else if ( formwindow && obj == formwindow->mainContainer() ) { formwindow->setName( v.toCString() ); } } @@ -2573,9 +2573,9 @@ void Resource::loadConnections( const TQDomElement &e ) n2 = n2.nextSibling().toElement(); } if ( formwindow ) { - if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) ) + if ( conn.sender == formwindow ) conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); - if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) ) + if ( conn.receiver == formwindow ) conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); } if ( conn.sender && conn.receiver ) { diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 65fa6778..2ac16034 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -170,7 +170,7 @@ int QDesignerTabWidget::count() const bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) { - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE; + if ( o != tabBar() ) return FALSE; switch ( e->type() ) { case TQEvent::MouseButtonPress: { diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp index b806cc6c..27fb6e57 100644 --- a/kdevdesigner/designer/workspace.cpp +++ b/kdevdesigner/designer/workspace.cpp @@ -648,7 +648,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) bool Workspace::eventFilter( TQObject *o, TQEvent * e ) { // Reggie, on what type of events do we have to execute updateBufferEdit() - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) + if ( o == bufferEdit && e->type() != TQEvent::ChildRemoved ) updateBufferEdit(); return TQListView::eventFilter( o, e ); } diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index 55aaa31d..4c49b34c 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -1811,7 +1811,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE ); if ( offset != -1 ) { - if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + if ( prop == "geometry" && obj == toplevel ) { toplevel->resize( value.toRect().size() ); } else if ( prop == "accel" ) { obj->setProperty( prop.ascii(), TQVariant(value.toKeySequence()) ); @@ -2148,7 +2148,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); // if this is a connection to a custom slot and we have a connector, try this as receiver - if ( slotList.find( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) { + if ( slotList.find( conn.slot ) == -1 && (receiver == toplevel) && connector ) { slotList = connector->metaObject()->slotNames( TRUE ); receiver = connector; } -- cgit v1.2.1