From 1375cdb05bcd8e732eb5459328f73370f0f75099 Mon Sep 17 00:00:00 2001 From: Fedin Dmitriy Date: Sun, 16 Feb 2014 22:39:50 +0400 Subject: [PATCH] Added compatibility with Qt >=5 --- src/api/utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api/utils.cpp b/src/api/utils.cpp index 2000cc8..5dd52db 100644 --- a/src/api/utils.cpp +++ b/src/api/utils.cpp @@ -26,6 +26,7 @@ #include #include #include +#include //#define MAX_ENTITY 258 //extern const struct QTextHtmlEntity { const char *name; quint16 code; } entities[MAX_ENTITY]; @@ -66,7 +67,11 @@ QString fromHtmlEntities(const QString &source) QString toHtmlEntities(const QString &source) { +#if QT_VERSION>=0x5 + return source.toHtmlEscaped(); +#else return Qt::escape(source); +#endif } } //namespace Vreen