Fix URL regexp to not include whitespace anymore
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 5 Aug 2008 11:02:53 +0000 (13:02 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 5 Aug 2008 11:02:58 +0000 (13:02 +0200)
src/qtui/chatitem.cpp

index adfcd9c..f09553b 100644 (file)
@@ -241,7 +241,7 @@ void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
 void ChatItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) {
   // FIXME dirty and fast hack to make http:// urls klickable
 
 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;
   QString str = data(ChatLineModel::DisplayRole).toString();
   int idx = posToCursor(event->pos());
   int mi = 0;