Switch wxQt to use UTF-8 for text data transfer via wxDataObject. The result otherwise was less than useful.

This commit is contained in:
Jay Nabonne 2019-01-30 15:03:05 +00:00
parent df38836862
commit ece6626a59
2 changed files with 15 additions and 1 deletions

View File

@ -322,7 +322,7 @@ private:
// ----------------------------------------------------------------------------
#if wxUSE_UNICODE
#if defined(__WXGTK20__) || defined(__WXX11__)
#if defined(__WXGTK20__) || defined(__WXX11__) || defined(__WXQT__)
#define wxNEEDS_UTF8_FOR_TEXT_DATAOBJ
#elif defined(__WXMAC__)
#define wxNEEDS_UTF16_FOR_TEXT_DATAOBJ

View File

@ -157,6 +157,20 @@ wxBitmapDataObject::wxBitmapDataObject( const wxBitmap &WXUNUSED(bitmap) )
{
}
//#############################################################################
// ----------------------------------------------------------------------------
// wxTextDataObject
// ----------------------------------------------------------------------------
#if wxUSE_UNICODE
void wxTextDataObject::GetAllFormats(wxDataFormat *formats,
wxDataObjectBase::Direction WXUNUSED(dir)) const
{
formats[0] = wxDataFormat(wxDF_UNICODETEXT);
formats[1] = wxDataFormat(wxDF_TEXT);
}
#endif
//#############################################################################
wxFileDataObject::wxFileDataObject()