case Clickable::Url:
if(!str.contains("://"))
str = "http://" + str;
- QDesktopServices::openUrl(str);
+ QDesktopServices::openUrl(QUrl::fromEncoded(str.toAscii()));
break;
case Clickable::Channel:
// TODO join or whatever...
}
void ContentsChatItem::showWebPreview(const Clickable &click) {
-#ifdef HAVE_WEBKIT
+#ifndef HAVE_WEBKIT
+ Q_UNUSED(click);
+#else
QTextLine line = layout()->lineForTextPosition(click.start);
qreal x = line.cursorToX(click.start);
qreal width = line.cursorToX(click.start + click.length) - x;