diff options
author | OBATA Akio <[email protected]> | 2022-01-26 18:06:18 +0900 |
---|---|---|
committer | OBATA Akio <[email protected]> | 2022-01-27 17:07:38 +0900 |
commit | 5e8185513d4712ebbb649bbbfcd2d4ed75ffff66 (patch) | |
tree | b180201fa0e8cb0175b1ae105d74c0e300b28498 /kolourpaint/kptool.cpp | |
parent | 052f82743e6a018edaeede3b81955b2121fa6312 (diff) | |
download | tdegraphics-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.cpp | 22 |
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); } } |