From af29d4529c8da3576c3cb76949e936ac51446d6a Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Tue, 19 May 2015 11:11:20 +0200 Subject: [PATCH] Can now use more url types Can now use http:// https:// www. --- cockatrice/src/chatview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/chatview.cpp b/cockatrice/src/chatview.cpp index 692baf94..c11f2d1c 100644 --- a/cockatrice/src/chatview.cpp +++ b/cockatrice/src/chatview.cpp @@ -168,7 +168,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use // search for the first [ or @ bracketFirstIndex = message.indexOf('['); mentionFirstIndex = mentionEnabled ? message.indexOf('@') : -1; - urlFirstIndex = message.indexOf("https://"); + urlFirstIndex = message.indexOf(QRegExp("https?://|www.")); if(bracketFirstIndex == -1) { if(mentionFirstIndex == -1) { if (urlFirstIndex == -1) {