From 6dcf24a69c57fbe9061cd7e115b2a8c0fb86c1e5 Mon Sep 17 00:00:00 2001 From: freewms <36444868+freewms@users.noreply.github.com> Date: Tue, 9 May 2023 22:20:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=B8=D0=BC=D0=B5=D0=BD=20=D1=81=D0=B2=D0=BE=D0=B9?= =?UTF-8?q?=D1=81=D1=82=D0=B2=20=D0=B8=20=D1=84=D1=83=D0=BD=D0=BA=D1=86?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=BF=D0=BE=D0=B4=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Получался только первый символ из имени свойства и функции --- src/Component.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Component.cpp b/src/Component.cpp index 7ffcb80..fa1a987 100644 --- a/src/Component.cpp +++ b/src/Component.cpp @@ -99,8 +99,13 @@ const WCHAR_T *Component::GetPropName(long num, long lang_alias) { } WCHAR_T *result = nullptr; +#ifdef _WINDOWS storeVariable(std::u16string(reinterpret_cast(name->c_str())), &result); - +#else + std::u16string u16name(name->begin(), name->end()); + storeVariable(u16name, &result); +#endif + return result; } @@ -183,7 +188,12 @@ const WCHAR_T *Component::GetMethodName(const long num, const long lang_alias) { } WCHAR_T *result = nullptr; +#ifdef _WINDOWS storeVariable(std::u16string(reinterpret_cast(name->c_str())), &result); +#else + std::u16string u16name(name->begin(), name->end()); + storeVariable(u16name, &result); +#endif return result;