-void StatusNotifierItem::showMessage(const QString &title, const QString &message_, SystemTray::MessageIcon icon, int timeout, uint notificationId) {
- QString message = message_;
- if(_notificationsClient->isValid()) {
- if(_notificationsClientSupportsMarkup)
- message = Qt::escape(message);
-
- QStringList actions;
- if(_notificationsClientSupportsActions)
- actions << "activate" << "View";
-
- // we always queue notifications right now
- QDBusReply<uint> reply = _notificationsClient->Notify(title, 0, "quassel", title, message, actions, QVariantMap(), timeout);
- if(reply.isValid()) {
- uint dbusid = reply.value();
- _notificationsIdMap.insert(dbusid, notificationId);
- _lastNotificationsDBusId = dbusid;
+
+void StatusNotifierItem::showMessage(const QString &title, const QString &message_, SystemTray::MessageIcon icon, int timeout, uint notificationId)
+{
+ QString message = message_;
+ if (_notificationsClient->isValid()) {
+ if (_notificationsClientSupportsMarkup)
+#if QT_VERSION < 0x050000
+ message = Qt::escape(message);
+#else
+ message = message.toHtmlEscaped();
+#endif
+
+ QStringList actions;
+ if (_notificationsClientSupportsActions)
+ actions << "activate" << "View";
+
+ // we always queue notifications right now
+ QDBusReply<uint> reply = _notificationsClient->Notify(title, 0, "quassel", title, message, actions, QVariantMap(), timeout);
+ if (reply.isValid()) {
+ uint dbusid = reply.value();
+ _notificationsIdMap.insert(dbusid, notificationId);
+ _lastNotificationsDBusId = dbusid;
+ }