mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Remove dead code which is deprecated in Qt6
This commit is contained in:
parent
06928c914f
commit
88c1ed9e32
@ -25,7 +25,6 @@
|
|||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QTextCodec>
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -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<string, QTextCodec *> 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)
|
void setKeySymbol(KeySymbol * sym, QKeyEvent const * ev)
|
||||||
{
|
{
|
||||||
sym->setKey(ev->key());
|
sym->setKey(ev->key());
|
||||||
|
Loading…
Reference in New Issue
Block a user