Drop TQT_BASE_OBJECT* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit ca120c61e6)
bug/94/open-html
Michele Calgaro 1 year ago
parent fab4aa3bdd
commit 829b015f6e
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -201,7 +201,7 @@ void SpinBox::updateDisplay()
*/ */
bool SpinBox::eventFilter(TQObject* obj, TQEvent* e) bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
{ {
if (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(editor())) if (obj == editor())
{ {
int step = 0; int step = 0;
bool shift = false; bool shift = false;

@ -112,7 +112,7 @@ HeaderListQuickSearch::~HeaderListQuickSearch()
bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event ) bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event )
{ {
if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(mStatusCombo) ) { if ( watched == mStatusCombo ) {
KMMainWidget *mainWidget = 0; KMMainWidget *mainWidget = 0;
// Travel up the parents list until we find the main widget // Travel up the parents list until we find the main widget

@ -412,7 +412,7 @@ void KMEdit::spellerReady( KSpell *spell )
bool KMEdit::eventFilter(TQObject*o, TQEvent* e) bool KMEdit::eventFilter(TQObject*o, TQEvent* e)
{ {
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) if (o == this)
KCursor::autoHideEventFilter(o, e); KCursor::autoHideEventFilter(o, e);
if (e->type() == TQEvent::KeyPress) if (e->type() == TQEvent::KeyPress)

@ -2011,7 +2011,7 @@ KNComposer::Editor::~Editor()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e) bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
{ {
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) if (o == this)
KCursor::autoHideEventFilter(o, e); KCursor::autoHideEventFilter(o, e);
if (e->type() == TQEvent::KeyPress) if (e->type() == TQEvent::KeyPress)

@ -177,17 +177,17 @@ void KNGroupDialog::setButtonDirection(arrowButton b, arrowDirection d)
void KNGroupDialog::slotItemSelected(TQListViewItem *it) void KNGroupDialog::slotItemSelected(TQListViewItem *it)
{ {
const TQObject *s=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())); const TQObject *s=sender();
if(TQT_BASE_OBJECT_CONST(s)==TQT_BASE_OBJECT(subView)) { if(s==subView) {
unsubView->clearSelection(); unsubView->clearSelection();
groupView->clearSelection(); groupView->clearSelection();
arrowBtn2->setEnabled(false); arrowBtn2->setEnabled(false);
arrowBtn1->setEnabled(true); arrowBtn1->setEnabled(true);
setButtonDirection(btn1, left); setButtonDirection(btn1, left);
} }
else if(TQT_BASE_OBJECT_CONST(s)==TQT_BASE_OBJECT(unsubView)) { else if(s==unsubView) {
subView->clearSelection(); subView->clearSelection();
groupView->clearSelection(); groupView->clearSelection();
arrowBtn1->setEnabled(false); arrowBtn1->setEnabled(false);

@ -114,9 +114,9 @@ TQString KNGroupSelectDialog::selectedGroups()const
void KNGroupSelectDialog::slotItemSelected(TQListViewItem *it) void KNGroupSelectDialog::slotItemSelected(TQListViewItem *it)
{ {
const TQObject *s=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())); const TQObject *s=sender();
if(TQT_BASE_OBJECT_CONST(s)==TQT_BASE_OBJECT(groupView)) { if(s==groupView) {
selView->clearSelection(); selView->clearSelection();
arrowBtn2->setEnabled(false); arrowBtn2->setEnabled(false);
if(it) if(it)

@ -1339,7 +1339,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev )
return true; return true;
} }
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_label) ) if ( o == m_label )
{ {
TQMouseEvent *e = (TQMouseEvent *)ev; TQMouseEvent *e = (TQMouseEvent *)ev;
@ -1379,7 +1379,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev )
return false; return false;
} }
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editor) ) { if ( o == m_editor ) {
if ( ev->type() == TQEvent::FocusOut ) { if ( ev->type() == TQEvent::FocusOut ) {
TQFocusEvent *fe = TQT_TQFOCUSEVENT(ev); TQFocusEvent *fe = TQT_TQFOCUSEVENT(ev);
if ( fe->reason() != TQFocusEvent::Popup && if ( fe->reason() != TQFocusEvent::Popup &&
@ -1398,7 +1398,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev )
return false; return false;
} }
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editor->viewport()) ) if ( o == m_editor->viewport() )
{ {
if ( m_edit_menu && if ( m_edit_menu &&
ev->type() == TQEvent::MouseButtonPress && ev->type() == TQEvent::MouseButtonPress &&

@ -509,7 +509,7 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e )
void KNotesApp::slotShowNote() void KNotesApp::slotShowNote()
{ {
// tell the WM to give this note focus // tell the WM to give this note focus
showNote( TQString::fromUtf8( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ) ); showNote( TQString::fromUtf8( sender()->name() ) );
} }
void KNotesApp::slotWalkThroughNotes() void KNotesApp::slotWalkThroughNotes()

@ -288,7 +288,7 @@ bool KDateNavigator::eventFilter( TQObject *o, TQEvent *e )
if ( e->type() == TQEvent::MouseButtonPress ) { if ( e->type() == TQEvent::MouseButtonPress ) {
int i; int i;
for( i = 0; i < 6; ++i ) { for( i = 0; i < 6; ++i ) {
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mWeeknos[ i ]) ) { if ( o == mWeeknos[ i ] ) {
TQDate weekstart = mDayMatrix->getDate( i * 7 ); TQDate weekstart = mDayMatrix->getDate( i * 7 );
emit weekClicked( weekstart ); emit weekClicked( weekstart );
break; break;

@ -396,7 +396,7 @@ bool KOAgenda::eventFilter ( TQObject *object, TQEvent *event )
case ( TQEvent::Leave ): case ( TQEvent::Leave ):
if ( !mActionItem ) if ( !mActionItem )
setCursor( arrowCursor ); setCursor( arrowCursor );
if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(viewport()) ) if ( object == viewport() )
emit leaveAgenda(); emit leaveAgenda();
return true; return true;
@ -422,7 +422,7 @@ bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de )
{ {
#ifndef KORG_NODND #ifndef KORG_NODND
TQPoint viewportPos; TQPoint viewportPos;
if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) && TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(this) ) { if ( object != viewport() && object != this ) {
viewportPos = TQT_TQWIDGET( object )->mapToParent( de->pos() ); viewportPos = TQT_TQWIDGET( object )->mapToParent( de->pos() );
} else { } else {
viewportPos = de->pos(); viewportPos = de->pos();
@ -462,7 +462,7 @@ bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de )
// FIXME: This is a bad hack, as the viewportToContents seems to be off by // FIXME: This is a bad hack, as the viewportToContents seems to be off by
// 2000 (which is the left upper corner of the viewport). It works correctly // 2000 (which is the left upper corner of the viewport). It works correctly
// for agendaItems. // for agendaItems.
if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(this) ) { if ( object == this ) {
pos = viewportPos + TQPoint( contentsX(), contentsY() ); pos = viewportPos + TQPoint( contentsX(), contentsY() );
} else { } else {
pos = viewportToContents( viewportPos ); pos = viewportToContents( viewportPos );
@ -565,7 +565,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
TQPoint viewportPos; TQPoint viewportPos;
bool accepted=false; bool accepted=false;
if ( ( e->state() & ShiftButton) == ShiftButton ) { if ( ( e->state() & ShiftButton) == ShiftButton ) {
if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) ) { if ( object != viewport() ) {
viewportPos = ( (TQWidget *) object )->mapToParent( e->pos() ); viewportPos = ( (TQWidget *) object )->mapToParent( e->pos() );
} else { } else {
viewportPos = e->pos(); viewportPos = e->pos();
@ -579,7 +579,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
} }
if ( ( e->state() & ControlButton ) == ControlButton ){ if ( ( e->state() & ControlButton ) == ControlButton ){
if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) ) { if ( object != viewport() ) {
viewportPos = ( (TQWidget *)object )->mapToParent( e->pos() ); viewportPos = ( (TQWidget *)object )->mapToParent( e->pos() );
} else { } else {
viewportPos = e->pos(); viewportPos = e->pos();
@ -597,7 +597,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
{ {
TQPoint viewportPos; TQPoint viewportPos;
if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) { if (object != viewport()) {
viewportPos = ((TQWidget *)object)->mapToParent(me->pos()); viewportPos = ((TQWidget *)object)->mapToParent(me->pos());
} else { } else {
viewportPos = me->pos(); viewportPos = me->pos();
@ -606,7 +606,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
switch (me->type()) { switch (me->type()) {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
// kdDebug(5850) << "koagenda: filtered button press" << endl; // kdDebug(5850) << "koagenda: filtered button press" << endl;
if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) { if (object != viewport()) {
if (me->button() == Qt::RightButton) { if (me->button() == Qt::RightButton) {
mClickedItem = dynamic_cast<KOAgendaItem *>(object); mClickedItem = dynamic_cast<KOAgendaItem *>(object);
if (mClickedItem) { if (mClickedItem) {
@ -683,7 +683,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
// avoid an offset of a few pixels. Don't ask me why... // avoid an offset of a few pixels. Don't ask me why...
TQPoint indicatorPos = gridToContents(contentsToGrid( TQPoint indicatorPos = gridToContents(contentsToGrid(
viewportToContents( viewportPos ))); viewportToContents( viewportPos )));
if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) { if (object != viewport()) {
KOAgendaItem *moveItem = dynamic_cast<KOAgendaItem *>(object); KOAgendaItem *moveItem = dynamic_cast<KOAgendaItem *>(object);
if (moveItem && !moveItem->incidence()->isReadOnly() ) { if (moveItem && !moveItem->incidence()->isReadOnly() ) {
if (!mActionItem) if (!mActionItem)
@ -722,7 +722,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
break; } break; }
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(viewport())) { if (object == viewport()) {
selectItem(0); selectItem(0);
TQPair<ResourceCalendar *, TQString>p = mCalendarView->viewSubResourceCalendar(); TQPair<ResourceCalendar *, TQString>p = mCalendarView->viewSubResourceCalendar();
emit newEventSignal( p.first, p.second ); emit newEventSignal( p.first, p.second );

@ -537,7 +537,7 @@ void KOAttendeeEditor::declineForMe()
bool KOAttendeeEditor::eventFilter(TQObject *watched, TQEvent *ev) bool KOAttendeeEditor::eventFilter(TQObject *watched, TQEvent *ev)
{ {
if ( watched && TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(mNameEdit) && ev->type() == TQEvent::FocusIn && if ( watched && watched == mNameEdit && ev->type() == TQEvent::FocusIn &&
currentAttendee() == 0 ) { currentAttendee() == 0 ) {
addNewAttendee(); addNewAttendee();
} }

@ -983,7 +983,7 @@ void KOEditorFreeBusy::slotOrganizerChanged(const TQString & newOrganizer)
bool KOEditorFreeBusy::eventFilter( TQObject *watched, TQEvent *event ) bool KOEditorFreeBusy::eventFilter( TQObject *watched, TQEvent *event )
{ {
if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(mGanttView->timeHeaderWidget()) && if ( watched == mGanttView->timeHeaderWidget() &&
event->type() >= TQEvent::MouseButtonPress && event->type() <= TQEvent::MouseMove ) { event->type() >= TQEvent::MouseButtonPress && event->type() <= TQEvent::MouseMove ) {
return true; return true;
} else { } else {

@ -464,12 +464,12 @@ bool MultiAgendaView::eventFilter(TQObject * obj, TQEvent * event)
if ( (event->type() == TQEvent::MouseMove && TDEGlobalSettings::opaqueResize()) if ( (event->type() == TQEvent::MouseMove && TDEGlobalSettings::opaqueResize())
|| event->type() == TQEvent::MouseButtonRelease ) { || event->type() == TQEvent::MouseButtonRelease ) {
FOREACH_VIEW( agenda ) { FOREACH_VIEW( agenda ) {
if ( TQT_BASE_OBJECT(agenda->splitter()) == TQT_BASE_OBJECT(obj->parent()) ) if ( agenda->splitter() == obj->parent() )
mLastMovedSplitter = agenda->splitter(); mLastMovedSplitter = agenda->splitter();
} }
if ( TQT_BASE_OBJECT(mLeftSplitter )== TQT_BASE_OBJECT(obj->parent()) ) if ( mLeftSplitter == obj->parent() )
mLastMovedSplitter = mLeftSplitter; mLastMovedSplitter = mLeftSplitter;
else if ( TQT_BASE_OBJECT(mRightSplitter) == TQT_BASE_OBJECT(obj->parent()) ) else if ( mRightSplitter == obj->parent() )
mLastMovedSplitter = mRightSplitter; mLastMovedSplitter = mRightSplitter;
TQTimer::singleShot( 0, this, TQT_SLOT(resizeSplitters()) ); TQTimer::singleShot( 0, this, TQT_SLOT(resizeSplitters()) );
} }

@ -205,14 +205,14 @@ void KornAccountCfgImpl::slotProtocolChanged( const TQString& proto )
grid->setMargin( 15 ); grid->setMargin( 15 );
for( input = _accountinput->first(); input; input = _accountinput->next() ) for( input = _accountinput->first(); input; input = _accountinput->next() )
{ {
if( input->leftWidget() && TQT_BASE_OBJECT(_groupBoxes->at( groupCounter )) == TQT_BASE_OBJECT(input->leftWidget()->parent()) ) if( input->leftWidget() && _groupBoxes->at( groupCounter ) == input->leftWidget()->parent() )
{ {
grid->addWidget( input->leftWidget(), counter, 0 ); grid->addWidget( input->leftWidget(), counter, 0 );
if( input->rightWidget() && TQT_BASE_OBJECT(_groupBoxes->at( groupCounter )) == TQT_BASE_OBJECT(input->rightWidget()->parent()) ) if( input->rightWidget() && _groupBoxes->at( groupCounter ) == input->rightWidget()->parent() )
grid->addWidget( input->rightWidget(), counter, 1 ); grid->addWidget( input->rightWidget(), counter, 1 );
++counter; ++counter;
} else { } else {
if( input->rightWidget() && TQT_BASE_OBJECT(_groupBoxes->at( groupCounter )) == TQT_BASE_OBJECT(input->rightWidget()->parent()) ) if( input->rightWidget() && _groupBoxes->at( groupCounter ) == input->rightWidget()->parent() )
{ {
grid->addWidget( input->rightWidget(), counter, 1 ); grid->addWidget( input->rightWidget(), counter, 1 );
++counter; ++counter;

@ -1037,7 +1037,7 @@ int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int we
bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e) bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
{ {
if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(completionBox()) ) { if ( obj == completionBox() ) {
if ( e->type() == TQEvent::MouseButtonPress || if ( e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseMove ||
e->type() == TQEvent::MouseButtonRelease || e->type() == TQEvent::MouseButtonRelease ||
@ -1070,7 +1070,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
} }
} }
} }
if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) && if ( ( obj == this ) &&
( e->type() == TQEvent::AccelOverride ) ) { ( e->type() == TQEvent::AccelOverride ) ) {
TQKeyEvent *ke = TQT_TQKEYEVENT( e ); TQKeyEvent *ke = TQT_TQKEYEVENT( e );
if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) { if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) {
@ -1078,7 +1078,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
return true; return true;
} }
} }
if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) && if ( ( obj == this ) &&
( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease ) && ( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease ) &&
completionBox()->isVisible() ) { completionBox()->isVisible() ) {
TQKeyEvent *ke = TQT_TQKEYEVENT( e ); TQKeyEvent *ke = TQT_TQKEYEVENT( e );

@ -246,7 +246,7 @@ TQDate KDateEdit::parseDate( bool *replaced ) const
bool KDateEdit::eventFilter( TQObject *object, TQEvent *event ) bool KDateEdit::eventFilter( TQObject *object, TQEvent *event )
{ {
if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(lineEdit()) ) { if ( object == lineEdit() ) {
// We only process the focus out event if the text has changed // We only process the focus out event if the text has changed
// since we got focus // since we got focus
if ( (event->type() == TQEvent::FocusOut) && mTextChanged ) { if ( (event->type() == TQEvent::FocusOut) && mTextChanged ) {

@ -249,7 +249,7 @@ void KIncidenceChooser::showIncidence1()
void KIncidenceChooser::detailsDialogClosed() void KIncidenceChooser::detailsDialogClosed()
{ {
KDialogBase* dialog = static_cast<KDialogBase *>( TQT_TQWIDGET( const_cast<TQT_BASE_OBJECT_NAME*>(sender()) ) ); KDialogBase* dialog = static_cast<KDialogBase *>(TQT_TQWIDGET(const_cast<TQObject*>(sender()))) ;
if ( dialog == mTbL ) if ( dialog == mTbL )
mShowDetails1->setText( i18n( "Show details..." ) ); mShowDetails1->setText( i18n( "Show details..." ) );
else else

@ -76,7 +76,7 @@ void OverlayWidget::setAlignWidget( TQWidget * w )
bool OverlayWidget::eventFilter( TQObject* o, TQEvent* e) bool OverlayWidget::eventFilter( TQObject* o, TQEvent* e)
{ {
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mAlignWidget) && if ( o == mAlignWidget &&
( e->type() == TQEvent::Move || e->type() == TQEvent::Resize ) ) { ( e->type() == TQEvent::Move || e->type() == TQEvent::Resize ) ) {
reposition(); reposition();
} }

Loading…
Cancel
Save