eventdialog: only convertFromPlainText description and abstract if they are not richtext.
[toast/confclerk.git] / src / gui / eventdialog.cpp
index d9da630..67f01d5 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"));