Drop TQT_BASE_OBJECT* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/84/head
Michele Calgaro 1 year ago
parent ddf896e8d2
commit ca120c61e6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

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

@ -112,7 +112,7 @@ HeaderListQuickSearch::~HeaderListQuickSearch()
bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event )
{
if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(mStatusCombo) ) {
if ( watched == mStatusCombo ) {
KMMainWidget *mainWidget = 0;
// 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)
{
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this))
if (o == this)
KCursor::autoHideEventFilter(o, e);
if (e->type() == TQEvent::KeyPress)

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

@ -176,17 +176,17 @@ void KNGroupDialog::setButtonDirection(arrowButton b, arrowDirection d)
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();
groupView->clearSelection();
arrowBtn2->setEnabled(false);
arrowBtn1->setEnabled(true);
setButtonDirection(btn1, left);
}
else if(TQT_BASE_OBJECT_CONST(s)==TQT_BASE_OBJECT(unsubView)) {
else if(s==unsubView) {
subView->clearSelection();
groupView->clearSelection();
arrowBtn1->setEnabled(false);

@ -114,9 +114,9 @@ TQString KNGroupSelectDialog::selectedGroups()const
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();
arrowBtn2->setEnabled(false);
if(it)

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

@ -509,7 +509,7 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e )
void KNotesApp::slotShowNote()
{
// 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()

@ -288,7 +288,7 @@ bool KDateNavigator::eventFilter( TQObject *o, TQEvent *e )
if ( e->type() == TQEvent::MouseButtonPress ) {
int 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 );
emit weekClicked( weekstart );
break;

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

@ -537,7 +537,7 @@ void KOAttendeeEditor::declineForMe()
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 ) {
addNewAttendee();
}

@ -983,7 +983,7 @@ void KOEditorFreeBusy::slotOrganizerChanged(const TQString & newOrganizer)
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 ) {
return true;
} else {

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

@ -205,14 +205,14 @@ void KornAccountCfgImpl::slotProtocolChanged( const TQString& proto )
grid->setMargin( 15 );
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 );
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 );
++counter;
} 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 );
++counter;

@ -1037,7 +1037,7 @@ int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int we
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 ||
e->type() == TQEvent::MouseMove ||
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 ) ) {
TQKeyEvent *ke = TQT_TQKEYEVENT( e );
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;
}
}
if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) &&
if ( ( obj == this ) &&
( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease ) &&
completionBox()->isVisible() ) {
TQKeyEvent *ke = TQT_TQKEYEVENT( e );

@ -246,7 +246,7 @@ TQDate KDateEdit::parseDate( bool *replaced ) const
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
// since we got focus
if ( (event->type() == TQEvent::FocusOut) && mTextChanged ) {

@ -249,7 +249,7 @@ void KIncidenceChooser::showIncidence1()
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 )
mShowDetails1->setText( i18n( "Show details..." ) );
else

@ -76,7 +76,7 @@ void OverlayWidget::setAlignWidget( TQWidget * w )
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 ) ) {
reposition();
}

Loading…
Cancel
Save