diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-12 18:48:37 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-18 16:42:35 +0900 |
commit | 0813a2c41340ea35119ba3225c8c9b710d9ced07 (patch) | |
tree | be99c4c1f95e9a19ddc3d28f7484b4b866e2fce7 | |
parent | 03e67cae445e4207ff23b64c813fbc62d24ff364 (diff) | |
download | tdevelop-0813a2c41340ea35119ba3225c8c9b710d9ced07.tar.gz tdevelop-0813a2c41340ea35119ba3225c8c9b710d9ced07.zip |
Drop TQT_BASE_OBJECT* defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
33 files changed, 94 insertions, 94 deletions
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<TQWidget> 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<TQMainWindow*>(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<Spacer*>(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<SourceEditor> 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<TQT_BASE_OBJECT_NAME*>(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<FormWindow*>(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqqt_cast<FormWindow*>(o) && receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; TQString sen = sender->name(); - if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqqt_cast<FormWindow*>(o) && sender ==( (FormWindow*)o )->mainContainer() ) sen = "this"; FormFile *ff = 0; if ( ::tqqt_cast<FormFile*>(o) ) @@ -468,9 +468,9 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr return; for ( TQValueList<Connection>::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<FormWindow*>(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<Connection>::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::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<Connection>::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::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<Connection>::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<TQDataTable*>(editor->widget()) && !::tqqt_cast<TQDataBrowser*>(editor->widget()) && !::tqqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqqt_cast<TQWidget*>(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<TQLineEdit*>(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<Spacer*>(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; } diff --git a/languages/cpp/debugger/gdbcommand.h b/languages/cpp/debugger/gdbcommand.h index 7000235a..946bc3aa 100644 --- a/languages/cpp/debugger/gdbcommand.h +++ b/languages/cpp/debugger/gdbcommand.h @@ -91,8 +91,8 @@ public: private: TQString command_; - TQGuardedPtr<TQT_BASE_OBJECT_NAME> handler_this; - typedef void (TQT_BASE_OBJECT_NAME::* handler_t)(const GDBMI::ResultRecord&); + TQGuardedPtr<TQObject> handler_this; + typedef void (TQObject::* handler_t)(const GDBMI::ResultRecord&); handler_t handler_method; TQValueVector<TQString> lines; bool run; @@ -153,8 +153,8 @@ public: // GDBCommand overrides bool invokeHandler(const GDBMI::ResultRecord& r); private: - TQGuardedPtr<TQT_BASE_OBJECT_NAME> cli_handler_this; - typedef void (TQT_BASE_OBJECT_NAME::* cli_handler_t)(const TQValueVector<TQString>&); + TQGuardedPtr<TQObject> cli_handler_this; + typedef void (TQObject::* cli_handler_t)(const TQValueVector<TQString>&); cli_handler_t cli_handler_method; }; @@ -165,7 +165,7 @@ private: class SentinelCommand : public GDBCommand { public: - typedef void (TQT_BASE_OBJECT_NAME::*handler_method_t)(); + typedef void (TQObject::*handler_method_t)(); template<class Handler> SentinelCommand(Handler* handler_this, @@ -186,7 +186,7 @@ public: } private: - TQGuardedPtr<TQT_BASE_OBJECT_NAME> handler_this; + TQGuardedPtr<TQObject> handler_this; handler_method_t handler_method; }; @@ -207,7 +207,7 @@ private: class ExpressionValueCommand : public TQObject, public GDBCommand { public: - typedef void (TQT_BASE_OBJECT_NAME::*handler_method_t)(const TQString&); + typedef void (TQObject::*handler_method_t)(const TQString&); template<class Handler> ExpressionValueCommand( @@ -226,7 +226,7 @@ public: } private: - TQGuardedPtr<TQT_BASE_OBJECT_NAME> handler_this; + TQGuardedPtr<TQObject> handler_this; handler_method_t handler_method; }; diff --git a/languages/cpp/debugger/memviewdlg.cpp b/languages/cpp/debugger/memviewdlg.cpp index 616b374f..42ad9d4c 100644 --- a/languages/cpp/debugger/memviewdlg.cpp +++ b/languages/cpp/debugger/memviewdlg.cpp @@ -466,7 +466,7 @@ namespace GDBDebugger TQValueVector<MemoryView*>::iterator i, e; for(i = memoryViews_.begin(), e = memoryViews_.end(); i != e; ++i) { - if (TQT_BASE_OBJECT(*i) == TQT_BASE_OBJECT(child)) + if (*i == child) { memoryViews_.erase(i); break; diff --git a/lib/util/configwidgetproxy.cpp b/lib/util/configwidgetproxy.cpp index 0047a3db..6c6b17da 100644 --- a/lib/util/configwidgetproxy.cpp +++ b/lib/util/configwidgetproxy.cpp @@ -95,7 +95,7 @@ void ConfigWidgetProxy::slotAboutToShowPage( TQWidget * page ) PageMap::Iterator it = _pageMap.find( page ); if ( it != _pageMap.end() ) { - emit insertConfigWidget( static_cast<KDialogBase*>(TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))), page, it.data() ); + emit insertConfigWidget( static_cast<KDialogBase*>(const_cast<TQObject*>(sender())), page, it.data() ); _pageMap.remove( it ); } } diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp index 452b9637..5effbf42 100644 --- a/lib/widgets/propeditor/ppixmapedit.cpp +++ b/lib/widgets/propeditor/ppixmapedit.cpp @@ -112,7 +112,7 @@ void PPixmapEdit::resizeEvent(TQResizeEvent *ev) bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev) { - if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_edit)) + if(o == m_edit) { if(ev->type() == TQEvent::MouseButtonPress) { diff --git a/lib/widgets/qcomboview.cpp b/lib/widgets/qcomboview.cpp index 9e84f1d4..ec132d80 100644 --- a/lib/widgets/qcomboview.cpp +++ b/lib/widgets/qcomboview.cpp @@ -850,7 +850,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) { if ( !event ) return TRUE; - else if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(d->ed) ) { + else if ( object == d->ed ) { if ( event->type() == TQEvent::KeyPress ) { bool isAccepted = ( (TQKeyEvent*)event )->isAccepted(); keyPressEvent( (TQKeyEvent *)event ); @@ -887,8 +887,8 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) } } } - } else if ( ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(d->listView()) || - TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(d->listView()->viewport()) )) { + } else if ( ( object == d->listView() || + object == d->listView()->viewport() )) { TQMouseEvent *e = (TQMouseEvent*)event; switch( event->type() ) { case TQEvent::MouseMove: @@ -1430,7 +1430,7 @@ void QComboView::setLineEdit( TQLineEdit *edit ) d->ed = edit; - if ( TQT_BASE_OBJECT(edit->parent()) != TQT_BASE_OBJECT(this) ) { + if ( edit->parent() != this ) { edit->reparent( this, TQPoint(0,0), FALSE ); edit->setFont( font() ); } diff --git a/parts/bookmarks/bookmarks_part.cpp b/parts/bookmarks/bookmarks_part.cpp index 04fee8d7..409dfacc 100644 --- a/parts/bookmarks/bookmarks_part.cpp +++ b/parts/bookmarks/bookmarks_part.cpp @@ -124,7 +124,7 @@ void BookmarksPart::reload() { //kdDebug(0) << "BookmarksPart::reload()" << endl; - TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )); + TQObject * senderobj = const_cast<TQObject*>(sender()); if ( KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart *>( senderobj ) ) { if ( partIsSane( ro_part ) ) @@ -140,7 +140,7 @@ void BookmarksPart::marksEvent() if ( ! _settingMarks ) { - TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )); + TQObject * senderobj = const_cast<TQObject*>(sender()); KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart *>( senderobj ); if ( partIsSane( ro_part ) && !_dirtyParts.contains( ro_part ) ) diff --git a/parts/documentation/indexview.cpp b/parts/documentation/indexview.cpp index 3e0a3921..1b2e67ba 100644 --- a/parts/documentation/indexview.cpp +++ b/parts/documentation/indexview.cpp @@ -123,7 +123,7 @@ bool IndexView::eventFilter(TQObject *watched, TQEvent *e) if (!watched || !e) return true; - if ((TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_edit)) && (e->type() == TQEvent::KeyPress)) + if ((watched == m_edit) && (e->type() == TQEvent::KeyPress)) { TQKeyEvent *ke = (TQKeyEvent*)e; if (ke->key() == Key_Up) diff --git a/parts/fileselector/fileselector_widget.cpp b/parts/fileselector/fileselector_widget.cpp index 894bf185..e9b277f2 100644 --- a/parts/fileselector/fileselector_widget.cpp +++ b/parts/fileselector/fileselector_widget.cpp @@ -519,7 +519,7 @@ bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) And the popup is rather useless, if the paths are only partly visible. */ TQListBox *lb = cmbPath->listBox(); - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lb) && e->type() == TQEvent::Show ) + if ( o == lb && e->type() == TQEvent::Show ) { int add = lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0; diff --git a/parts/openwith/openwithpart.cpp b/parts/openwith/openwithpart.cpp index 63fcc6d9..665f725c 100644 --- a/parts/openwith/openwithpart.cpp +++ b/parts/openwith/openwithpart.cpp @@ -92,7 +92,7 @@ void OpenWithPart::fillContextMenu(TQPopupMenu *popup, const Context *context) void OpenWithPart::openWithService() { - KService::Ptr ptr = KService::serviceByDesktopPath(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); + KService::Ptr ptr = KService::serviceByDesktopPath(sender()->name()); if (ptr) { KRun::run(*ptr, m_urls); diff --git a/parts/quickopen/quickopendialog.cpp b/parts/quickopen/quickopendialog.cpp index dc90a20c..5929dfa1 100644 --- a/parts/quickopen/quickopendialog.cpp +++ b/parts/quickopen/quickopendialog.cpp @@ -74,7 +74,7 @@ bool QuickOpenDialog::eventFilter( TQObject * watched, TQEvent * e ) if (!watched || !e) return true; - if ((TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(nameEdit)) && (e->type() == TQEvent::KeyPress)) + if ((watched == nameEdit) && (e->type() == TQEvent::KeyPress)) { TQKeyEvent *ke = (TQKeyEvent*)e; if (ke->key() == Key_Up) diff --git a/parts/tools/tools_part.cpp b/parts/tools/tools_part.cpp index 61f962ad..5487bc77 100644 --- a/parts/tools/tools_part.cpp +++ b/parts/tools/tools_part.cpp @@ -113,7 +113,7 @@ void ToolsPart::updateMenu() void ToolsPart::slotToolActivated() { - TQString df = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name(); + TQString df = sender()->name(); kapp->startServiceByDesktopPath(df); } @@ -224,7 +224,7 @@ void ToolsPart::contextMenu(TQPopupMenu *popup, const Context *context) void ToolsPart::toolsMenuActivated() { - TQString menutext = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name(); + TQString menutext = sender()->name(); TDEConfig *config = ToolsFactory::instance()->config(); config->setGroup("Tool Menu " + menutext); TQString cmdline = config->readPathEntry("CommandLine"); diff --git a/src/newui/ddockwindow.cpp b/src/newui/ddockwindow.cpp index 88f25d18..164ecae7 100644 --- a/src/newui/ddockwindow.cpp +++ b/src/newui/ddockwindow.cpp @@ -375,7 +375,7 @@ void DDockWindow::selectPrevWidget() void DDockWindow::contextMenu(TQPopupMenu * menu) { - m_lastContextMenuButton = static_cast<Ideal::Button*>( TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )) ); + m_lastContextMenuButton = static_cast<Ideal::Button*>( TQT_TQWIDGET(const_cast<TQObject*>( sender() )) ); menu->insertSeparator(); diff --git a/src/newui/dmainwindow.cpp b/src/newui/dmainwindow.cpp index d42c0d5f..55fd0a9c 100644 --- a/src/newui/dmainwindow.cpp +++ b/src/newui/dmainwindow.cpp @@ -295,7 +295,7 @@ DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view) void DMainWindow::widgetDestroyed() { - TQWidget *w = TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender())); + TQWidget *w = TQT_TQWIDGET(const_cast<TQObject*>(sender())); if (m_docks.contains(w)) { diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp index 4d375b0e..b34eb4f9 100644 --- a/src/partcontroller.cpp +++ b/src/partcontroller.cpp @@ -1515,7 +1515,7 @@ void PartController::slotNewStatus( ) { kdDebug(9000) << k_funcinfo << endl; - TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )); + TQObject * senderobj = const_cast<TQObject*>(sender()); KTextEditor::View * view = dynamic_cast<KTextEditor::View*>( senderobj ); if ( view ) { @@ -1841,7 +1841,7 @@ void PartController::gotoLastEditPos() void PartController::slotDocumentUrlChanged() { - TQObject *obj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())); + TQObject *obj = const_cast<TQObject*>(sender()); KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>( obj ); if (!doc) return; diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index c9ae3e08..c1ce8002 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -588,9 +588,9 @@ void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state void SimpleMainWindow::closeTab() { // actionCollection()->action("file_close")->activate(); - if (TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->isA("TQToolButton") && TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->parent()->isA("DTabWidget")) + if (sender()->isA("TQToolButton") && sender()->parent()->isA("DTabWidget")) { - DTabWidget *tab = (DTabWidget*)TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->parent(); + DTabWidget *tab = (DTabWidget*)sender()->parent(); if (tab && tab->currentPage()) closeTab(tab->currentPage()); } @@ -598,7 +598,7 @@ void SimpleMainWindow::closeTab() void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p) { - DTabWidget *tabWidget = static_cast<DTabWidget*>(TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))); + DTabWidget *tabWidget = static_cast<DTabWidget*>(TQT_TQWIDGET(const_cast<TQObject*>(sender()))); if (!tabWidget) return; |