]> git.lyx.org Git - features.git/commitdiff
Revert "Fix Qt6 deprecation warning (QString::fromUcs4(uint))"
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 21 Mar 2021 15:59:25 +0000 (16:59 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 21 Mar 2021 15:59:25 +0000 (16:59 +0100)
This reverts commit 52dff70641788cdd99ca40cf30550861555191c3.

src/support/qstring_helpers.cpp

index 103f4a9459e4e4aa7d9c92e62557b6796917785e..d34e455640d012c13d660c6e67f0bd4374b384d3 100644 (file)
@@ -47,21 +47,13 @@ QString toqstr(docstring const & ucs4)
        // need to be superfast.
        if (ucs4.empty())
                return QString();
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
-       return QString::fromStdWString(ucs4);
-#else
        return QString::fromUcs4((uint const *)ucs4.data(), ucs4.length());
-#endif
 }
 
 QString toqstr(char_type ucs4)
 {
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
-       return QString::fromWCharArray(&ucs4, 1);
-#else
        union { char_type c; uint i; } u = { ucs4 };
        return QString::fromUcs4(&u.i, 1);
-#endif
 }
 
 docstring qstring_to_ucs4(QString const & qstr)