From: Manuel Nickschas Date: Tue, 1 Apr 2008 20:22:00 +0000 (+0000) Subject: Improved URL recognizer for the good'ole ChatWidget. Thanks seezer for the patch! X-Git-Tag: 0.2.0-alpha5~34 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=508a14a5632d3a2a3d65c20dda7c942f8f120f9c;ds=sidebyside Improved URL recognizer for the good'ole ChatWidget. Thanks seezer for the patch! --- 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)); } diff --git a/version.inc b/version.inc index 780883fd..62f569fa 100644 --- a/version.inc +++ b/version.inc @@ -5,7 +5,7 @@ quasselVersion = "0.2.0-alpha5-pre"; quasselDate = "2008-04-01"; - quasselBuild = 682; + quasselBuild = 684; //! Minimum client build number the core needs clientBuildNeeded = 642;