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

Commit

Permalink
fix: Fix problem with unicode symbols on FreeBSD
Browse files Browse the repository at this point in the history
Fix #4012
  • Loading branch information
Diadlo committed Dec 28, 2016
1 parent 8d320ca commit 56d6565
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/persistence/smileypack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ QStringList SmileyPack::loadDefaultPaths()
paths.append('.' + QDir::separator() + EMOTICONS_SUB_DIR);

// qTox exclusive emoticons
for(auto qtoxPath : QStandardPaths::standardLocations(QStandardPaths::DataLocation))
QStandardPaths::StandardLocation location;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
location = QStandardPaths::AppDataLocation;
#else
#warning "Qt < 5.4.0 has a trouble with unicode symbols in path on few systems"
location = QStandardPaths::DataLocation;
#endif
for(auto qtoxPath : QStandardPaths::standardLocations(location))
{
qtoxPath += QDir::separator() + EMOTICONS_SUB_DIR;
if(!paths.contains(qtoxPath))
Expand Down

0 comments on commit 56d6565

Please sign in to comment.