summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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());
}
/*