aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/pinyin/3rdparty/pinyin/patches/0005-Fix-string-cast.patch
blob: 63e126d1f1176148440c46717131dae42e615688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 821c869ad7af125a7a718093f8d4730108cffe5b Mon Sep 17 00:00:00 2001
From: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Date: Thu, 23 Aug 2018 21:51:19 +0300
Subject: [PATCH] Fix string cast

Enforce proper string cast using QT_NO_CAST_TO_ASCII and friends.

Change-Id: I039b23144c8d57f12aad1c27f29654b382078222
---
 src/plugins/pinyin/3rdparty/pinyin/share/dicttrie.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/pinyin/3rdparty/pinyin/share/dicttrie.cpp b/src/plugins/pinyin/3rdparty/pinyin/share/dicttrie.cpp
index e7d194f..a084395 100644
--- a/src/plugins/pinyin/3rdparty/pinyin/share/dicttrie.cpp
+++ b/src/plugins/pinyin/3rdparty/pinyin/share/dicttrie.cpp
@@ -245,7 +245,7 @@ bool DictTrie::load_dict(const char *filename, LemmaIdType start_id,
   if (NULL == filename || end_id <= start_id)
     return false;
 
-  QFile file(filename);
+  QFile file(QString::fromUtf8(filename));
   if (!file.open(QIODevice::ReadOnly))
     return false;
   QFile *fp = &file;
-- 
2.14.1.windows.1