Changeset 59835 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 26, 2016 10:24:40 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
r58866 r59835 255 255 ) 256 256 { 257 strMIMEType = "text/plain"; /** @todo Indicate UTF8 encoding? */ 258 vaType = QVariant::String; 257 /* Use UTF-8, always. */ 258 strMIMEType = "text/plain;charset=utf-8"; 259 vaType = QVariant::String; 259 260 } 260 261 else if ( (pFormatEtc->tymed & TYMED_HGLOBAL) … … 435 436 } 436 437 } 437 else if ( strMIMEType.startsWith("text/plain ")438 else if ( strMIMEType.startsWith("text/plain;charset=utf-8") /* Use UTF-8, always. */ 438 439 && m_vaData.canConvert(QVariant::String)) 439 440 { … … 443 444 444 445 QString strText = m_vaData.toString(); 445 size_t cbSrc = strText.length() * cbCh; 446 Assert(cbSrc); 447 LPCVOID pvSrc = fUnicode 448 ? (void *)strText.unicode() 449 : (void *)strText.toUtf8().constData(); 446 size_t cbSrc = strText.length() * cbCh; 447 LPCVOID pvSrc = fUnicode 448 ? (void *)strText.unicode() 449 : (void *)strText.toUtf8().constData(); 450 451 AssertMsg(cbSrc, ("pvSrc=0x%p, cbSrc=%zu, cbCh=%zu\n", pvSrc, cbSrc, cbCh)); 450 452 AssertPtr(pvSrc); 451 453
Note:
See TracChangeset
for help on using the changeset viewer.