diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-02 05:28:24 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-02 05:28:24 +0100 |
commit | d516280a2b38ccb060e4f7502b873e19b1559ed1 (patch) | |
tree | b995becf2cb8d002ac3fa4d68c69a69a8f26fdcc /lib/util.h | |
parent | 545f9084bacead9f02ba6df609822be4672b7952 (diff) | |
parent | 2dee2bf4f0b2bd6615866644b2df9460da6babbb (diff) | |
download | libquotient-d516280a2b38ccb060e4f7502b873e19b1559ed1.tar.gz libquotient-d516280a2b38ccb060e4f7502b873e19b1559ed1.zip |
Manage symbols visibility for dynamic linking
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 |