[vlc-devel] [vlc-commits] qt: use WCHAR instead of TCHAR

Steve Lhomme robux4 at ycbcr.xyz
Wed Apr 3 13:52:59 CEST 2019


On 4/3/2019 1:25 PM, Jean-Baptiste Kempf wrote:
> Again, this is wrong.

No, UNICODE is set so we always use the wide char API. Also see the 
FromWide() that follows. Without UNICODE this would be totally wrong. So 
at least it's coherent with the API it's using.
>
> On Wed, 3 Apr 2019, at 09:56, Steve Lhomme wrote:
>> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Apr  3
>> 09:06:37 2019 +0200| [bb03693ca9dca62cbc0fb77310a05d3ac9a237cf] |
>> committer: Steve Lhomme
>>
>> qt: use WCHAR instead of TCHAR
>>
>> We were already using FromWide on this variable. It cannot work if TCHAR is
>> not wide.
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb03693ca9dca62cbc0fb77310a05d3ac9a237cf
>> ---
>>
>>   modules/gui/qt/components/simple_preferences.cpp | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/modules/gui/qt/components/simple_preferences.cpp
>> b/modules/gui/qt/components/simple_preferences.cpp
>> index d79fdf09f8..914b92f07d 100644
>> --- a/modules/gui/qt/components/simple_preferences.cpp
>> +++ b/modules/gui/qt/components/simple_preferences.cpp
>> @@ -709,7 +709,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf,
>> QWidget *_parent,
>>               if( RegOpenKeyEx( HKEY_CURRENT_USER,
>> TEXT("Software\\VideoLAN\\VLC\\"), 0, KEY_READ, &h_key )
>>                       == ERROR_SUCCESS )
>>               {
>> -                TCHAR szData[256];
>> +                WCHAR szData[256];
>>                   DWORD len = 256;
>>                   if( RegQueryValueEx( h_key, TEXT("Lang"), NULL, NULL,
>> (LPBYTE) &szData, &len ) == ERROR_SUCCESS ) {
>>                       langReg = FromWide( szData );
>>
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>>
> -- 
> Jean-Baptiste Kempf -  President
> +33 672 704 734
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list