From 03c3d2268077e447b3a6315871c513ec91664361 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 30 Nov 2023 21:30:36 +0900 Subject: Replace 'Event' #define strings Signed-off-by: Michele Calgaro (cherry picked from commit 6022ab632c2ecf160a9f6f1fbb532506aeca3633) --- kasteroids/toplevel.cpp | 2 +- kbattleship/kbattleship/kbattleshipview.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kasteroids/toplevel.cpp b/kasteroids/toplevel.cpp index 64a0c79d..2bb96a92 100644 --- a/kasteroids/toplevel.cpp +++ b/kasteroids/toplevel.cpp @@ -336,7 +336,7 @@ return; // remove this and the above when the sound below is working correctly bool KAstTopLevel::eventFilter( TQObject* /* object */, TQEvent *event ) { - TQKeyEvent *e = TQT_TQKEYEVENT(event); + TQKeyEvent *e = static_cast(event); if (event->type() == TQEvent::AccelOverride) { if (processKeyPress(e)) return true; diff --git a/kbattleship/kbattleship/kbattleshipview.cpp b/kbattleship/kbattleship/kbattleshipview.cpp index 9d77653b..4008803e 100644 --- a/kbattleship/kbattleship/kbattleshipview.cpp +++ b/kbattleship/kbattleship/kbattleshipview.cpp @@ -152,7 +152,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) { if(event->type() == TQEvent::KeyPress && m_decide) { - TQKeyEvent *keyEvent = TQT_TQKEYEVENT(event); + TQKeyEvent *keyEvent = static_cast(event); if(keyEvent->key() == Key_Shift){ emit sigMouseOverField(m_lastX, m_lastY); emit changeShipPlacementDirection(); @@ -160,7 +160,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) } else if(event->type() == TQEvent::KeyRelease && m_decide) { - TQKeyEvent *keyEvent = TQT_TQKEYEVENT(event); + TQKeyEvent *keyEvent = static_cast(event); if(keyEvent->key() == Key_Shift){ emit sigMouseOverField(m_lastX, m_lastY); emit changeShipPlacementDirection(); @@ -170,7 +170,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) { m_decide = false; - TQMouseEvent *mouseEvent = TQT_TQMOUSEEVENT(event); + TQMouseEvent *mouseEvent = static_cast(event); if(mouseEvent->button() == TQt::RightButton){ emit sigMouseOverField(m_lastX, m_lastY); @@ -237,7 +237,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) setFocus(); m_decide = true; - TQMouseEvent *mouseEvent = TQT_TQMOUSEEVENT(event); + TQMouseEvent *mouseEvent = static_cast(event); TQPoint point(mouseEvent->x(), mouseEvent->y()); TQRect ownRect = m_battlefield->ownRect(); -- cgit v1.2.1