Changeset 79a7671 for src/gui/eventdialog.cpp
- Timestamp:
- 08/30/17 21:15:52 (5 years ago)
- Branches:
- master, qt5
- Children:
- 30edeb7
- Parents:
- 809b5e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/eventdialog.cpp
r809b5e5 r79a7671 28 28 #endif 29 29 30 QString toHtmlEscaped(const QString& string) { 31 #if QT_VERSION >= 0x050000 32 return string.toHtmlEscaped(); 33 #else 34 return Qt::escape(string); 35 #endif 36 } 37 30 38 EventDialog::EventDialog(int conferenceId, int eventId, QWidget *parent): QDialog(parent), mConferenceId(conferenceId), mEventId(eventId) { 31 39 setupUi(this); … … 39 47 QString info; 40 48 // title 41 info.append(QString("<h1>%1</h1>\n").arg( event.title().toHtmlEscaped()));49 info.append(QString("<h1>%1</h1>\n").arg(toHtmlEscaped(event.title()))); 42 50 43 51 // persons 44 52 info += QString("<h2>%1</h2>\n").arg(tr("Persons")); 45 53 QStringList persons = event.persons(); 46 for (int i = 0; i != persons.size(); ++i) persons[i] = persons[i].toHtmlEscaped();54 for (int i = 0; i != persons.size(); ++i) persons[i] = toHtmlEscaped(persons[i]); 47 55 info += QString("<p>%1</p>\n").arg(persons.join(", ")); 48 56 … … 72 80 if (url.isEmpty() || url == "http://") continue; 73 81 if (name.isEmpty()) name = url; 74 info += QString("<li><a href=\"%1\">%2</a></li>\n").arg( url.toHtmlEscaped(), name.toHtmlEscaped());82 info += QString("<li><a href=\"%1\">%2</a></li>\n").arg(toHtmlEscaped(url), toHtmlEscaped(name)); 75 83 } 76 84 info += QString("</ul>\n");
Note: See TracChangeset
for help on using the changeset viewer.