if (Qt::mightBeRichText(event.description())) {
info += event.description();
} else {
- info += Qt::convertFromPlainText(event.description(), Qt::WhiteSpaceNormal);
+ QString description = Qt::convertFromPlainText(event.description(), Qt::WhiteSpaceNormal);
+ // make links clickable
+ QRegExp rx("<?(((s?ftp|https?|svn|svn\\+ssh|git|git\\+ssh)://|(file|news):|www\\.)[-a-z0-9_.:%]*[a-z0-9](/[^][{}\\s\"<>()]*[^][{}\\s\"<>().,:!])?/?)>?");
+ info += description.replace(rx, "<a href=\"\\1\">\\1</a>");
}
// links