Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.2, 4.6.2
-
None
-
Windows 7 with VS 2010
-
b3eca5777543fb6fc97e025b03fe07ed9541c0a5
Description
I modified the funcion QStringToBSTR( ) from
static inline BSTR QStringToBSTR(const QString &str) { BSTR bstrVal; int wlen = str.length()+1; bstrVal = SysAllocStringByteLen(0, wlen*2); memcpy(bstrVal, str.unicode(), sizeof(QChar)*(wlen)); bstrVal[wlen] = 0; return bstrVal; }
to:
static inline BSTR QStringToBSTR(const QString &str) { int wlen = str.length(); if( wlen>0 ) { BSTR bstrVal = SysAllocStringByteLen( (LPCSTR)str.unicode(), wlen*2 ); return bstrVal; } return 0; }
reason:
The new VS 2010 has a new feature to create UI tests using MSAA.
When the VS 2010 UIMap is pointed to a Qt control, this tool shows in "Text" field a /0 in end of text captured.