From: Manuel Nickschas Date: Tue, 5 Aug 2008 11:02:53 +0000 (+0200) Subject: Fix URL regexp to not include whitespace anymore X-Git-Tag: 0.3.0~110 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=4256ac4821446383da9a9dcda3532fbfa3eb6beb;ds=sidebyside Fix URL regexp to not include whitespace anymore --- diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index adfcd9c8..f09553b5 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -241,7 +241,7 @@ void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { void ChatItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { // FIXME dirty and fast hack to make http:// urls klickable - QRegExp regex("\\b((?:h|f)t{1,2}ps?:\\/\\/.+)\\b"); + QRegExp regex("\\b((?:h|f)t{1,2}ps?://[^\\s]+)\\b"); QString str = data(ChatLineModel::DisplayRole).toString(); int idx = posToCursor(event->pos()); int mi = 0;