summaryrefslogtreecommitdiffstats
path: root/src/activeqt/shared
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2009-07-01 09:50:07 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-07-01 09:51:18 (GMT)
commit22ab94871c4a924e37eca720a1620da2e1a7259d (patch)
tree2a8a065b1fb7db76e2651a0340071dc8d8b666a8 /src/activeqt/shared
parent5db6c3b72d3c28f55f14883767d29db3441b1b66 (diff)
downloadQt-22ab94871c4a924e37eca720a1620da2e1a7259d.zip
Qt-22ab94871c4a924e37eca720a1620da2e1a7259d.tar.gz
Qt-22ab94871c4a924e37eca720a1620da2e1a7259d.tar.bz2
src/activeqt: Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support
Also, buffer sizes passed to Registry APIs were incorrect. Merge-request: 604 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/activeqt/shared')
-rw-r--r--src/activeqt/shared/qaxtypes.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index 916fcca..49aa99c 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -37,11 +37,6 @@
**
****************************************************************************/
-#ifndef UNICODE
-#define UNICODE
-#endif
-
-
#include <ocidl.h>
#include <olectl.h>
@@ -123,7 +118,7 @@ static QFont IFontToQFont(IFont *f)
f->get_Strikethrough(&strike);
f->get_Underline(&underline);
f->get_Weight(&weight);
- QFont font(QString::fromUtf16((const ushort *)name), size.Lo/9750, weight / 97, italic);
+ QFont font(QString::fromWCharArray(name), size.Lo/9750, weight / 97, italic);
font.setBold(bold);
font.setStrikeOut(strike);
font.setUnderline(underline);
@@ -925,10 +920,10 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
QVariant var;
switch(arg.vt) {
case VT_BSTR:
- var = QString::fromUtf16((const ushort *)arg.bstrVal);
+ var = QString::fromWCharArray(arg.bstrVal);
break;
case VT_BSTR|VT_BYREF:
- var = QString::fromUtf16((const ushort *)*arg.pbstrVal);
+ var = QString::fromWCharArray(*arg.pbstrVal);
break;
case VT_BOOL:
var = QVariant((bool)arg.boolVal);
@@ -1245,7 +1240,7 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
for (long i = lBound; i <= uBound; ++i) {
BSTR bstr;
SafeArrayGetElement(array, &i, &bstr);
- strings << QString::fromUtf16((const ushort *)bstr);
+ strings << QString::fromWCharArray(bstr);
SysFreeString(bstr);
}