aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-09 11:49:05 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-09 11:49:05 +0900
commit31e28e2a99e6815da407d201e7287423a4956138 (patch)
tree049f3b156ad2cca3f328d163c9267ae90d984485 /lib/util.h
parentb5dd30189df0d7515116b2abac1f93fc0f8a1989 (diff)
parent651478c1681ba6f93e22c20328a048dbbc263ffe (diff)
downloadlibquotient-31e28e2a99e6815da407d201e7287423a4956138.tar.gz
libquotient-31e28e2a99e6815da407d201e7287423a4956138.zip
Merge branch 'master' into use-clang-format
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index a78e59bd..a29f6253 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -327,26 +327,33 @@ inline std::pair<InputIt, ForwardIt> findFirstOf(InputIt first, InputIt last,
void linkifyUrls(QString& htmlEscapedText);
/** Sanitize the text before showing in HTML
+ *
* This does toHtmlEscaped() and removes Unicode BiDi marks.
*/
QString sanitized(const QString& plainText);
/** Pretty-print plain text into HTML
+ *
* This includes HTML escaping of <,>,",& and calling linkifyUrls()
*/
QString prettyPrint(const QString& plainText);
/** Return a path to cache directory after making sure that it exists
+ *
* The returned path has a trailing slash, clients don't need to append it.
* \param dir path to cache directory relative to the standard cache path
*/
QString cacheLocation(const QString& dirName);
/** Hue color component of based of the hash of the string.
+ *
* The implementation is based on XEP-0392:
* https://xmpp.org/extensions/xep-0392.html
* Naming and range are the same as QColor's hueF method:
* https://doc.qt.io/qt-5/qcolor.html#integer-vs-floating-point-precision
*/
qreal stringToHueF(const QString& string);
+
+/** Extract the serverpart from MXID */
+QString serverPart(const QString& mxId);
} // namespace QMatrixClient