]> git.lyx.org Git - lyx.git/blobdiff - src/support/qstring_helpers.h
Possibly fix this bug:
[lyx.git] / src / support / qstring_helpers.h
index dfb22e6c1bf802ab86ef5163d74329287d0c945a..86b2e037fe33040dbe6a4e48d52abb8821d531ea 100644 (file)
@@ -76,10 +76,6 @@ inline char_type const qchar_to_ucs4(QChar const & qchar)
  */
 inline QChar const ucs4_to_qchar(char_type const ucs4)
 {
-       // FIXME: The following cast is not a real conversion but it work
-       // for the ucs2 subrange of unicode. Instead of an assertion we should
-       // return some special characters that indicates that its display is
-       // not supported.
        BOOST_ASSERT(is_utf16(ucs4));
        return QChar(static_cast<unsigned short>(ucs4));
 }
@@ -103,21 +99,6 @@ QString const toqstr(docstring const & ucs4);
 #endif
 
 
-/**
- * ucs4_to_qstring - convert a UCS4 encoded char_type * into a QString
- *
- * This is a hack for the painter and font metrics and should not be used
- * elsewhere. Since it uses ucs4_to_qchar it has the same limitations.
- */
-inline void ucs4_to_qstring(char_type const * str, size_t ls, QString & s)
-{
-       int i = static_cast<int>(ls);
-       s.resize(i);
-       for (; --i >= 0;)
-               s[i] = ucs4_to_qchar(str[i]);
-}
-
-
 /**
  * qstring_to_ucs4 - convert a QString into a UCS4 encoded docstring
  *