]> git.lyx.org Git - features.git/commitdiff
remove dead code that is no longer needed
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 18 Feb 2007 11:23:37 +0000 (11:23 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 18 Feb 2007 11:23:37 +0000 (11:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17238 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/Application.C
src/frontends/qt4/GuiApplication.C
src/frontends/qt4/QLyXKeySym.C

index 35eeaa9418dcf26bedfec3180d63a32eed2263d0..d4bde4b1eb040098105f365702e0a6cadc93313a 100644 (file)
@@ -41,11 +41,6 @@ namespace frontend {
 Application::Application(int &, char **)
        : current_view_(0)
 {
-       // FIXME: please confirm: with unicode, I think initEncoding()
-       // is not needed anymore!
-       
-       // this can't be done before because it needs the Languages object
-       //initEncodings();
 }
 
 
index cd7f70a313f6254a8083a57d8077bd77ca51a711..d9a574e531e55786a9cb60f3ba1d2849f9f3a7f1 100644 (file)
@@ -55,9 +55,6 @@
 using std::string;
 using std::endl;
 
-// in QLyXKeySym.C
-extern void initEncodings();
-
 ///////////////////////////////////////////////////////////////
 // You can find other X11 specific stuff
 // at the end of this file...
index e52550dedce9bcc38e172cdf6b74d6541730efe1..15fc669ae1d68784ea455a9ab76ed638d6655e9a 100644 (file)
@@ -78,69 +78,6 @@ char const encode(string const & encoding, QString const & str)
 }
 
 
-void initEncodings()
-{
-#if 0
-       //const char * c = QTextCodec::locale();
-       //string s = c ? c : "";
-       // In this order, see support/filetools.C
-       string s = getEnv("LC_ALL");
-       if (s.empty()) {
-               s = getEnv("LC_MESSAGES");
-               if (s.empty()) {
-                       s = getEnv("LANG");
-                       if (s.empty())
-                               s = "C";
-               }
-       }
-
-       if (s.find("UTF") != string::npos || s.find("utf") != string::npos)
-       //if (contains(c, "UTF") || contains(c, "utf"))
-               lyxerr << "Warning: this system's locale uses Unicode." << endl;
-
-       // strip off any encoding suffix
-       string::size_type i = s.find(".");
-       s = s.substr(0, i);
-
-       encoding_map["iso8859-1"] = QTextCodec::codecForName("ISO 8859-1");
-       encoding_map["iso8859-2"] = QTextCodec::codecForName("ISO 8859-2");
-       encoding_map["iso8859-3"] = QTextCodec::codecForName("ISO 8859-3");
-       encoding_map["iso8859-4"] = QTextCodec::codecForName("ISO 8859-4");
-       encoding_map["iso8859-5"] = QTextCodec::codecForName("ISO 8859-5");
-       encoding_map["iso8859-6"] = QTextCodec::codecForName("ISO 8859-6");
-       encoding_map["iso8859-7"] = QTextCodec::codecForName("ISO 8859-7");
-       encoding_map["iso8859-9"] = QTextCodec::codecForName("ISO 8859-9");
-       encoding_map["iso8859-15"] = QTextCodec::codecForName("ISO 8859-15");
-       encoding_map["cp1255"] = QTextCodec::codecForName("CP 1255");
-       encoding_map["cp1251"] = QTextCodec::codecForName("CP 1251");
-       encoding_map["koi8"] = QTextCodec::codecForName("KOI8-R");
-       encoding_map["koi8-u"] = QTextCodec::codecForName("KOI8-U");
-
-       // FIXME
-       encoding_map["tis620-0"] = 0;
-       encoding_map["pt154"] = 0;
-
-       // There are lots more codecs in Qt too ...
-
-       // when no document open
-       // use the appropriate encoding for the system language
-       lyxerr << "Language code:" << s << endl;
-       for (Languages::const_iterator it=languages.begin(); it != languages.end(); ++it) {
-               //lyxerr << it->second.code() << ":" << it->second.encodingStr() << ":" << it->second.encoding() << endl;
-               if (it->second.code() == s) {
-                       s = it->second.encodingStr();
-                       break;
-               }
-       }
-       lyxerr << "Setting new locale for Qt:" << s << endl;
-       QTextCodec * defaultCodec = encoding_map[s];
-       encoding_map[""] = defaultCodec;
-
-       QTextCodec::setCodecForCStrings(defaultCodec);
-#endif
-}
-
-
 QLyXKeySym::QLyXKeySym()
        : LyXKeySym(), key_(0)
 {