summaryrefslogtreecommitdiffstats
path: root/kolourpaint/kptool.cpp
diff options
context:
space:
mode:
authorOBATA Akio <[email protected]>2022-01-26 18:06:18 +0900
committerOBATA Akio <[email protected]>2022-01-27 17:07:38 +0900
commit5e8185513d4712ebbb649bbbfcd2d4ed75ffff66 (patch)
treeb180201fa0e8cb0175b1ae105d74c0e300b28498 /kolourpaint/kptool.cpp
parent052f82743e6a018edaeede3b81955b2121fa6312 (diff)
downloadtdegraphics-5e8185513d4712ebbb649bbbfcd2d4ed75ffff66.tar.gz
tdegraphics-5e8185513d4712ebbb649bbbfcd2d4ed75ffff66.zip
Supersedes deprecated function callsfeat/supersedes-deprecated
Signed-off-by: OBATA Akio <[email protected]>
Diffstat (limited to 'kolourpaint/kptool.cpp')
-rw-r--r--kolourpaint/kptool.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp
index fea1cf58..0327f8be 100644
--- a/kolourpaint/kptool.cpp
+++ b/kolourpaint/kptool.cpp
@@ -499,14 +499,11 @@ void kpTool::beginInternal ()
m_beganDraw = false;
- uint keyState = TDEApplication::keyboardModifiers ();
+ TQt::ButtonState keyState = TDEApplication::keyboardMouseState ();
- m_shiftPressed = (keyState & TDEApplication::ShiftModifier);
- m_controlPressed = (keyState & TDEApplication::ControlModifier);
-
- // TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1?
- // Ditto for everywhere else where I set SHIFT & CTRL but not alt.
- m_altPressed = false;
+ m_shiftPressed = (keyState & TQt::ShiftButton);
+ m_controlPressed = (keyState & TQt::ControlButton);
+ m_altPressed = (keyState & TQt::AltButton);
}
}
@@ -1372,14 +1369,11 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e)
#if DEBUG_KP_TOOL && 0
kdDebug () << "\t\tmodifiers not changed - figure out the truth" << endl;
#endif
- uint keyState = TDEApplication::keyboardModifiers ();
-
- setShiftPressed (keyState & TDEApplication::ShiftModifier);
- setControlPressed (keyState & TDEApplication::ControlModifier);
+ TQt::ButtonState keyState = TDEApplication::keyboardMouseState ();
- // TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1?
- // Ditto for everywhere else where I set SHIFT & CTRL but not alt.
- setAltPressed (e->stateAfter () & TQt::AltButton);
+ setShiftPressed (keyState & TQt::ShiftButton);
+ setControlPressed (keyState & TQt::ControlButton);
+ setAltPressed ( keyState & TQt::AltButton);
}
}