From 22d3aa11debfc54ad32f3a4642ea81da058c0ee2 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Tue, 24 Jan 2017 22:31:00 +0300 Subject: [PATCH] fix: Add workaround for FreeBSD and ICU This patch fix problem with ICU on FreeBSD Implementation by @VVD --- src/persistence/smileypack.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/persistence/smileypack.cpp b/src/persistence/smileypack.cpp index 1f196a724..2228272e4 100644 --- a/src/persistence/smileypack.cpp +++ b/src/persistence/smileypack.cpp @@ -41,6 +41,10 @@ #include #include +#if defined(Q_OS_FREEBSD) +#include +#endif + #define EMOTICONS_SUB_DIR QStringLiteral("emoticons") /** @@ -84,6 +88,11 @@ SmileyPack& SmileyPack::getInstance() QStringList SmileyPack::loadDefaultPaths() { +#if defined(Q_OS_FREEBSD) + // TODO: Remove when will be fixed. + // Workaround to fix https://bugreports.qt.io/browse/QTBUG-57522 + setlocale(LC_ALL, ""); +#endif QStringList paths = QStringList{":/smileys", "~/.kde4/share/emoticons", "~/.kde/share/emoticons"}; // qTox should find emoticons next to the binary paths.append('.' + QDir::separator() + EMOTICONS_SUB_DIR);