X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=e3e9ad74e0863bc11fea8b6d0268b0f2c7b84055;hb=5992edbbfa5a6e4a3c72b07c6f08a464f87dd432;hp=97853250bdff8f374bc0644c47cf2d9d651ea927;hpb=7c78f651ee68ac7f9028f9a3640d4c8ae808c826;p=quassel.git diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 97853250..e3e9ad74 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -410,7 +410,7 @@ QList ContentsChatItem::findClickables() const { static QRegExp regExp[] = { // URL // QRegExp(QString("((?:https?://|s?ftp://|irc://|mailto:|www\\.)%1+|%1+\\.[a-z]{2,4}(?:?=/%1+|\\b))%2").arg(urlChars, urlEnd)), - QRegExp(QString("((?:(?:https?://|s?ftp://|irc://|mailto:)|www)%1+)%2").arg(urlChars, urlEnd), Qt::CaseInsensitive), + QRegExp(QString("((?:(?:https?://|s?ftp://|irc://|gopher://|mailto:)|www)%1+)%2").arg(urlChars, urlEnd), Qt::CaseInsensitive), // Channel name // We don't match for channel names starting with + or &, because that gives us a lot of false positives. @@ -507,7 +507,7 @@ void ContentsChatItem::handleClick(const QPointF &pos, ChatScene::ClickMode clic case Clickable::Url: if(!str.contains("://")) str = "http://" + str; - QDesktopServices::openUrl(QUrl::fromEncoded(str.toAscii())); + QDesktopServices::openUrl(QUrl::fromEncoded(str.toUtf8(), QUrl::TolerantMode)); break; case Clickable::Channel: // TODO join or whatever...