]> git.lyx.org Git - features.git/commitdiff
* lstring.cpp: parts already implemented in qstring_helpers.cpp
authorPeter Kümmel <syntheticpp@gmx.net>
Tue, 22 Apr 2008 13:59:26 +0000 (13:59 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Tue, 22 Apr 2008 13:59:26 +0000 (13:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24442 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/lstrings.cpp

index c8fc921da3f224152b11349cb5a8446527d7120d..bab226f1bf572d9f7ccf35fca3cdd1ddf1744af8 100644 (file)
@@ -60,45 +60,6 @@ static inline char_type qchar_to_ucs4(QChar const & qchar)
 }
 
 
-
-QString toqstr(char const * str)
-{
-       return QString::fromUtf8(str);
-}
-
-QString toqstr(std::string const & str)
-{
-       return toqstr(str.c_str());
-}
-
-
-QString toqstr(docstring const & ucs4)
-{
-       // If possible we let qt do the work, since this version does not
-       // need to be superfast.
-       return QString::fromUcs4((uint const *)ucs4.data(), ucs4.length());
-}
-
-QString toqstr(char_type ucs4)
-{
-       union { char_type c; uint i; } u = { ucs4 };
-       return QString::fromUcs4(&u.i, 1);
-}
-
-docstring qstring_to_ucs4(QString const & qstr)
-{
-       if (qstr.isEmpty())
-               return docstring();
-       QVector<uint> const ucs4 = qstr.toUcs4();
-       return docstring((char_type const *)(ucs4.constData()), ucs4.size());
-}
-
-std::string fromqstr(QString const & str)
-{
-       return str.isEmpty() ? std::string() : std::string(str.toUtf8());
-}
-
-
 /**
  * Convert a UCS4 character into a QChar.
  * This is a hack (it does only make sense for the common part of the UCS4