Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
041e9141
Commit
041e9141
authored
Jan 19, 2015
by
Matt Lowe
Browse files
Switch Statement
parent
8bc2adb7
Changes
1
Show whitespace changes
Inline
Side-by-side
cockatrice/src/chatview.cpp
View file @
041e9141
...
...
@@ -252,12 +252,19 @@ void ChatView::mousePressEvent(QMouseEvent *event)
if
(
event
->
button
()
!=
Qt
::
MidButton
)
{
const
int
delimiterIndex
=
hoveredContent
.
indexOf
(
"_"
);
const
QString
userName
=
hoveredContent
.
mid
(
delimiterIndex
+
1
);
if
(
event
->
button
()
==
Qt
::
RightButton
)
{
switch
(
event
->
button
())
{
case
Qt
::
RightButton
:{
UserLevelFlags
userLevel
(
hoveredContent
.
left
(
delimiterIndex
).
toInt
());
userContextMenu
->
showContextMenu
(
event
->
globalPos
(),
userName
,
userLevel
);
break
;
}
el
se
if
(
event
->
button
()
==
Qt
::
LeftButton
)
ca
se
Qt
::
LeftButton
:{
emit
addMentionTag
(
"@"
+
userName
);
break
;
}
default:
break
;
}
}
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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