From f22a9c72dda24871973033123039639af6577eaa Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 30 Nov 2023 21:30:52 +0900 Subject: Replace 'Event' #define strings Signed-off-by: Michele Calgaro --- tdeui/klineedit.cpp | 4 ++-- tdeui/ksyntaxhighlighter.cpp | 2 +- tdeui/kurllabel.cpp | 8 ++++---- tdeui/tdecompletionbox.cpp | 6 +++--- tdeui/tdetoolbarbutton.cpp | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tdeui') diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index 617de7675..92cc5d0ca 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -1011,7 +1011,7 @@ bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev ) KCursor::autoHideEventFilter( TQT_TQOBJECT(this), ev ); if ( ev->type() == TQEvent::AccelOverride ) { - TQKeyEvent *e = TQT_TQKEYEVENT( ev ); + TQKeyEvent *e = static_cast( ev ); if (overrideAccel (e)) { e->accept(); @@ -1020,7 +1020,7 @@ bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev ) } else if( ev->type() == TQEvent::KeyPress ) { - TQKeyEvent *e = TQT_TQKEYEVENT( ev ); + TQKeyEvent *e = static_cast( ev ); if( e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter ) { diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 25c22222c..80529ed34 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -620,7 +620,7 @@ bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e) } if (o == textEdit() && (e->type() == TQEvent::KeyPress)) { - TQKeyEvent *k = TQT_TQKEYEVENT(e); + TQKeyEvent *k = static_cast(e); d->autoReady = true; if (d->rehighlightRequest->isActive()) // try to stay out of the users way d->rehighlightRequest->changeInterval( 500 ); diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index db6212a51..60e2faba6 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -308,7 +308,7 @@ void KURLLabel::enterEvent (TQEvent* e) TQLabel::enterEvent (e); TQRect r( activeRect() ); - if (!r.contains( TQT_TQMOUSEEVENT(e)->pos() )) + if (!r.contains( static_cast(e)->pos() )) return; if (!d->AltPixmap.isNull() && pixmap()) @@ -372,7 +372,7 @@ bool KURLLabel::event (TQEvent *e) return result; } else if (e->type() == TQEvent::KeyPress) { - TQKeyEvent* ke = TQT_TQKEYEVENT(e); + TQKeyEvent* ke = static_cast(e); if (ke->key() == TQt::Key_Enter || ke->key() == TQt::Key_Return) { setLinkColor (d->HighlightedLinkColor); d->Timer->start (300); @@ -384,12 +384,12 @@ bool KURLLabel::event (TQEvent *e) } else if (e->type() == TQEvent::MouseButtonPress) { TQRect r( activeRect() ); - d->MousePressed = r.contains(TQT_TQMOUSEEVENT(e)->pos()); + d->MousePressed = r.contains(static_cast(e)->pos()); } else if (e->type() == TQEvent::MouseMove) { if (d->Cursor) { TQRect r( activeRect() ); - bool inside = r.contains(TQT_TQMOUSEEVENT(e)->pos()); + bool inside = r.contains(static_cast(e)->pos()); if (d->WasInsideRect != inside) { if (inside) TQLabel::setCursor(*d->Cursor); diff --git a/tdeui/tdecompletionbox.cpp b/tdeui/tdecompletionbox.cpp index ca3017b44..5392e2c41 100644 --- a/tdeui/tdecompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -112,7 +112,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) if ( o == d->m_parent ) { if ( isVisible() ) { if ( type == TQEvent::KeyPress ) { - TQKeyEvent *ev = TQT_TQKEYEVENT( e ); + TQKeyEvent *ev = static_cast( e ); switch ( ev->key() ) { case Key_BackTab: if ( d->tabHandling && (ev->state() == TQt::NoButton || @@ -185,7 +185,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) else if ( type == TQEvent::AccelOverride ) { // Override any acceleartors that match // the key sequences we use here... - TQKeyEvent *ev = TQT_TQKEYEVENT( e ); + TQKeyEvent *ev = static_cast( e ); switch ( ev->key() ) { case Key_Down: case Key_Up: @@ -230,7 +230,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) // any mouse-click on something else than "this" makes us hide else if ( type == TQEvent::MouseButtonPress ) { - TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); + TQMouseEvent *ev = static_cast( e ); if ( !rect().contains( ev->pos() )) // this widget hide(); diff --git a/tdeui/tdetoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index 854ad2f9b..d957a2edf 100644 --- a/tdeui/tdetoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -419,12 +419,12 @@ bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { if (ev->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* mev = static_cast(ev); d->m_mousePressPos = mev->pos(); } else if (ev->type() == TQEvent::MouseMove) { - TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* mev = static_cast(ev); if ((mev->pos() - d->m_mousePressPos).manhattanLength() > TDEGlobalSettings::dndEventDelay()) { -- cgit v1.2.1