From: Philipp Spitzer Date: Wed, 27 Sep 2017 21:33:33 +0000 (+0200) Subject: Now the links in the description are clickable. Fixes #49. X-Git-Tag: 0.6.3~1 X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/commitdiff_plain/15d41d99dd37b5e1cea5005c2fe39c7e97d43963 Now the links in the description are clickable. Fixes #49. --- diff --git a/src/gui/eventdialog.cpp b/src/gui/eventdialog.cpp index 4103ad6..6f3014e 100644 --- a/src/gui/eventdialog.cpp +++ b/src/gui/eventdialog.cpp @@ -67,7 +67,10 @@ EventDialog::EventDialog(int conferenceId, int eventId, QWidget *parent): QDialo 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\"<>().,:!])?/?)>?"); + info += description.replace(rx, "\\1"); } // links