From 0f36f8966371d24decc0740ccf9f8b0cc2c57838 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 12 Sep 2023 21:15:32 +0900 Subject: Replace various tqtinterface's TQ_* defines with actual types Signed-off-by: Michele Calgaro --- tdecore/tdeapplication.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tdecore/tdeapplication.cpp') diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp index dbed066e3..d3ff5bcb2 100644 --- a/tdecore/tdeapplication.cpp +++ b/tdecore/tdeapplication.cpp @@ -3632,7 +3632,7 @@ uint TDEApplication::mouseState() return mousestate & 0xff00; } -TQ_ButtonState TDEApplication::keyboardMouseState() +Qt::ButtonState TDEApplication::keyboardMouseState() { int ret = 0; #ifdef Q_WS_X11 @@ -3644,35 +3644,35 @@ TQ_ButtonState TDEApplication::keyboardMouseState() &root_x, &root_y, &win_x, &win_y, &state ); // transform the same way like Qt's qt_x11_translateButtonState() if( state & Button1Mask ) - ret |= TQ_LeftButton; + ret |= LeftButton; if( state & Button2Mask ) - ret |= TQ_MidButton; + ret |= MidButton; if( state & Button3Mask ) - ret |= TQ_RightButton; + ret |= RightButton; if( state & ShiftMask ) - ret |= TQ_ShiftButton; + ret |= ShiftButton; if( state & ControlMask ) - ret |= TQ_ControlButton; + ret |= ControlButton; if( state & KKeyNative::modX( KKey::ALT )) - ret |= TQ_AltButton; + ret |= AltButton; if( state & KKeyNative::modX( KKey::WIN )) - ret |= TQ_MetaButton; + ret |= MetaButton; #elif defined(Q_WS_WIN) const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON); if (GetAsyncKeyState(VK_LBUTTON)) ret |= (mousebtn_swapped ? RightButton : LeftButton); if (GetAsyncKeyState(VK_MBUTTON)) - ret |= TQ_MidButton; + ret |= MidButton; if (GetAsyncKeyState(VK_RBUTTON)) - ret |= (mousebtn_swapped ? TQ_LeftButton : TQ_RightButton); + ret |= (mousebtn_swapped ? LeftButton : RightButton); if (GetAsyncKeyState(VK_SHIFT)) - ret |= TQ_ShiftButton; + ret |= ShiftButton; if (GetAsyncKeyState(VK_CONTROL)) - ret |= TQ_ControlButton; + ret |= ControlButton; if (GetAsyncKeyState(VK_MENU)) - ret |= TQ_AltButton; + ret |= AltButton; if (GetAsyncKeyState(VK_LWIN) || GetAsyncKeyState(VK_RWIN)) - ret |= TQ_MetaButton; + ret |= MetaButton; #else //TODO: other platforms #endif -- cgit v1.2.3