From 2d2a39ff41a25893a58c4ac1589cc72e97d61f48 Mon Sep 17 00:00:00 2001 From: leha-bot Date: Thu, 16 Apr 2020 22:45:06 +0300 Subject: [PATCH] Revert "Fix emoji search in dictionary (#234)" As regression has not been fixed :( This reverts commits d0de5d31e6bd6c9891f52d05ea6147767a847bca --- Telegram/SourceFiles/codegen/common/cpp_file.cpp | 1 - Telegram/SourceFiles/codegen/emoji/generator.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/codegen/common/cpp_file.cpp b/Telegram/SourceFiles/codegen/common/cpp_file.cpp index ca57a8749..48df537a5 100644 --- a/Telegram/SourceFiles/codegen/common/cpp_file.cpp +++ b/Telegram/SourceFiles/codegen/common/cpp_file.cpp @@ -64,7 +64,6 @@ void writeLicense(QTextStream &stream, const ProjectInfo &project) { CppFile::CppFile(const QString &path, const ProjectInfo &project) : stream_(&content_) , forceReGenerate_(project.forceReGenerate) { - stream_.setCodec("UTF-8"); bool cpp = path.toLower().endsWith(".cpp"); QFileInfo info(path); diff --git a/Telegram/SourceFiles/codegen/emoji/generator.cpp b/Telegram/SourceFiles/codegen/emoji/generator.cpp index a301b97cb..05b945f3f 100644 --- a/Telegram/SourceFiles/codegen/emoji/generator.cpp +++ b/Telegram/SourceFiles/codegen/emoji/generator.cpp @@ -643,7 +643,7 @@ const std::map EmojiMap = {\n\ \n"; for (auto &item : data_.map) { - source_->stream() << "{QString(\"" << item.first << "\")," << item.second << "},\n"; + source_->stream() << "{\"" << item.first << "\"," << item.second << "},\n"; } source_->stream() << "\ \n\ @@ -674,10 +674,10 @@ bool Generator::writeFindFromDictionary(const std::mapfirst.size(); source_->stream() << "\tstd::array sizes;\n"; if (skipPostfixes) { - source_->stream() << "\tfor (int i=0,l=0; istream() << "\tfor (int i=0,l=0; i