eventdialog: only convertFromPlainText description and abstract if they are not richtext.
authorgregor herrmann <gregoa@debian.org>
Wed, 11 Jan 2017 20:48:53 +0000 (21:48 +0100)
committergregor herrmann <gregoa@debian.org>
Wed, 11 Jan 2017 20:48:53 +0000 (21:48 +0100)
src/gui/eventdialog.cpp

index d9da630712beeda1ad89ae600a7b30dee7c1b197..67f01d55221385ac7f2a427864f9812f008cc567 100644 (file)
@@ -48,11 +48,19 @@ EventDialog::EventDialog(int conferenceId, int eventId, QWidget *parent): QDialo
 
     // abstract
     info += QString("<h2>%1</h2>\n").arg(tr("Abstract"));
-    info += Qt::convertFromPlainText(event.abstract(), Qt::WhiteSpaceNormal);
+    if (Qt::mightBeRichText(event.abstract())) {
+        info += event.abstract();
+    } else {
+        info += Qt::convertFromPlainText(event.abstract(), Qt::WhiteSpaceNormal);
+    }
 
     // description
     info += QString("<h2>%1</h2>\n").arg(tr("Description"));
-    info += Qt::convertFromPlainText(event.description(), Qt::WhiteSpaceNormal);
+    if (Qt::mightBeRichText(event.description())) {
+        info += event.description();
+    } else {
+        info += Qt::convertFromPlainText(event.description(), Qt::WhiteSpaceNormal);
+    }
 
     // links
     info += QString("<h2>%1</h2>\n<ul>\n").arg(tr("Links"));