projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Improved URL recognizer for the good'ole ChatWidget. Thanks seezer for the patch!
[quassel.git]
/
src
/
qtui
/
chatwidget.cpp
diff --git
a/src/qtui/chatwidget.cpp
b/src/qtui/chatwidget.cpp
index
131caa4
..
85d8cad
100644
(file)
--- 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));
}