diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-07 14:35:58 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-07 14:35:58 +0900 |
commit | a80e4a675e21a1401fabfeecaf7e538227aa9dbd (patch) | |
tree | 2f01046dee489311d9ca167015f0fb5e96351bd3 /lib | |
parent | bd8764cbbb0ec003549261586867a6ae6f46f5cd (diff) | |
download | libquotient-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.cpp | 6 |
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; |