summaryrefslogtreecommitdiffstats
path: root/tdecore/tdeapplication.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-09-12 21:15:32 +0900
committerMichele Calgaro <[email protected]>2023-09-12 22:25:25 +0900
commit5cb1ea082794e19d062e004023ce44fae093d5bc (patch)
tree89609f35d633fe5f71d36d0948b118bbf16a2209 /tdecore/tdeapplication.cpp
parentc7cf5fd96d2696a522b5a377c53899d8d7bd5d80 (diff)
downloadtdelibs-5cb1ea082794e19d062e004023ce44fae093d5bc.tar.gz
tdelibs-5cb1ea082794e19d062e004023ce44fae093d5bc.zip
Replace various tqtinterface's TQ_* defines with actual types
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 0f36f8966371d24decc0740ccf9f8b0cc2c57838)
Diffstat (limited to 'tdecore/tdeapplication.cpp')
-rw-r--r--tdecore/tdeapplication.cpp28
1 files changed, 14 insertions, 14 deletions
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