From a01e7000bd43218e469d2122f87e909134578ae7 Mon Sep 17 00:00:00 2001 From: zhangpengfei Date: Sun, 7 Feb 2021 10:11:30 +0800 Subject: [PATCH] [FIX]Used uchardet_delete too early. --- libsearch/file-utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsearch/file-utils.cpp b/libsearch/file-utils.cpp index 5d8852e..6e9bacb 100644 --- a/libsearch/file-utils.cpp +++ b/libsearch/file-utils.cpp @@ -557,13 +557,13 @@ void FileUtils::getTxtContent(QString &path, QString &textcontent) uchardet_data_end(chardet); const char *codec = uchardet_get_charset(chardet); - uchardet_delete(chardet); if(QTextCodec::codecForName(codec) == 0) - qWarning()<<"Unsupported Text encoding format"<