From 56d656502c82d81e5339fad7eb7bc77545adea8b Mon Sep 17 00:00:00 2001 From: Diadlo Date: Tue, 27 Dec 2016 23:13:06 +0300 Subject: [PATCH] fix: Fix problem with unicode symbols on FreeBSD Fix #4012 --- src/persistence/smileypack.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/persistence/smileypack.cpp b/src/persistence/smileypack.cpp index 632162fae..5e7aac0ab 100644 --- a/src/persistence/smileypack.cpp +++ b/src/persistence/smileypack.cpp @@ -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))