X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatwidget.cpp;h=85d8cad6d65874b1201c87394dfeec739b34a82e;hb=78fe605abd76277f479cad74df2b1302cdd05db6;hp=131caa429561f625c27eccce6d4b8ad7bfb8287d;hpb=2684aa5295d12e4f7c66b3011fc8b1819f3d1cbb;p=quassel.git diff --git a/src/qtui/chatwidget.cpp b/src/qtui/chatwidget.cpp index 131caa42..85d8cad6 100644 --- a/src/qtui/chatwidget.cpp +++ b/src/qtui/chatwidget.cpp @@ -384,7 +384,8 @@ void ChatWidget::mouseDoubleClickEvent(QMouseEvent *event) { len = end - start; } QString word = text.mid(start, len); - if(word.startsWith("http://")) { + QRegExp regex("^(h|f)t{1,2}ps?:\\/\\/"); + if(regex.indexIn(word) != -1) { QDesktopServices::openUrl(QUrl(word)); }