From a80e4a675e21a1401fabfeecaf7e538227aa9dbd Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 7 Jul 2018 14:35:58 +0900 Subject: Remove [[gnu::const]] from linkifyUrls() It's not a pure function by any account. Closes #377. Also: minor tweaks in util.cpp --- lib/util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/util.cpp b/lib/util.cpp index 1fadb9a8..1773fcfe 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -25,8 +25,8 @@ static const auto RegExpOptions = | QRegularExpression::OptimizeOnFirstUsageOption | QRegularExpression::UseUnicodePropertiesOption; -/** Converts all that looks like a URL into HTML links */ -[[gnu::const]] static void linkifyUrls(QString& htmlEscapedText) +// Converts all that looks like a URL into HTML links +static void linkifyUrls(QString& htmlEscapedText) { // regexp is originally taken from Konsole (https://github.com/KDE/konsole) // full url: @@ -56,7 +56,7 @@ QString QMatrixClient::prettyPrint(const QString& plainText) { auto pt = QStringLiteral("") + plainText.toHtmlEscaped() + QStringLiteral(""); - pt.replace('\n', "
"); + pt.replace('\n', QStringLiteral("
")); linkifyUrls(pt); return pt; -- cgit v1.2.3