X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=679dc8721db9168b5fe155ea19bcf165aa2f6ed5;hp=d1443a680ff7c664dab184472595fcf2ad39ce4a;hb=6c44f3cfc618a3fc55f583597be3697714a07ae7;hpb=709d88e1d7cede7fee485b85798413468f324abe diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index d1443a68..679dc872 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -457,7 +457,7 @@ void ContentsChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { 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... @@ -534,7 +534,9 @@ void ContentsChatItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { } 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;