diff options
author | Hnatiuk Vladyslav <aders1234@gmail.com> | 2022-01-02 11:27:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 11:27:33 +0100 |
commit | 8730fb0782860f278760e369b9f42f266f0572b3 (patch) | |
tree | ea6b22c418e20a03282483bd599aa79db2e2e6cc /lib/util.h | |
parent | ca6a104941b71e7b6a8bdcb6ebcdfff5ec8e8aca (diff) | |
parent | d516280a2b38ccb060e4f7502b873e19b1559ed1 (diff) | |
download | libquotient-8730fb0782860f278760e369b9f42f266f0572b3.tar.gz libquotient-8730fb0782860f278760e369b9f42f266f0572b3.zip |
Merge branch 'quotient-im:dev' into fix-qt-6
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -4,6 +4,8 @@ #pragma once +#include "quotient_export.h" + #include <QtCore/QLatin1String> #include <QtCore/QHashFunctions> @@ -244,26 +246,26 @@ inline std::pair<InputIt, ForwardIt> findFirstOf(InputIt first, InputIt last, } /** Convert what looks like a URL or a Matrix ID to an HTML hyperlink */ -void linkifyUrls(QString& htmlEscapedText); +QUOTIENT_API void linkifyUrls(QString& htmlEscapedText); /** Sanitize the text before showing in HTML * * This does toHtmlEscaped() and removes Unicode BiDi marks. */ -QString sanitized(const QString& plainText); +QUOTIENT_API QString sanitized(const QString& plainText); /** Pretty-print plain text into HTML * * This includes HTML escaping of <,>,",& and calling linkifyUrls() */ -QString prettyPrint(const QString& plainText); +QUOTIENT_API 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); +QUOTIENT_API QString cacheLocation(const QString& dirName); /** Hue color component of based of the hash of the string. * @@ -272,13 +274,13 @@ QString cacheLocation(const QString& dirName); * 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& s); +QUOTIENT_API qreal stringToHueF(const QString& s); /** Extract the serverpart from MXID */ -QString serverPart(const QString& mxId); +QUOTIENT_API QString serverPart(const QString& mxId); -QString versionString(); -int majorVersion(); -int minorVersion(); -int patchVersion(); +QUOTIENT_API QString versionString(); +QUOTIENT_API int majorVersion(); +QUOTIENT_API int minorVersion(); +QUOTIENT_API int patchVersion(); } // namespace Quotient |