aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-07 14:35:58 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-07 14:35:58 +0900
commita80e4a675e21a1401fabfeecaf7e538227aa9dbd (patch)
tree2f01046dee489311d9ca167015f0fb5e96351bd3 /lib
parentbd8764cbbb0ec003549261586867a6ae6f46f5cd (diff)
downloadlibquotient-a80e4a675e21a1401fabfeecaf7e538227aa9dbd.tar.gz
libquotient-a80e4a675e21a1401fabfeecaf7e538227aa9dbd.zip
Remove [[gnu::const]] from linkifyUrls()
It's not a pure function by any account. Closes #377. Also: minor tweaks in util.cpp
Diffstat (limited to 'lib')
-rw-r--r--lib/util.cpp6
1 files changed, 3 insertions, 3 deletions
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("<span style='white-space:pre-wrap'>") +
plainText.toHtmlEscaped() + QStringLiteral("</span>");
- pt.replace('\n', "<br/>");
+ pt.replace('\n', QStringLiteral("<br/>"));
linkifyUrls(pt);
return pt;