Re: Qt6 sets UNICODE on Windows
Am Mon, 7 Jun 2021 20:03:47 +0200 schrieb Yu Jin : > Am Mo., 31. Mai 2021 um 16:42 Uhr schrieb Pavel Sanda : > > > On Sat, May 29, 2021 at 06:47:05PM +0200, Yu Jin wrote: > > > > But I also think that the "universal" function calls (CreateNamedPipe() > > > > and WaitNamedPipe()) should be made specific (CreateNamedPipeA() and > > > > WaitNamedPipeA()), because the arguments are also specific (c_str() > > always > > > > returns const char*). I have attached the patch showing it, the patch > > alone > > > > fixes the compilation with unicode definition (can I commit it?). Once > > Qt > > > > 6.1.1 releases though, I will create a patch to disable unicode in > > CMake > > > > again. > > > > > > > Forgot the patch. > > > > It's inside _WIN32 section, thus safe for other archs. So I'd say go on > > and commit. :) > > > > Thanks, Qt 6.1.1 released today, as mentioned I have prepared the patch for > CMake, please review. I have tested successfully with both Qt6 and Qt5. On > Qt5 it does nothing, because the property did not exist back then I guess. > Note: With this version Qt6 sets UNICODE for basically everything now, so > also libraries and console applications, so the patch deactivates it for > all main targets. Compiles fine on Linux with Qt5. Cannot test Qt6. Kornel pgpFQ6OS32Hf6.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Qt6 sets UNICODE on Windows
Am Mo., 31. Mai 2021 um 16:42 Uhr schrieb Pavel Sanda : > On Sat, May 29, 2021 at 06:47:05PM +0200, Yu Jin wrote: > > > But I also think that the "universal" function calls (CreateNamedPipe() > > > and WaitNamedPipe()) should be made specific (CreateNamedPipeA() and > > > WaitNamedPipeA()), because the arguments are also specific (c_str() > always > > > returns const char*). I have attached the patch showing it, the patch > alone > > > fixes the compilation with unicode definition (can I commit it?). Once > Qt > > > 6.1.1 releases though, I will create a patch to disable unicode in > CMake > > > again. > > > > > Forgot the patch. > > It's inside _WIN32 section, thus safe for other archs. So I'd say go on > and commit. :) > Thanks, Qt 6.1.1 released today, as mentioned I have prepared the patch for CMake, please review. I have tested successfully with both Qt6 and Qt5. On Qt5 it does nothing, because the property did not exist back then I guess. Note: With this version Qt6 sets UNICODE for basically everything now, so also libraries and console applications, so the patch deactivates it for all main targets. -- Eugene file.diff Description: Binary data -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Qt6 sets UNICODE on Windows
On Sat, May 29, 2021 at 06:47:05PM +0200, Yu Jin wrote: > > But I also think that the "universal" function calls (CreateNamedPipe() > > and WaitNamedPipe()) should be made specific (CreateNamedPipeA() and > > WaitNamedPipeA()), because the arguments are also specific (c_str() always > > returns const char*). I have attached the patch showing it, the patch alone > > fixes the compilation with unicode definition (can I commit it?). Once Qt > > 6.1.1 releases though, I will create a patch to disable unicode in CMake > > again. > > > Forgot the patch. It's inside _WIN32 section, thus safe for other archs. So I'd say go on and commit. :) Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Qt6 sets UNICODE on Windows
Am Sa., 29. Mai 2021 um 18:43 Uhr schrieb Yu Jin : > Am Sa., 29. Mai 2021 um 10:57 Uhr schrieb Yu Jin : > >> >> >> Am Sa., 29. Mai 2021 um 10:22 Uhr schrieb Kornel Benko : >> >>> Am Sat, 29 May 2021 09:56:06 +0200 >>> schrieb Yu Jin : >>> >>> > this is connected to the Beta 1 tarballs, trying to build LyX I >>> stumbled >>> > across this: >>> > [image: grafik.png] >>> > Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when >>> > configuring without LYX_CONSOLE. It does that by setting the character >>> set >>> > to Unicode (as shown in the screenshot above) and it also sets the >>> > "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does >>> not do >>> > that. I have just tried to manually change the character set and remove >>> > those definitions in Visual Studio and it worked just fine. Any Idea if >>> > this is intended by us or how we can prevent it? Maybe in CMake? >>> >>> The only setting for UNICODE i see is in >>> development/Win32/vld/cmake/CMakeLists.txt >>> This is used, if LYX_VLD is set. But this should be OFF on default. >>> >> >> Thank you for your response. Actually it is Qt6 after all, I just tested >> on a minimal example, it seems that Windows GUI applications are indeed >> defaulted to UNICODE on Qt6. I also just found in the keynote here: >> https://www.qtdesktopdays.com/wp-content/uploads/2020/09/keynote.pdf >> >> QtCore classes can now only deal with Unicode encodings >> –For other encodings: QTextCodec in Qt5Compat >> >> Don't really understand what that really means for LyX. But Qt5Compat is >> used, so I hope it will be fine. I will ask in the Qt Forum how the UNICODE >> default can be deactivated. >> > > There was a bug report already: > https://bugreports.qt.io/browse/QTBUG-89951 > apparently the unicode default will stay for all WIN32 (Windows GUI) > applications and it will be possible to disable only with the next (6.1.1) > release. > > But I also think that the "universal" function calls (CreateNamedPipe() > and WaitNamedPipe()) should be made specific (CreateNamedPipeA() and > WaitNamedPipeA()), because the arguments are also specific (c_str() always > returns const char*). I have attached the patch showing it, the patch alone > fixes the compilation with unicode definition (can I commit it?). Once Qt > 6.1.1 releases though, I will create a patch to disable unicode in CMake > again. > Forgot the patch. -- Eugene file.diff Description: Binary data -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Qt6 sets UNICODE on Windows
Am Sa., 29. Mai 2021 um 10:57 Uhr schrieb Yu Jin : > > > Am Sa., 29. Mai 2021 um 10:22 Uhr schrieb Kornel Benko : > >> Am Sat, 29 May 2021 09:56:06 +0200 >> schrieb Yu Jin : >> >> > this is connected to the Beta 1 tarballs, trying to build LyX I stumbled >> > across this: >> > [image: grafik.png] >> > Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when >> > configuring without LYX_CONSOLE. It does that by setting the character >> set >> > to Unicode (as shown in the screenshot above) and it also sets the >> > "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does >> not do >> > that. I have just tried to manually change the character set and remove >> > those definitions in Visual Studio and it worked just fine. Any Idea if >> > this is intended by us or how we can prevent it? Maybe in CMake? >> >> The only setting for UNICODE i see is in >> development/Win32/vld/cmake/CMakeLists.txt >> This is used, if LYX_VLD is set. But this should be OFF on default. >> > > Thank you for your response. Actually it is Qt6 after all, I just tested > on a minimal example, it seems that Windows GUI applications are indeed > defaulted to UNICODE on Qt6. I also just found in the keynote here: > https://www.qtdesktopdays.com/wp-content/uploads/2020/09/keynote.pdf > > QtCore classes can now only deal with Unicode encodings > –For other encodings: QTextCodec in Qt5Compat > > Don't really understand what that really means for LyX. But Qt5Compat is > used, so I hope it will be fine. I will ask in the Qt Forum how the UNICODE > default can be deactivated. > There was a bug report already: https://bugreports.qt.io/browse/QTBUG-89951 apparently the unicode default will stay for all WIN32 (Windows GUI) applications and it will be possible to disable only with the next (6.1.1) release. But I also think that the "universal" function calls (CreateNamedPipe() and WaitNamedPipe()) should be made specific (CreateNamedPipeA() and WaitNamedPipeA()), because the arguments are also specific (c_str() always returns const char*). I have attached the patch showing it, the patch alone fixes the compilation with unicode definition (can I commit it?). Once Qt 6.1.1 releases though, I will create a patch to disable unicode in CMake again. -- Eugene -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Qt6 sets UNICODE on Windows
Am Sa., 29. Mai 2021 um 10:22 Uhr schrieb Kornel Benko : > Am Sat, 29 May 2021 09:56:06 +0200 > schrieb Yu Jin : > > > this is connected to the Beta 1 tarballs, trying to build LyX I stumbled > > across this: > > [image: grafik.png] > > Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when > > configuring without LYX_CONSOLE. It does that by setting the character > set > > to Unicode (as shown in the screenshot above) and it also sets the > > "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does not > do > > that. I have just tried to manually change the character set and remove > > those definitions in Visual Studio and it worked just fine. Any Idea if > > this is intended by us or how we can prevent it? Maybe in CMake? > > The only setting for UNICODE i see is in > development/Win32/vld/cmake/CMakeLists.txt > This is used, if LYX_VLD is set. But this should be OFF on default. > Thank you for your response. Actually it is Qt6 after all, I just tested on a minimal example, it seems that Windows GUI applications are indeed defaulted to UNICODE on Qt6. I also just found in the keynote here: https://www.qtdesktopdays.com/wp-content/uploads/2020/09/keynote.pdf QtCore classes can now only deal with Unicode encodings –For other encodings: QTextCodec in Qt5Compat Don't really understand what that really means for LyX. But Qt5Compat is used, so I hope it will be fine. I will ask in the Qt Forum how the UNICODE default can be deactivated. -- Eugene -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Qt6 sets UNICODE on Windows
Am Sat, 29 May 2021 09:56:06 +0200 schrieb Yu Jin : > this is connected to the Beta 1 tarballs, trying to build LyX I stumbled > across this: > [image: grafik.png] > Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when > configuring without LYX_CONSOLE. It does that by setting the character set > to Unicode (as shown in the screenshot above) and it also sets the > "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does not do > that. I have just tried to manually change the character set and remove > those definitions in Visual Studio and it worked just fine. Any Idea if > this is intended by us or how we can prevent it? Maybe in CMake? The only setting for UNICODE i see is in development/Win32/vld/cmake/CMakeLists.txt This is used, if LYX_VLD is set. But this should be OFF on default. Kornel pgp6MRTxFLgjj.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Qt6 sets UNICODE on Windows
this is connected to the Beta 1 tarballs, trying to build LyX I stumbled across this: [image: grafik.png] Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when configuring without LYX_CONSOLE. It does that by setting the character set to Unicode (as shown in the screenshot above) and it also sets the "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does not do that. I have just tried to manually change the character set and remove those definitions in Visual Studio and it worked just fine. Any Idea if this is intended by us or how we can prevent it? Maybe in CMake? -- Eugene -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel