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

Merge pull request #4090

Diadlo (1):
      fix: Add workaround for FreeBSD and ICU
This commit is contained in:
sudden6 2017-01-28 22:18:56 +01:00
commit f43587f16a
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -41,6 +41,10 @@
#include <QStringBuilder> #include <QStringBuilder>
#include <QtConcurrent/QtConcurrentRun> #include <QtConcurrent/QtConcurrentRun>
#if defined(Q_OS_FREEBSD)
#include <locale.h>
#endif
#define EMOTICONS_SUB_DIR QStringLiteral("emoticons") #define EMOTICONS_SUB_DIR QStringLiteral("emoticons")
/** /**
@ -84,6 +88,11 @@ SmileyPack& SmileyPack::getInstance()
QStringList SmileyPack::loadDefaultPaths() 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"}; QStringList paths = QStringList{":/smileys", "~/.kde4/share/emoticons", "~/.kde/share/emoticons"};
// qTox should find emoticons next to the binary // qTox should find emoticons next to the binary
paths.append('.' + QDir::separator() + EMOTICONS_SUB_DIR); paths.append('.' + QDir::separator() + EMOTICONS_SUB_DIR);