[LyX/master] Revert "Fix Qt6 deprecation warning (QString::fromUcs4(uint))"

Juergen Spitzmueller spitz at lyx.org
Sun Mar 21 15:54:06 UTC 2021


commit 4a5ae39e8b98d995c89b1a9cddbe7d1fe01e6cbb
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Mar 21 16:59:25 2021 +0100

    Revert "Fix Qt6 deprecation warning (QString::fromUcs4(uint))"
    
    This reverts commit 52dff70641788cdd99ca40cf30550861555191c3.
---
 src/support/qstring_helpers.cpp |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/support/qstring_helpers.cpp b/src/support/qstring_helpers.cpp
index 103f4a9..d34e455 100644
--- a/src/support/qstring_helpers.cpp
+++ b/src/support/qstring_helpers.cpp
@@ -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)


More information about the lyx-cvs mailing list