Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
3369c502
Commit
3369c502
authored
Aug 31, 2020
by
Laurent Montel
😁
Browse files
Port away from deprecated Qt::MidButton
parent
46a27c79
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/TerminalDisplay.cpp
View file @
3369c502
...
...
@@ -2373,7 +2373,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
emit
mouseSignal
(
0
,
charColumn
+
1
,
charLine
+
1
+
_scrollBar
->
value
()
-
_scrollBar
->
maximum
()
,
0
);
}
}
}
else
if
(
ev
->
button
()
==
Qt
::
MidButton
)
{
}
else
if
(
ev
->
button
()
==
Qt
::
Mid
dle
Button
)
{
processMidButtonClick
(
ev
);
}
else
if
(
ev
->
button
()
==
Qt
::
RightButton
)
{
if
(
!
_usesMouseTracking
||
((
ev
->
modifiers
()
&
Qt
::
ShiftModifier
)
!=
0u
))
{
...
...
@@ -2475,7 +2475,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
if
((
ev
->
buttons
()
&
Qt
::
LeftButton
)
!=
0u
)
{
button
=
0
;
}
if
((
ev
->
buttons
()
&
Qt
::
MidButton
)
!=
0u
)
{
if
((
ev
->
buttons
()
&
Qt
::
Mid
dle
Button
)
!=
0u
)
{
button
=
1
;
}
if
((
ev
->
buttons
()
&
Qt
::
RightButton
)
!=
0u
)
{
...
...
@@ -2514,7 +2514,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
}
// don't extend selection while pasting
if
((
ev
->
buttons
()
&
Qt
::
MidButton
)
!=
0u
)
{
if
((
ev
->
buttons
()
&
Qt
::
Mid
dle
Button
)
!=
0u
)
{
return
;
}
...
...
@@ -2724,9 +2724,9 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
}
if
(
_usesMouseTracking
&&
(
ev
->
button
()
==
Qt
::
RightButton
||
ev
->
button
()
==
Qt
::
MidButton
)
&&
(
ev
->
button
()
==
Qt
::
RightButton
||
ev
->
button
()
==
Qt
::
Mid
dle
Button
)
&&
!
(
ev
->
modifiers
()
&
Qt
::
ShiftModifier
))
{
emit
mouseSignal
(
ev
->
button
()
==
Qt
::
MidButton
?
1
:
2
,
emit
mouseSignal
(
ev
->
button
()
==
Qt
::
Mid
dle
Button
?
1
:
2
,
charColumn
+
1
,
charLine
+
1
+
_scrollBar
->
value
()
-
_scrollBar
->
maximum
()
,
2
);
...
...
@@ -2788,7 +2788,7 @@ void TerminalDisplay::processMidButtonClick(QMouseEvent* ev)
void
TerminalDisplay
::
mouseDoubleClickEvent
(
QMouseEvent
*
ev
)
{
// Yes, successive middle click can trigger this event
if
(
ev
->
button
()
==
Qt
::
MidButton
)
{
if
(
ev
->
button
()
==
Qt
::
Mid
dle
Button
)
{
processMidButtonClick
(
ev
);
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment