]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/eventdialog.cpp
Bump copyright years.
[toast/confclerk.git] / src / gui / eventdialog.cpp
index 4103ad6169e79cd68368960e131e932298054fbc..20a4da4f1f57729e58f352b00d0fcecb3c3f3efd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl
+ * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -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?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