From 88c1ed9e32f0f6b48c6fadf67c7db43b292c6684 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 3 Mar 2023 10:45:46 +0100 Subject: [PATCH] Remove dead code which is deprecated in Qt6 --- src/frontends/qt/GuiKeySymbol.cpp | 34 ------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/frontends/qt/GuiKeySymbol.cpp b/src/frontends/qt/GuiKeySymbol.cpp index 47cadeae57..083bc5f884 100644 --- a/src/frontends/qt/GuiKeySymbol.cpp +++ b/src/frontends/qt/GuiKeySymbol.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -692,39 +691,6 @@ static std::string const qkey_to_string(int lkey) } -#if 0 -static char encode(string const & encoding, QString const & str) -{ - typedef map EncodingMap; - EncodingMap encoding_map; - - QTextCodec * codec = 0; - - EncodingMap::const_iterator cit = encoding_map.find(encoding); - if (cit == encoding_map.end()) { - LYXERR(Debug::KEY, "Unrecognised encoding '" << encoding << "'."); - codec = encoding_map.find("")->second; - } else { - codec = cit->second; - } - - if (!codec) { - LYXERR(Debug::KEY, "No codec for encoding '" << encoding << "' found."); - return 0; - } - - LYXERR(Debug::KEY, "Using codec " << codec->name()); - - if (!codec->canEncode(str)) { - LYXERR(Debug::KEY, "Oof. Can't encode the text !"); - return 0; - } - - return codec->fromUnicode(str).data()[0]; -} -#endif - - void setKeySymbol(KeySymbol * sym, QKeyEvent const * ev) { sym->setKey(ev->key()); -- 2.39.5