Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix: Add workaround for FreeBSD and ICU
Browse files Browse the repository at this point in the history
This patch fix problem with ICU on FreeBSD
Implementation by @VVD
  • Loading branch information
Diadlo committed Jan 24, 2017
1 parent a5d2c57 commit 22d3aa1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/persistence/smileypack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#include <QStringBuilder>
#include <QtConcurrent/QtConcurrentRun>

#if defined(Q_OS_FREEBSD)
#include <locale.h>
#endif

#define EMOTICONS_SUB_DIR QStringLiteral("emoticons")

/**
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 22d3aa1

Please sign in to comment.