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
af29d452
Commit
af29d452
authored
May 19, 2015
by
Matt Lowe
Browse files
Can now use more url types
Can now use http:// https:// www.
parent
9ce3aecd
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/chatview.cpp
View file @
af29d452
...
@@ -168,7 +168,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
...
@@ -168,7 +168,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
// search for the first [ or @
// search for the first [ or @
bracketFirstIndex
=
message
.
indexOf
(
'['
);
bracketFirstIndex
=
message
.
indexOf
(
'['
);
mentionFirstIndex
=
mentionEnabled
?
message
.
indexOf
(
'@'
)
:
-
1
;
mentionFirstIndex
=
mentionEnabled
?
message
.
indexOf
(
'@'
)
:
-
1
;
urlFirstIndex
=
message
.
indexOf
(
"https://
"
);
urlFirstIndex
=
message
.
indexOf
(
QRegExp
(
"https
?
://
|www."
)
);
if
(
bracketFirstIndex
==
-
1
)
{
if
(
bracketFirstIndex
==
-
1
)
{
if
(
mentionFirstIndex
==
-
1
)
{
if
(
mentionFirstIndex
==
-
1
)
{
if
(
urlFirstIndex
==
-
1
)
{
if
(
urlFirstIndex
==
-
1
)
{
...
...
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