summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2011-10-14 09:47:58 (GMT)
committerJan-Arve Saether <jan-arve.saether@nokia.com>2011-10-14 09:50:48 (GMT)
commitb3eca5777543fb6fc97e025b03fe07ed9541c0a5 (patch)
tree312b23509d2d0eeab2b504af252fa2d9bb7f3c3c /src/gui
parenta5c4ecdeaeeaad4c64dc97a51ded97d8e0561b06 (diff)
downloadQt-b3eca5777543fb6fc97e025b03fe07ed9541c0a5.zip
Qt-b3eca5777543fb6fc97e025b03fe07ed9541c0a5.tar.gz
Qt-b3eca5777543fb6fc97e025b03fe07ed9541c0a5.tar.bz2
Fix bug in QStringToBSTR.
Use the same implementation as found in ActiveQt, which Volker suggested. Task-number: QTBUG-11083
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible_win.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp
index c1bb54b..f404535 100644
--- a/src/gui/accessible/qaccessible_win.cpp
+++ b/src/gui/accessible/qaccessible_win.cpp
@@ -691,14 +691,7 @@ private:
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;
+ return SysAllocStringLen((OLECHAR*)str.unicode(), str.length());
}
/*