diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-11-01 21:07:14 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:27:13 +0300 |
commit | 4462df1605e5a515d46f4f8fccc3647aa6bd06d8 (patch) | |
tree | 3de709a5f14d397b0b4c4e214457309c89290f90 /platform/platform_qt.cpp | |
parent | 708cc3c5d6f37bdff8df0b895d1866bbe2dc18f4 (diff) |
[qt] Fixed issue with getting fonts from resources/writable directory
Diffstat (limited to 'platform/platform_qt.cpp')
-rw-r--r-- | platform/platform_qt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/platform_qt.cpp b/platform/platform_qt.cpp index 17895bfe08..8df08314cf 100644 --- a/platform/platform_qt.cpp +++ b/platform/platform_qt.cpp @@ -1,8 +1,11 @@ #include "platform.hpp" +#include "../base/logging.hpp" + #include "../coding/file_reader.hpp" #include "../std/target_os.hpp" +#include "../std/algorithm.hpp" #include <QtCore/QDir> #include <QtCore/QFileInfo> @@ -49,7 +52,13 @@ string Platform::SkinName() const void Platform::GetFontNames(FilesList & res) const { GetFilesInDir(ResourcesDir(), "*.ttf", res); + GetFilesInDir(WritableDir(), "*.ttf", res); + res.resize(unique(res.begin(), res.end()) - res.begin()); sort(res.begin(), res.end()); +#ifdef DEBUG + for (size_t i = 0; i < res.size(); ++i) + LOG(LDEBUG, ("Found font:", res[i])); +#endif } int Platform::MaxTilesCount() const |