Changeset 561 for trunk/src/activeqt/container
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/activeqt/container/container.pro
r2 r561 22 22 win32-g++:LIBS += -luuid 23 23 24 contains(QT_EDITION, OpenSource|Console) { 25 message( "You are not licensed to use ActiveQt." ) 26 } else { 27 HEADERS = ../control/qaxaggregated.h \ 28 qaxbase.h \ 29 qaxwidget.h \ 30 qaxobject.h \ 31 qaxscript.h \ 32 qaxselect.h \ 33 ../shared/qaxtypes.h 24 HEADERS = ../control/qaxaggregated.h \ 25 qaxbase.h \ 26 qaxwidget.h \ 27 qaxobject.h \ 28 qaxscript.h \ 29 qaxselect.h \ 30 ../shared/qaxtypes.h 34 31 35 SOURCES =qaxbase.cpp \36 37 38 39 40 41 42 32 SOURCES = qaxbase.cpp \ 33 qaxdump.cpp \ 34 qaxwidget.cpp \ 35 qaxobject.cpp \ 36 qaxscript.cpp \ 37 qaxscriptwrapper.cpp \ 38 qaxselect.cpp \ 39 ../shared/qaxtypes.cpp 43 40 44 FORMS = qaxselect.ui 45 } 41 FORMS = qaxselect.ui -
trunk/src/activeqt/container/qaxbase.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. … … 40 41 //#define QAX_NO_CLASSINFO 41 42 42 #ifndef UNICODE43 #define UNICODE44 #endif45 46 43 #define QT_CHECK_STATE 47 44 … … 175 172 // get the Dispatch ID from the object 176 173 QString unicodeName = QLatin1String(name); 177 OLECHAR *names = ( TCHAR*)unicodeName.utf16();174 OLECHAR *names = (wchar_t*)unicodeName.utf16(); 178 175 disp->GetIDsOfNames(IID_NULL, &names, 1, LOCALE_USER_DEFAULT, &dispid); 179 176 if (dispid != DISPID_UNKNOWN) … … 422 419 } else { 423 420 argv[p + 1] = const_cast<void*>(varp[p + 1].constData()); 424 if (ptype.endsWith( "*")) {421 if (ptype.endsWith('*')) { 425 422 argv_pointer[p + 1] = argv[p + 1]; 426 423 argv[p + 1] = argv_pointer + p + 1; … … 639 636 typeinfo->GetNames(dispID, &names, 1, &cNames); 640 637 if (cNames) { 641 propname = QString::from Utf16((const ushort *)names).toLatin1();638 propname = QString::fromWCharArray(names).toLatin1(); 642 639 SysFreeString(names); 643 640 } … … 649 646 const QMetaProperty prop = mo->property(index); 650 647 propsignal += prop.typeName(); 651 propsignal += ")";648 propsignal += ')'; 652 649 addProperty(dispID, propname, propsignal); 653 650 … … 913 910 \brief the name of the COM object wrapped by this QAxBase object. 914 911 915 Setting this property initi lializes the COM object. Any COM object912 Setting this property initializes the COM object. Any COM object 916 913 previously set is shut down. 917 914 … … 973 970 if (uuid.isNull()) { 974 971 CLSID clsid; 975 HRESULT res = CLSIDFromProgID(( WCHAR*)c.utf16(), &clsid);972 HRESULT res = CLSIDFromProgID((wchar_t*)c.utf16(), &clsid); 976 973 if (res == S_OK) 977 974 search = QUuid(clsid).toString(); … … 1138 1135 if (!verb.lpszVerbName) 1139 1136 continue; 1140 QString verbName = QString::from Utf16((const ushort *)verb.lpszVerbName);1137 QString verbName = QString::fromWCharArray(verb.lpszVerbName); 1141 1138 if (!verbName.isEmpty()) 1142 1139 d->verbs.insert(verbName, verb.lVerb); … … 1266 1263 BSTR licenseKey; 1267 1264 factory2->RequestLicKey(0, &licenseKey); 1268 QString qlicenseKey = QString::from Utf16((const ushort *)licenseKey);1265 QString qlicenseKey = QString::fromWCharArray(licenseKey); 1269 1266 SysFreeString(licenseKey); 1270 1267 qWarning("Use license key is '%s' to create object on unlicensed machine.", … … 1276 1273 BSTR licenseKey; 1277 1274 factory2->RequestLicKey(0, &licenseKey); 1278 QString qlicenseKey = QString::from Utf16((const ushort *)licenseKey);1275 QString qlicenseKey = QString::fromWCharArray(licenseKey); 1279 1276 SysFreeString(licenseKey); 1280 1277 … … 1436 1433 serverInfo.dwReserved2 = 0; 1437 1434 serverInfo.pAuthInfo = &authInfo; 1438 serverInfo.pwszName = ( WCHAR*)server.utf16();1435 serverInfo.pwszName = (wchar_t*)server.utf16(); 1439 1436 1440 1437 IClassFactory *factory = 0; … … 1661 1658 void addProperty(const QByteArray &type, const QByteArray &name, uint flags) 1662 1659 { 1660 QByteArray propertyType(type); 1661 if (propertyType.endsWith('&')) 1662 propertyType.chop(1); 1663 1663 1664 Property &prop = property_list[name]; 1664 if (! type.isEmpty() && type != "HRESULT") {1665 prop.type = replaceType( type);1666 if (prop.type != type)1667 prop.realType = type;1665 if (!propertyType.isEmpty() && propertyType != "HRESULT") { 1666 prop.type = replaceType(propertyType); 1667 if (prop.type != propertyType) 1668 prop.realType = propertyType; 1668 1669 } 1669 1670 if (flags & Writable) … … 1744 1745 return 0; 1745 1746 1746 className = QString::from Utf16((const ushort *)bstr);1747 className = QString::fromWCharArray(bstr); 1747 1748 SysFreeString(bstr); 1748 1749 … … 1765 1766 return 0; 1766 1767 1767 className = QString::from Utf16((const ushort *)bstr);1768 className = QString::fromWCharArray(bstr); 1768 1769 SysFreeString(bstr); 1769 1770 … … 1792 1793 1793 1794 interfaceInfo->GetDocumentation(-1, &bstr, 0, 0, 0); 1794 QString interfaceName = QString::from Utf16((const ushort *)bstr);1795 QString interfaceName = QString::fromWCharArray(bstr); 1795 1796 SysFreeString(bstr); 1796 1797 QByteArray key; … … 1840 1841 BSTR bstr; 1841 1842 typelib->GetDocumentation(-1, &bstr, 0, 0, 0); 1842 current_typelib = QString::from Utf16((const ushort *)bstr).toLatin1();1843 current_typelib = QString::fromWCharArray(bstr).toLatin1(); 1843 1844 SysFreeString(bstr); 1844 1845 } … … 1888 1889 BSTR typelibname = 0; 1889 1890 usertypelib->GetDocumentation(-1, &typelibname, 0, 0, 0); 1890 QByteArray typeLibName = QString::from Utf16((const ushort *)typelibname).toLatin1();1891 QByteArray typeLibName = QString::fromWCharArray(typelibname).toLatin1(); 1891 1892 SysFreeString(typelibname); 1892 1893 … … 1894 1895 BSTR usertypename = 0; 1895 1896 usertypelib->GetDocumentation(index, &usertypename, 0, 0, 0); 1896 QByteArray userTypeName = QString::from Utf16((const ushort *)usertypename).toLatin1();1897 QByteArray userTypeName = QString::fromWCharArray(usertypename).toLatin1(); 1897 1898 SysFreeString(usertypename); 1898 1899 … … 2043 2044 case VT_UINT: 2044 2045 case VT_CY: 2045 str += "&";2046 str += '&'; 2046 2047 break; 2047 2048 case VT_PTR: 2048 2049 if (str == "QFont" || str == "QPixmap") { 2049 str += "&";2050 str += '&'; 2050 2051 break; 2051 2052 } else if (str == "void*") { … … 2056 2057 default: 2057 2058 if (str == "QColor") 2058 str += "&";2059 str += '&'; 2059 2060 else if (str == "QDateTime") 2060 str += "&";2061 str += '&'; 2061 2062 else if (str == "QVariantList") 2062 str += "&";2063 str += '&'; 2063 2064 else if (str == "QByteArray") 2064 str += "&";2065 str += '&'; 2065 2066 else if (str == "QStringList") 2066 str += "&";2067 str += '&'; 2067 2068 else if (!str.isEmpty() && hasEnum(str)) 2068 str += "&";2069 str += '&'; 2069 2070 else if (!str.isEmpty() && str != "QFont" && str != "QPixmap" && str != "QVariant") 2070 str += "*";2071 str += '*'; 2071 2072 } 2072 2073 break; … … 2086 2087 str = guessTypes(tdesc.lpadesc->tdescElem, info, function); 2087 2088 if (!str.isEmpty()) 2088 str = "QList<" + str + ">";2089 str = "QList<" + str + '>'; 2089 2090 break; 2090 2091 } … … 2094 2095 if (!str.isEmpty()) { 2095 2096 for (int index = 0; index < tdesc.lpadesc->cDims; ++index) 2096 str += "[" + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + "]";2097 str += '[' + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + ']'; 2097 2098 } 2098 2099 break; … … 2111 2112 2112 2113 if (tdesc.vt & VT_BYREF) 2113 str += "&";2114 str += '&'; 2114 2115 2115 2116 str.replace("&*", "**"); … … 2138 2139 QString coClassIDstr = iidnames.value(QLatin1String("/CLSID/") + coClassID + QLatin1String("/Default"), coClassID).toString(); 2139 2140 addClassInfo("CoClass", coClassIDstr.isEmpty() ? coClassID.toLatin1() : coClassIDstr.toLatin1()); 2140 QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + "."+ QByteArray::number(typeattr->wMinorVerNum);2141 QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + '.' + QByteArray::number(typeattr->wMinorVerNum); 2141 2142 if (version != "0.0") 2142 2143 addClassInfo("Version", version); … … 2171 2172 QString version = *vit; 2172 2173 ++vit; 2173 tlfile = controls.value(QLatin1 String("/") + version + QLatin1String("/0/win32/.")).toString();2174 tlfile = controls.value(QLatin1Char('/') + version + QLatin1String("/0/win32/.")).toString(); 2174 2175 } 2175 2176 controls.endGroup(); … … 2284 2285 QByteArray enumName; 2285 2286 if (typelib->GetDocumentation(i, &enumname, 0, 0, 0) == S_OK) { 2286 enumName = QString::from Utf16((const ushort *)enumname).toLatin1();2287 enumName = QString::fromWCharArray(enumname).toLatin1(); 2287 2288 SysFreeString(enumname); 2288 2289 } else { … … 2307 2308 enuminfo->GetNames(memid, &valuename, 1, &maxNamesOut); 2308 2309 if (maxNamesOut) { 2309 valueName = QString::from Utf16((const ushort *)valuename).toLatin1();2310 valueName = QString::fromWCharArray(valuename).toLatin1(); 2310 2311 SysFreeString(valuename); 2311 2312 } else { … … 2344 2345 QByteArray signalName(function); 2345 2346 signalName += "Changed"; 2346 QByteArray signalProto = signalName + "(" + replaceType(type) + ")";2347 QByteArray signalProto = signalName + '(' + replaceType(type) + ')'; 2347 2348 if (!hasSignal(signalProto)) 2348 2349 addSignal(signalProto, function); … … 2361 2362 prototype[0] = toupper(prototype[0]); 2362 2363 } 2363 prototype = set + prototype + "(" + propertyType(property) + ")";2364 prototype = set + prototype + '(' + propertyType(property) + ')'; 2364 2365 if (!hasSlot(prototype)) 2365 2366 addSlot(0, prototype, property); … … 2378 2379 } 2379 2380 2380 prototype = function + "(";2381 prototype = function + '('; 2381 2382 if (funcdesc->invkind == INVOKE_FUNC && type == hresult) 2382 2383 type = 0; … … 2392 2393 QByteArray ptype = guessTypes(tdesc, typeinfo, function); 2393 2394 if (pdesc.wParamFlags & PARAMFLAG_FRETVAL) { 2394 if (ptype.endsWith( "&")) {2395 if (ptype.endsWith('&')) { 2395 2396 ptype.truncate(ptype.length() - 1); 2396 2397 } else if (ptype.endsWith("**")) { … … 2400 2401 } else { 2401 2402 prototype += ptype; 2402 if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith( "&") && !ptype.endsWith("**"))2403 prototype += "&";2403 if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith('&') && !ptype.endsWith("**")) 2404 prototype += '&'; 2404 2405 if (optional || pdesc.wParamFlags & PARAMFLAG_FOPT) 2405 2406 paramName += "=0"; … … 2411 2412 } 2412 2413 if (p < funcdesc->cParams && !(pdesc.wParamFlags & PARAMFLAG_FRETVAL)) 2413 prototype += ",";2414 prototype += ','; 2414 2415 } 2415 2416 2416 2417 if (!prototype.isEmpty()) { 2417 if (prototype. right(1) == ",") {2418 if (prototype.endsWith(',')) { 2418 2419 if (funcdesc->invkind == INVOKE_PROPERTYPUT && p == funcdesc->cParams) { 2419 2420 TYPEDESC tdesc = funcdesc->lprgelemdescParam[p-1].tdesc; 2420 2421 QByteArray ptype = guessTypes(tdesc, typeinfo, function); 2421 2422 prototype += ptype; 2422 prototype += ")";2423 prototype += ')'; 2423 2424 parameters << "rhs"; 2424 2425 } else { … … 2426 2427 } 2427 2428 } else { 2428 prototype += ")";2429 prototype += ')'; 2429 2430 } 2430 2431 } … … 2464 2465 int p; 2465 2466 for (p = 0; p < (int)maxNamesOut; ++p) { 2466 names << QString::from Utf16((const ushort *)bstrNames[p]).toLatin1();2467 names << QString::fromWCharArray(bstrNames[p]).toLatin1(); 2467 2468 SysFreeString(bstrNames[p]); 2468 2469 } … … 2574 2575 if (defargs) { 2575 2576 parameters.takeLast(); 2576 int lastParam = prototype.lastIndexOf( ",");2577 int lastParam = prototype.lastIndexOf(','); 2577 2578 if (lastParam == -1) 2578 lastParam = prototype.indexOf( "(") + 1;2579 lastParam = prototype.indexOf('(') + 1; 2579 2580 prototype.truncate(lastParam); 2580 prototype += ")";2581 prototype += ')'; 2581 2582 } 2582 2583 } while (defargs); … … 2591 2592 BSTR bstrDocu; 2592 2593 info->GetDocumentation(funcdesc->memid, 0, &bstrDocu, 0, 0); 2593 QString strDocu = QString::from Utf16((const ushort*)bstrDocu);2594 QString strDocu = QString::fromWCharArray(bstrDocu); 2594 2595 SysFreeString(bstrDocu); 2595 2596 if (!!strDocu) 2596 desc += "[" + strDocu + "]";2597 desc += "\n";2597 desc += '[' + strDocu + ']'; 2598 desc += '\n'; 2598 2599 #endif 2599 2600 typeinfo->ReleaseFuncDesc(funcdesc); … … 2638 2639 uint flags = 0; 2639 2640 2640 variableName = QString::from Utf16((const ushort *)bstrName).toLatin1();2641 variableName = QString::fromWCharArray(bstrName).toLatin1(); 2641 2642 SysFreeString(bstrName); 2642 2643 … … 2674 2675 BSTR bstrDocu; 2675 2676 info->GetDocumentation(vardesc->memid, 0, &bstrDocu, 0, 0); 2676 QString strDocu = QString::from Utf16((const ushort*)bstrDocu);2677 QString strDocu = QString::fromWCharArray(bstrDocu); 2677 2678 SysFreeString(bstrDocu); 2678 2679 if (!!strDocu) 2679 desc += "[" + strDocu + "]";2680 desc += "\n";2680 desc += '[' + strDocu + ']'; 2681 desc += '\n'; 2681 2682 #endif 2682 2683 typeinfo->ReleaseVarDesc(vardesc); … … 2797 2798 int p; 2798 2799 for (p = 0; p < (int)maxNamesOut; ++p) { 2799 names << QString::from Utf16((const ushort *)bstrNames[p]).toLatin1();2800 names << QString::fromWCharArray(bstrNames[p]).toLatin1(); 2800 2801 SysFreeString(bstrNames[p]); 2801 2802 } … … 2821 2822 BSTR bstrDocu; 2822 2823 eventinfo->GetDocumentation(funcdesc->memid, 0, &bstrDocu, 0, 0); 2823 QString strDocu = QString::from Utf16((const ushort*)bstrDocu);2824 QString strDocu = QString::fromWCharArray(bstrDocu); 2824 2825 SysFreeString(bstrDocu); 2825 2826 if (!!strDocu) 2826 desc += "[" + strDocu + "]";2827 desc += "\n";2827 desc += '[' + strDocu + ']'; 2828 desc += '\n'; 2828 2829 #endif 2829 2830 eventinfo->ReleaseFuncDesc(funcdesc); … … 2979 2980 BSTR bstr; 2980 2981 typelib->GetDocumentation(-1, &bstr, 0, 0, 0); 2981 current_typelib = QString::from Utf16((const ushort *)bstr).toLatin1();2982 current_typelib = QString::fromWCharArray(bstr).toLatin1(); 2982 2983 SysFreeString(bstr); 2983 2984 } … … 3205 3206 3206 3207 static QMetaObject qaxobject_staticMetaObject = { 3207 &QObject::staticMetaObject, qt_meta_stringdata_QAxBase,3208 qt_meta_data_QAxBase, 0 3208 { &QObject::staticMetaObject, qt_meta_stringdata_QAxBase, 3209 qt_meta_data_QAxBase, 0 } 3209 3210 }; 3210 3211 static QMetaObject qaxwidget_staticMetaObject = { 3211 &QWidget::staticMetaObject, qt_meta_stringdata_QAxBase,3212 qt_meta_data_QAxBase, 0 3212 { &QWidget::staticMetaObject, qt_meta_stringdata_QAxBase, 3213 qt_meta_data_QAxBase, 0 } 3213 3214 }; 3214 3215 … … 3388 3389 3389 3390 code = exc->wCode ? exc->wCode : exc->scode; 3390 source = QString::from Utf16((const ushort *)exc->bstrSource);3391 desc = QString::from Utf16((const ushort *)exc->bstrDescription);3392 help = QString::from Utf16((const ushort *)exc->bstrHelpFile);3391 source = QString::fromWCharArray(exc->bstrSource); 3392 desc = QString::fromWCharArray(exc->bstrDescription); 3393 help = QString::fromWCharArray(exc->bstrHelpFile); 3393 3394 uint helpContext = exc->dwHelpContext; 3394 3395 … … 3693 3694 id = internalInvoke(call, id, v); 3694 3695 break; 3696 default: 3697 break; 3695 3698 } 3696 3699 break; … … 3706 3709 case QMetaObject::QueryPropertyUser: 3707 3710 id -= mo->propertyCount(); 3711 break; 3712 default: 3708 3713 break; 3709 3714 } … … 3906 3911 paramType = d->metaobj->paramType(normFunction, i, &out); 3907 3912 3908 if ( !parse && d->useMetaObject && var.type() == QVariant::String|| var.type() == QVariant::ByteArray) {3913 if ((!parse && d->useMetaObject && var.type() == QVariant::String) || var.type() == QVariant::ByteArray) { 3909 3914 int enumIndex =mo->indexOfEnumerator(paramType); 3910 3915 if (enumIndex != -1) { … … 4225 4230 return E_POINTER; 4226 4231 4227 QString property = QString::from Utf16((const ushort *)name);4232 QString property = QString::fromWCharArray(name); 4228 4233 QVariant qvar = map.value(property); 4229 4234 QVariantToVARIANT(qvar, *var); … … 4234 4239 if (!var) 4235 4240 return E_POINTER; 4236 QString property = QString::from Utf16((const ushort *)name);4241 QString property = QString::fromWCharArray(name); 4237 4242 QVariant qvar = VARIANTToQVariant(*var, 0); 4238 4243 map[property] = qvar; … … 4395 4400 QObject *object = qObject(); 4396 4401 if (QMetaType::type(cn)) 4397 qvar = QVariant(qRegisterMetaType<QObject*>(cn + "*"), &object);4398 // qVariantSetValue(qvar, qObject(), cn + "*");4402 qvar = QVariant(qRegisterMetaType<QObject*>(cn + '*'), &object); 4403 // qVariantSetValue(qvar, qObject(), cn + '*'); 4399 4404 } 4400 4405 -
trunk/src/activeqt/container/qaxbase.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. -
trunk/src/activeqt/container/qaxdump.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. … … 67 68 ulong helpContext; 68 69 HRESULT hres = typeInfo->GetDocumentation(memId, 0, &docStringBstr, &helpContext, &helpFileBstr); 69 QString docString = QString::from Utf16((const ushort *)docStringBstr);70 QString helpFile = QString::from Utf16((const ushort *)helpFileBstr);70 QString docString = QString::fromWCharArray(docStringBstr); 71 QString helpFile = QString::fromWCharArray(helpFileBstr); 71 72 SysFreeString(docStringBstr); 72 73 SysFreeString(helpFileBstr); … … 95 96 96 97 if (p < parameterNames.count()) 97 prototype += " "+ parameterNames.at(p);98 prototype += ' ' + parameterNames.at(p); 98 99 99 100 if (numDefArgs >= parameterTypes.count() - p) … … 102 103 prototype += ", "; 103 104 } 104 prototype += ")";105 prototype += ')'; 105 106 106 107 return prototype; … … 197 198 prototype = namedPrototype(slot.parameterTypes(), slot.parameterNames()); 198 199 QString detail = QString::fromLatin1("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + 199 Q String::fromLatin1(returntype.constData()) + QLatin1String(" ") +200 Q String::fromLatin1(name.constData()) + QLatin1String(" ") +200 QLatin1String(returntype.constData()) + QLatin1Char(' ') + 201 QLatin1String(name.constData()) + QLatin1Char(' ') + 201 202 QString::fromLatin1(prototype.constData()) + QLatin1String("<tt> [slot]</tt></h3>\n"); 202 203 prototype = namedPrototype(slot.parameterTypes(), QList<QByteArray>()); … … 221 222 } 222 223 if (returntype != "void") 223 detail += Q String::fromLatin1(returntype.constData()) + QLatin1String(" result = ");224 detail += QLatin1String("object->") + Q String::fromLatin1(functionToCall.constData()) +225 QLatin1String("(\"" + name + prototype + "\"");224 detail += QLatin1String(returntype.constData()) + QLatin1String(" result = "); 225 detail += QLatin1String("object->") + QLatin1String(functionToCall.constData()) + 226 QLatin1String("(\"" + name + prototype + '\"'); 226 227 if (hasParams) 227 228 detail += QLatin1String(", params"); 228 detail += QLatin1 String(")");229 detail += QLatin1Char(')'); 229 230 if (returntype != "void" && returntype != "QAxObject *" && returntype != "QVariant") 230 detail += QLatin1 String(".") + QString::fromLatin1(toType(returntype));231 detail += QLatin1Char('.') + QLatin1String(toType(returntype)); 231 232 detail += QLatin1String(";</pre>\n"); 232 233 } else { … … 263 264 stream << "<li>void <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl; 264 265 265 QString detail = QLatin1String("<h3><a name=") + Q String::fromLatin1(name.constData()) + QLatin1String("></a>void ") +266 Q String::fromLatin1(name.constData()) + QLatin1String(" ") +267 Q String::fromLatin1(prototype.constData()) + QLatin1String("<tt> [signal]</tt></h3>\n");266 QString detail = QLatin1String("<h3><a name=") + QLatin1String(name.constData()) + QLatin1String("></a>void ") + 267 QLatin1String(name.constData()) + QLatin1Char(' ') + 268 QLatin1String(prototype.constData()) + QLatin1String("<tt> [signal]</tt></h3>\n"); 268 269 if (typeLib) { 269 270 interCount = 0; … … 312 313 stream << "<li>" << type << " <a href=\"#" << name << "\"><b>" << name << "</b></a>;</li>" << endl; 313 314 QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + 314 Q String::fromLatin1(type.constData()) +315 QLatin1 String(" ") + QString::fromLatin1(name.constData()) + QLatin1String("</h3>\n");315 QLatin1String(type.constData()) + 316 QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1String("</h3>\n"); 316 317 detail += docuFromName(typeInfo, QString::fromLatin1(name)); 317 318 QVariant::Type vartype = QVariant::nameToType(type); … … 327 328 detail += QLatin1String("\tint val = "); 328 329 else 329 detail += QLatin1 String("\t") + QString::fromLatin1(type.constData()) + QLatin1String(" val = ");330 detail += QLatin1String("object->property(\"") + Q String::fromLatin1(name.constData()) +331 QLatin1String("\").") + Q String::fromLatin1(toType(type).constData()) + QLatin1String(";\n");330 detail += QLatin1Char('\t') + QLatin1String(type.constData()) + QLatin1String(" val = "); 331 detail += QLatin1String("object->property(\"") + QLatin1String(name.constData()) + 332 QLatin1String("\").") + QLatin1String(toType(type).constData()) + QLatin1String(";\n"); 332 333 detail += QLatin1String("</pre>\n"); 333 334 } else if (type == "IDispatch*" || type == "IUnknown*") { 334 335 detail += QLatin1String("<p>Get the subobject using querySubObject:<pre>\n"); 335 detail += QLatin1String("\tQAxObject *") + Q String::fromLatin1(name.constData()) +336 QLatin1String(" = object->querySubObject(\"") + Q String::fromLatin1(name.constData()) + QLatin1String("\");\n");336 detail += QLatin1String("\tQAxObject *") + QLatin1String(name.constData()) + 337 QLatin1String(" = object->querySubObject(\"") + QLatin1String(name.constData()) + QLatin1String("\");\n"); 337 338 detail += QLatin1String("</pre>\n"); 338 339 } else { -
trunk/src/activeqt/container/qaxobject.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. … … 38 39 ****************************************************************************/ 39 40 40 #ifndef UNICODE41 #define UNICODE42 #endif43 44 41 #include "qaxobject.h" 45 42 … … 127 124 128 125 /*! 129 \ reimp126 \internal 130 127 */ 131 128 const QMetaObject *QAxObject::metaObject() const … … 135 132 136 133 /*! 137 \ reimp134 \internal 138 135 */ 139 136 const QMetaObject *QAxObject::parentMetaObject() const … … 153 150 154 151 /*! 155 \ reimp152 \internal 156 153 */ 157 154 const char *QAxObject::className() const … … 161 158 162 159 /*! 163 \ reimp160 \internal 164 161 */ 165 162 int QAxObject::qt_metacall(QMetaObject::Call call, int id, void **v) -
trunk/src/activeqt/container/qaxobject.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. -
trunk/src/activeqt/container/qaxscript.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. … … 38 39 ****************************************************************************/ 39 40 40 #ifndef UNICODE41 #define UNICODE42 #endif43 44 41 #include "qaxscript.h" 45 42 … … 195 192 return E_POINTER; 196 193 197 QAxBase *object = script->findObject(QString::from Utf16((const ushort*)pstrName));194 QAxBase *object = script->findObject(QString::fromWCharArray(pstrName)); 198 195 if (!object) 199 196 return TYPE_E_ELEMENTNOTFOUND; … … 237 234 if (exception) 238 235 emit script->finished(exception->wCode, 239 QString::from Utf16((const ushort*)exception->bstrSource),240 QString::from Utf16((const ushort*)exception->bstrDescription),241 QString::from Utf16((const ushort*)exception->bstrHelpFile)236 QString::fromWCharArray(exception->bstrSource), 237 QString::fromWCharArray(exception->bstrDescription), 238 QString::fromWCharArray(exception->bstrHelpFile) 242 239 ); 243 240 return S_OK; … … 288 285 HRESULT hres = error->GetSourceLineText(&bstrLineText); 289 286 if (hres == S_OK) { 290 lineText = QString::from Utf16((const ushort*)bstrLineText);287 lineText = QString::fromWCharArray(bstrLineText); 291 288 SysFreeString(bstrLineText); 292 289 } … … 295 292 SysFreeString(exception.bstrHelpFile); 296 293 297 emit script->error(exception.wCode, QString::from Utf16((const ushort*)exception.bstrDescription), lineNumber, lineText);294 emit script->error(exception.wCode, QString::fromWCharArray(exception.bstrDescription), lineNumber, lineText); 298 295 299 296 return S_OK; … … 464 461 465 462 CLSID clsid; 466 HRESULT hres = CLSIDFromProgID(( WCHAR*)script_language.utf16(), &clsid);463 HRESULT hres = CLSIDFromProgID((wchar_t*)script_language.utf16(), &clsid); 467 464 if(FAILED(hres)) 468 465 return false; … … 610 607 return; 611 608 612 engine->AddNamedItem(( WCHAR*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);609 engine->AddNamedItem((wchar_t*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE); 613 610 #endif 614 611 } … … 1174 1171 1175 1172 CLSID clsid; 1176 HRESULT hres = CLSIDFromProgID(( WCHAR*)name.utf16(), &clsid);1173 HRESULT hres = CLSIDFromProgID((wchar_t*)name.utf16(), &clsid); 1177 1174 if (hres != S_OK) 1178 1175 return false; … … 1204 1201 1205 1202 allFiles += QLatin1String(" *") + engine.extension; 1206 specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1 String(")");1207 } 1208 allFiles += QLatin1 String(")");1203 specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')'); 1204 } 1205 allFiles += QLatin1Char(')'); 1209 1206 1210 1207 return allFiles + specialFiles + QLatin1String(";;All Files (*.*)"); -
trunk/src/activeqt/container/qaxscript.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. -
trunk/src/activeqt/container/qaxscriptwrapper.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. -
trunk/src/activeqt/container/qaxselect.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. … … 53 54 { 54 55 HKEY classes_key; 55 QT_WA_INLINE( 56 RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &classes_key), 57 RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &classes_key)); 56 RegOpenKeyEx(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &classes_key); 58 57 if (!classes_key) 59 58 return; … … 61 60 DWORD index = 0; 62 61 LONG result = 0; 63 TCHARbuffer[256];64 DWORD szBuffer = sizeof(buffer) ;62 wchar_t buffer[256]; 63 DWORD szBuffer = sizeof(buffer) / sizeof(wchar_t); 65 64 FILETIME ft; 66 65 do { 67 result = QT_WA_INLINE( 68 RegEnumKeyExW(classes_key, index, (wchar_t*)&buffer, &szBuffer, 0, 0, 0, &ft), 69 RegEnumKeyExA(classes_key, index, (char*)&buffer, &szBuffer, 0, 0, 0, &ft)); 70 szBuffer = sizeof(buffer); 66 result = RegEnumKeyEx(classes_key, index, buffer, &szBuffer, 0, 0, 0, &ft); 67 szBuffer = sizeof(buffer) / sizeof(wchar_t); 71 68 if (result == ERROR_SUCCESS) { 72 69 HKEY sub_key; 73 QString clsid = QT_WA_INLINE(QString::fromUtf16((ushort*)buffer), QString::fromLocal8Bit((char*)buffer)); 74 result = QT_WA_INLINE( 75 RegOpenKeyExW(classes_key, reinterpret_cast<const wchar_t *>(QString(clsid + "\\Control").utf16()), 0, KEY_READ, &sub_key), 76 RegOpenKeyA(classes_key, QString(clsid + QLatin1String("\\Control")).toLocal8Bit(), &sub_key)); 70 QString clsid = QString::fromWCharArray(buffer); 71 result = RegOpenKeyEx(classes_key, reinterpret_cast<const wchar_t *>(QString(clsid + "\\Control").utf16()), 0, KEY_READ, &sub_key); 77 72 if (result == ERROR_SUCCESS) { 78 73 RegCloseKey(sub_key); 79 QT_WA_INLINE( 80 RegistryQueryValueW(classes_key, buffer, (LPBYTE)buffer, &szBuffer), 81 RegQueryValueA(classes_key, (char*)buffer, (char*)buffer, (LONG*)&szBuffer)); 82 QString name = QT_WA_INLINE(QString::fromUtf16((ushort*)buffer, szBuffer / sizeof(TCHAR)) , QString::fromLocal8Bit((char*)buffer, szBuffer)); 74 RegistryQueryValue(classes_key, buffer, (LPBYTE)buffer, &szBuffer); 75 QString name = QString::fromWCharArray(buffer); 83 76 84 77 controls << name; … … 87 80 result = ERROR_SUCCESS; 88 81 } 89 szBuffer = sizeof(buffer) ;82 szBuffer = sizeof(buffer) / sizeof(wchar_t); 90 83 ++index; 91 84 } while (result == ERROR_SUCCESS); … … 94 87 } 95 88 96 LONG RegistryQueryValue W(HKEY hKey, LPCWSTR lpSubKey, LPBYTE lpData, LPDWORD lpcbData)89 LONG RegistryQueryValue(HKEY hKey, LPCWSTR lpSubKey, LPBYTE lpData, LPDWORD lpcbData) 97 90 { 98 91 LONG ret = ERROR_FILE_NOT_FOUND; 99 92 HKEY hSubKey = NULL; 100 RegOpenKeyEx W(hKey, lpSubKey, 0, KEY_READ, &hSubKey);93 RegOpenKeyEx(hKey, lpSubKey, 0, KEY_READ, &hSubKey); 101 94 if (hSubKey) { 102 ret = RegQueryValueEx W(hSubKey, 0, 0, 0, lpData, lpcbData);95 ret = RegQueryValueEx(hSubKey, 0, 0, 0, lpData, lpcbData); 103 96 RegCloseKey(hSubKey); 104 97 } -
trunk/src/activeqt/container/qaxselect.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. -
trunk/src/activeqt/container/qaxselect.ui
r2 r561 4 4 ** 5 5 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 6 ** Contact: Qt Software Information (qt-info@nokia.com) 6 ** All rights reserved. 7 ** Contact: Nokia Corporation (qt-info@nokia.com) 7 8 ** 8 9 ** This file is part of the ActiveQt framework of the Qt Toolkit. -
trunk/src/activeqt/container/qaxwidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit. … … 38 39 ****************************************************************************/ 39 40 40 #ifndef UNICODE41 #define UNICODE42 #endif43 44 45 41 #include "qaxwidget.h" 46 42 … … 124 120 125 121 int qt_metacall(QMetaObject::Call, int isignal, void **argv); 122 void* qt_metacast(const char *clname); 123 126 124 inline QAxClientSite *clientSite() const 127 125 { … … 384 382 385 383 private: 386 #if !defined(Q_ OS_WINCE)384 #if !defined(Q_WS_WINCE) 387 385 struct OleMenuItem { 388 386 OleMenuItem(HMENU hm = 0, int ID = 0, QMenu *menu = 0) … … 409 407 410 408 DWORD m_dwOleObject; 411 #if !defined(Q_ OS_WINCE)409 #if !defined(Q_WS_WINCE) 412 410 HWND m_menuOwner; 413 411 #endif … … 418 416 QAxWidget *widget; 419 417 QAxHostWidget *host; 420 #if !defined(Q_ OS_WINCE)418 #if !defined(Q_WS_WINCE) 421 419 QPointer<QMenuBar> menuBar; 422 420 QMap<QAction*,OleMenuItem> menuItemMap; … … 468 466 #error "Fix QAbstractEventDispatcher::setEventFilter" 469 467 #endif 470 #if defined(Q_ OS_WINCE)468 #if defined(Q_WS_WINCE) 471 469 static int filter_ref = 0; 472 470 #else 473 static const char *qaxatom ="QAxContainer4_Atom";471 static const wchar_t *qaxatom = L"QAxContainer4_Atom"; 474 472 #endif 475 473 … … 484 482 QAxHostWidget *host = 0; 485 483 while (!host && hwnd) { 486 host = qobject_cast<QAxHostWidget*>(QWidget::find(hwnd)); 484 QWidget *widget = QWidget::find(hwnd); 485 if (widget && widget->inherits("QAxHostWidget")) 486 host = qobject_cast<QAxHostWidget*>(widget); 487 487 hwnd = ::GetParent(hwnd); 488 488 } … … 533 533 534 534 QAxClientSite::QAxClientSite(QAxWidget *c) 535 : ref(1), widget(c), host(0), eventTranslated(true)535 : eventTranslated(true), ref(1), widget(c), host(0) 536 536 { 537 537 aggregatedObject = widget->createAggregate(); … … 552 552 553 553 m_dwOleObject = 0; 554 #if !defined(Q_ OS_WINCE)554 #if !defined(Q_WS_WINCE) 555 555 m_menuOwner = 0; 556 556 menuBar = 0; … … 715 715 HRESULT result = m_spOleObject->GetUserType(USERCLASSTYPE_SHORT, &userType); 716 716 if (result == S_OK) { 717 widget->setWindowTitle(QString::from Utf16((const ushort *)userType));717 widget->setWindowTitle(QString::fromWCharArray(userType)); 718 718 CoTaskMemFree(userType); 719 719 } … … 982 982 HRESULT WINAPI QAxClientSite::TranslateAccelerator(LPMSG lpMsg, DWORD /*grfModifiers*/) 983 983 { 984 eventTranslated = false;985 984 if (lpMsg->message == WM_KEYDOWN && !lpMsg->wParam) 986 985 return S_OK; 987 QT_WA_INLINE( 988 SendMessage(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam), 989 SendMessageA(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam) 990 ); 986 987 bool ActiveQtDetected = false; 988 bool fromInProcServer = false; 989 #ifdef GWLP_USERDATA 990 LONG_PTR serverType = GetWindowLongPtr(lpMsg->hwnd, GWLP_USERDATA); 991 #else 992 LONG serverType = GetWindowLong(lpMsg->hwnd, GWL_USERDATA); 993 #endif 994 if (serverType == QAX_INPROC_SERVER) { 995 ActiveQtDetected = true; 996 fromInProcServer = true; 997 } else if (serverType == QAX_OUTPROC_SERVER) { 998 ActiveQtDetected = true; 999 fromInProcServer = false; 1000 } 1001 1002 eventTranslated = false; 1003 if (!ActiveQtDetected || !fromInProcServer) { 1004 // if the request is coming from an out-of-proc server or a non ActiveQt server, 1005 // we send the message to the host window. This will make sure this key event 1006 // comes to Qt for processing. 1007 SendMessage(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam); 1008 if (ActiveQtDetected && !fromInProcServer) { 1009 // ActiveQt based servers will need further processing of the event 1010 // (eg. <SPACE> key for a checkbox), so we return false. 1011 return S_FALSE; 1012 } 1013 } 1014 // ActiveQt based in-processes-servers will handle the event properly, so 1015 // we dont need to send this key event to the host. 991 1016 return S_OK; 992 1017 } … … 1133 1158 1134 1159 //**** IOleInPlaceFrame 1135 #if defined(Q_ OS_WINCE)1160 #if defined(Q_WS_WINCE) 1136 1161 HRESULT WINAPI QAxClientSite::InsertMenus(HMENU /*hmenuShared*/, LPOLEMENUGROUPWIDTHS /*lpMenuWidths*/) 1137 1162 { … … 1174 1199 } 1175 1200 1176 static int menuItemEntry(HMENU menu, int index, MENUITEMINFO Aitem, QString &text, QPixmap &/*icon*/)1201 static int menuItemEntry(HMENU menu, int index, MENUITEMINFO item, QString &text, QPixmap &/*icon*/) 1177 1202 { 1178 1203 if (item.fType == MFT_STRING && item.cch) { 1179 char *titlebuf = new char[item.cch+1];1204 wchar_t *titlebuf = new wchar_t[item.cch + 1]; 1180 1205 item.dwTypeData = titlebuf; 1181 1206 item.cch++; 1182 ::GetMenuItemInfo A(menu, index, true, &item);1183 text = QString::from Local8Bit(titlebuf);1184 delete [] titlebuf;1207 ::GetMenuItemInfo(menu, index, true, &item); 1208 text = QString::fromWCharArray(titlebuf); 1209 delete [] titlebuf; 1185 1210 return MFT_STRING; 1186 1211 } … … 1192 1217 QPixmap pixmap(1,1); 1193 1218 QSize sz(MAP_LOGHIM_TO_PIX(bmsize.cx, pixmap.logicalDpiX()), 1194 MAP_LOGHIM_TO_PIX(bmsize.cy, pixmap.logicalDpiY()));1219 MAP_LOGHIM_TO_PIX(bmsize.cy, pixmap.logicalDpiY())); 1195 1220 1196 1221 pixmap.resize(bmsize.cx, bmsize.cy); … … 1216 1241 popup = new QMenu(parent); 1217 1242 for (int i = 0; i < count; ++i) { 1218 MENUITEMINFO Aitem;1219 memset(&item, 0, sizeof(MENUITEMINFO A));1220 item.cbSize = sizeof(MENUITEMINFO A);1243 MENUITEMINFO item; 1244 memset(&item, 0, sizeof(MENUITEMINFO)); 1245 item.cbSize = sizeof(MENUITEMINFO); 1221 1246 item.fMask = MIIM_ID | MIIM_TYPE | MIIM_SUBMENU; 1222 ::GetMenuItemInfo A(subMenu, i, true, &item);1247 ::GetMenuItemInfo(subMenu, i, true, &item); 1223 1248 1224 1249 QAction *action = 0; … … 1296 1321 int count = GetMenuItemCount(hmenuShared); 1297 1322 for (int i = 0; i < count; ++i) { 1298 MENUITEMINFO Aitem;1299 memset(&item, 0, sizeof(MENUITEMINFO A));1300 item.cbSize = sizeof(MENUITEMINFO A);1323 MENUITEMINFO item; 1324 memset(&item, 0, sizeof(MENUITEMINFO)); 1325 item.cbSize = sizeof(MENUITEMINFO); 1301 1326 item.fMask = MIIM_ID | MIIM_TYPE | MIIM_SUBMENU; 1302 ::GetMenuItemInfo A(hmenuShared, i, true, &item);1327 ::GetMenuItemInfo(hmenuShared, i, true, &item); 1303 1328 1304 1329 QAction *action = 0; … … 1380 1405 OleMenuItem oleItem = menuItemMap.value(action); 1381 1406 if (oleItem.hMenu) 1382 ::PostMessage A(m_menuOwner, WM_COMMAND, oleItem.id, 0);1407 ::PostMessage(m_menuOwner, WM_COMMAND, oleItem.id, 0); 1383 1408 return -1; 1384 1409 #endif … … 1405 1430 HRESULT WINAPI QAxClientSite::SetStatusText(LPCOLESTR pszStatusText) 1406 1431 { 1407 QStatusTipEvent tip(QString::from Utf16((const ushort *)(BSTR)pszStatusText));1432 QStatusTipEvent tip(QString::fromWCharArray(pszStatusText)); 1408 1433 QApplication::sendEvent(widget, &tip); 1409 1434 return S_OK; … … 1414 1439 HRESULT WINAPI QAxClientSite::EnableModeless(BOOL fEnable) 1415 1440 { 1441 #if !defined(Q_OS_WINCE) 1442 LockWindowUpdate(host->window()->winId()); 1443 #endif 1416 1444 EnableWindow(host->window()->winId(), fEnable); 1417 1445 … … 1424 1452 } 1425 1453 qt_win_ignoreNextMouseReleaseEvent = false; 1426 1454 #if !defined(Q_OS_WINCE) 1455 LockWindowUpdate(0); 1456 #endif 1427 1457 return S_OK; 1428 1458 } … … 1512 1542 { 1513 1543 AX_DEBUG(QAxClientSite::SetActiveObject); 1514 1515 if (pszObjName && widget) 1516 widget->setWindowTitle(QString::fromUtf16((const ushort *)(BSTR)pszObjName)); 1544 1545 Q_UNUSED(pszObjName); 1546 // we are ignoring the name of the object, as suggested by MSDN documentation 1547 // for IOleInPlaceUIWindow::SetActiveObject(). 1517 1548 1518 1549 if (m_spInPlaceActiveObject) { … … 1624 1655 return axhost->qt_metacall(call, isignal, argv); 1625 1656 return -1; 1657 } 1658 1659 void* QAxHostWidget::qt_metacast(const char *clname) 1660 { 1661 if (!clname) return 0; 1662 if (!qstrcmp(clname,"QAxHostWidget")) 1663 return static_cast<void*>(const_cast< QAxHostWidget*>(this)); 1664 return QWidget::qt_metacast(clname); 1626 1665 } 1627 1666 … … 1953 1992 1954 1993 #if !defined(Q_OS_WINCE) 1955 ATOM filter_ref = FindAtom A(qaxatom);1994 ATOM filter_ref = FindAtom(qaxatom); 1956 1995 #endif 1957 1996 if (!filter_ref) 1958 1997 previous_filter = QAbstractEventDispatcher::instance()->setEventFilter(axc_FilterProc); 1959 1998 #if !defined(Q_OS_WINCE) 1960 AddAtom A(qaxatom);1999 AddAtom(qaxatom); 1961 2000 #else 1962 2001 ++filter_ref; … … 1993 2032 if (!control().isEmpty()) { 1994 2033 #if !defined(Q_OS_WINCE) 1995 ATOM filter_ref = FindAtom A(qaxatom);2034 ATOM filter_ref = FindAtom(qaxatom); 1996 2035 if (filter_ref) 1997 2036 DeleteAtom(filter_ref); 1998 filter_ref = FindAtom A(qaxatom);2037 filter_ref = FindAtom(qaxatom); 1999 2038 if (!filter_ref) { 2000 2039 #else … … 2043 2082 2044 2083 /*! 2045 \ reimp2084 \internal 2046 2085 */ 2047 2086 const QMetaObject *QAxWidget::metaObject() const … … 2051 2090 2052 2091 /*! 2053 \ reimp2092 \internal 2054 2093 */ 2055 2094 const QMetaObject *QAxWidget::parentMetaObject() const … … 2069 2108 2070 2109 /*! 2071 \ reimp2110 \internal 2072 2111 */ 2073 2112 const char *QAxWidget::className() const … … 2077 2116 2078 2117 /*! 2079 \ reimp2118 \internal 2080 2119 */ 2081 2120 int QAxWidget::qt_metacall(QMetaObject::Call call, int id, void **v) -
trunk/src/activeqt/container/qaxwidget.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the ActiveQt framework of the Qt Toolkit.
Note:
See TracChangeset
for help on using the changeset viewer.