1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: Add workaround for FreeBSD and ICU

This patch fix problem with ICU on FreeBSD
Implementation by @VVD
This commit is contained in:
Diadlo 2017-01-24 22:31:00 +03:00
parent a5d2c573dd
commit 22d3aa11de
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -41,6 +41,10 @@
#include <QStringBuilder>
#include <QtConcurrent/QtConcurrentRun>
#if defined(Q_OS_FREEBSD)
#include <locale.h>
#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);