From a7ea84c97639f635d798348432f355e3ac496a1d Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 12 Aug 2023 18:44:08 +0900 Subject: Drop TQT_BASE_OBJECT* defines Signed-off-by: Michele Calgaro --- kexi/widget/kexibrowser.cpp | 8 ++++---- kexi/widget/kexisectionheader.cpp | 2 +- kexi/widget/relations/kexirelationwidget.cpp | 8 ++++---- kexi/widget/tableview/kexiblobtableedit.cpp | 2 +- kexi/widget/tableview/kexicomboboxpopup.cpp | 4 ++-- kexi/widget/tableview/kexicomboboxtableedit.cpp | 2 +- kexi/widget/tableview/kexitableedit.cpp | 2 +- kexi/widget/tableview/kexitableview.cpp | 8 ++++---- kexi/widget/utils/kexigradientwidget.cpp | 6 +++--- kexi/widget/utils/kexirecordnavigator.cpp | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'kexi/widget') diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index 3e16cddc..99deccf6 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -553,16 +553,16 @@ void KexiBrowser::installEventFilter ( const TQObject * filterObj ) { if (!filterObj) return; - m_list->installEventFilter ( const_cast(filterObj) ); - TQWidget::installEventFilter ( const_cast(filterObj) ); + m_list->installEventFilter ( filterObj ); + TQWidget::installEventFilter ( filterObj ); } bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e ) { - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_list) && e->type()==TQEvent::Resize) { + if (o==m_list && e->type()==TQEvent::Resize) { kdDebug() << "resize!" << endl; } - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_list->renameLineEdit())) { + if (o==m_list->renameLineEdit()) { if (e->type()==TQEvent::Hide) itemRenameDone(); } diff --git a/kexi/widget/kexisectionheader.cpp b/kexi/widget/kexisectionheader.cpp index f36dfe47..2a3003ab 100644 --- a/kexi/widget/kexisectionheader.cpp +++ b/kexi/widget/kexisectionheader.cpp @@ -101,7 +101,7 @@ void KexiSectionHeader::addButton(const TQString& icon, const TQString& toolTip, bool KexiSectionHeader::eventFilter( TQObject *o, TQEvent *e ) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->lbl) && e->type()==TQEvent::MouseButtonRelease) {//|| e->type()==TQEvent::FocusOut) {// && o->inherits("TQWidget")) { + if (o == d->lbl && e->type()==TQEvent::MouseButtonRelease) {//|| e->type()==TQEvent::FocusOut) {// && o->inherits("TQWidget")) { if (d->lyr->view) d->lyr->view->setFocus(); // if (KexiUtils::hasParent( this, static_cast(o))) { diff --git a/kexi/widget/relations/kexirelationwidget.cpp b/kexi/widget/relations/kexirelationwidget.cpp index b1ad05fc..94d81348 100644 --- a/kexi/widget/relations/kexirelationwidget.cpp +++ b/kexi/widget/relations/kexirelationwidget.cpp @@ -221,13 +221,13 @@ KexiRelationWidget::addTable(const TQString& t) void KexiRelationWidget::tableViewGotFocus() { -// if (m_relationView->focusedTableView == TQT_TQOBJECT(const_cast(sender()))) +// if (m_relationView->focusedTableView == sender()) // return; // kdDebug() << "GOT FOCUS!" <unsetFocus(); -// m_focusedTableView = (KexiRelationViewTableContainer*)TQT_TQOBJECT(const_cast(sender())); +// m_focusedTableView = (KexiRelationViewTableContainer*)sender(); invalidateActions(); } @@ -339,9 +339,9 @@ void KexiRelationWidget::aboutToShowPopupMenu() void KexiRelationWidget::slotTableFieldDoubleClicked(TQListViewItem *i,const TQPoint&,int) { - if (!TQT_TQOBJECT(const_cast(sender()))->isA("KexiRelationViewTable")) + if (!sender()->isA("KexiRelationViewTable")) return; - const KexiRelationViewTable* t = static_cast(TQT_TQWIDGET(const_cast(sender()))); + const KexiRelationViewTable* t = static_cast(sender()); const TQStringList selectedFieldNames( t->selectedFieldNames() ); if (selectedFieldNames.count()==1) emit tableFieldDoubleClicked( t->schema()->table(), selectedFieldNames.first() ); diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp index df2816fe..0c153c75 100644 --- a/kexi/widget/tableview/kexiblobtableedit.cpp +++ b/kexi/widget/tableview/kexiblobtableedit.cpp @@ -455,7 +455,7 @@ void KexiBlobTableEdit::handleAction(const TQString& actionName) bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e ) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->popup) && e->type()==TQEvent::KeyPress) { + if (o == d->popup && e->type()==TQEvent::KeyPress) { TQKeyEvent* ke = TQT_TQKEYEVENT(e); const int state = ke->state(); const int k = ke->key(); diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp index 9ecae92f..8a0e678a 100644 --- a/kexi/widget/tableview/kexicomboboxpopup.cpp +++ b/kexi/widget/tableview/kexicomboboxpopup.cpp @@ -343,13 +343,13 @@ void KexiComboBoxPopup::slotTVItemAccepted(KexiTableItem *item, int row, int) bool KexiComboBoxPopup::eventFilter( TQObject *o, TQEvent *e ) { - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(this) && e->type()==TQEvent::Hide) { + if (o==this && e->type()==TQEvent::Hide) { emit hidden(); } else if (e->type()==TQEvent::MouseButtonPress) { kdDebug() << "TQEvent::MousePress" << endl; } - else if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->tv)) { + else if (o==d->tv) { if (e->type()==TQEvent::KeyPress) { TQKeyEvent *ke = TQT_TQKEYEVENT(e); const int k = ke->key(); diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index 308e565e..3c08b265 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -352,7 +352,7 @@ bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e ) + TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button)); TQRect r(d->button->mapToGlobal(d->button->geometry().topLeft()), d->button->mapToGlobal(d->button->geometry().bottomRight())); - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(popup()) && popup()->isVisible() && r.contains( gp )) { + if (o==popup() && popup()->isVisible() && r.contains( gp )) { m_mouseBtnPressedWhenPopupVisible = true; } } diff --git a/kexi/widget/tableview/kexitableedit.cpp b/kexi/widget/tableview/kexitableedit.cpp index 3305fff1..943ec1e8 100644 --- a/kexi/widget/tableview/kexitableedit.cpp +++ b/kexi/widget/tableview/kexitableedit.cpp @@ -120,7 +120,7 @@ KexiTableEdit::eventFilter(TQObject* watched, TQEvent* e) } }*/ - if(TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(this)) + if(watched == this) { if(e->type() == TQEvent::KeyPress) { diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index c1405c1d..ab76fa95 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -1264,7 +1264,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) TQWidget *w = focusWidget(); // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view() && w!=m_editor)) { // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view())) { - if (!w || TQT_BASE_OBJECT(w)!=TQT_BASE_OBJECT(viewport()) && TQT_TQOBJECT(w)!=TQT_TQOBJECT(this) && (!m_editor || !KexiUtils::hasParent(TQT_TQOBJECT(dynamic_cast(m_editor)), TQT_TQOBJECT(w)))) { + if (!w || w!=viewport() && TQT_TQOBJECT(w)!=TQT_TQOBJECT(this) && (!m_editor || !KexiUtils::hasParent(TQT_TQOBJECT(dynamic_cast(m_editor)), TQT_TQOBJECT(w)))) { //don't process stranger's events e->ignore(); return; @@ -2422,7 +2422,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) ke->accept(); return true; } - else if (m_editor && (o==dynamic_cast(m_editor) || TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_editor->widget()))) { + else if (m_editor && (o==dynamic_cast(m_editor) || o==m_editor->widget())) { if ( (k==TQt::Key_Tab && (s==Qt::NoButton || s==TQt::ShiftButton)) || (overrideEditorShortcutNeeded(ke)) || (k==TQt::Key_Enter || k==TQt::Key_Return || k==TQt::Key_Up || k==TQt::Key_Down) @@ -2450,14 +2450,14 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) }*/ } } - else if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(horizontalScrollBar())) { + else if (o==horizontalScrollBar()) { if ((e->type()==TQEvent::Show && !horizontalScrollBar()->isVisible()) || (e->type()==TQEvent::Hide && horizontalScrollBar()->isVisible())) { updateWidgetContentsSize(); } } else if (e->type()==TQEvent::Leave) { - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(viewport()) && d->appearance.rowMouseOverHighlightingEnabled + if (o==viewport() && d->appearance.rowMouseOverHighlightingEnabled && d->appearance.persistentSelections) { if (d->highlightedRow!=-1) { diff --git a/kexi/widget/utils/kexigradientwidget.cpp b/kexi/widget/utils/kexigradientwidget.cpp index 92f53c60..f009bd43 100644 --- a/kexi/widget/utils/kexigradientwidget.cpp +++ b/kexi/widget/utils/kexigradientwidget.cpp @@ -179,7 +179,7 @@ void KexiGradientWidget::rebuildCache( void ) { Get the part of the tempPixmap that is under the current child-widget. */ - if ( TQT_BASE_OBJECT(childWidget->parent()) == TQT_BASE_OBJECT(this) ) { + if ( childWidget->parent() == this ) { area = childWidget->geometry(); } else { area.setTopLeft( childWidget->mapTo( this, @@ -222,7 +222,7 @@ bool KexiGradientWidget::eventFilter( TQObject* object, TQEvent* event ) { /** Manage list of child-widgets. */ - if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(this) ) { + if ( object == this ) { if ( event->type() == TQEvent::ChildInserted ) { child = dynamic_cast( dynamic_cast( event )->child() ); if ( isValidChildWidget( TQT_TQOBJECT(child) ) == false ) { @@ -329,7 +329,7 @@ void KexiGradientWidget::updateChildBackground( TQWidget* childWidget ) Get the part of the tempPixmap that is under the current child-widget. */ - if ( TQT_BASE_OBJECT(childWidget->parent()) == TQT_BASE_OBJECT(this) ) { + if ( childWidget->parent() == this ) { area = childWidget->geometry(); } else { area.setTopLeft( childWidget->mapTo( this, diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp index 6579fc42..2c4ef8cf 100644 --- a/kexi/widget/utils/kexirecordnavigator.cpp +++ b/kexi/widget/utils/kexirecordnavigator.cpp @@ -192,7 +192,7 @@ void KexiRecordNavigator::setEnabled( bool set ) bool KexiRecordNavigator::eventFilter( TQObject *o, TQEvent *e ) { - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_navRecordNumber)) { + if (o==m_navRecordNumber) { bool recordEntered = false; bool ret; if (e->type()==TQEvent::KeyPress) { -- cgit v1.2.1