diff options
Diffstat (limited to 'src/activeqt/container')
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 28 | ||||
-rw-r--r-- | src/activeqt/container/qaxbase.h | 28 | ||||
-rw-r--r-- | src/activeqt/container/qaxdump.cpp | 212 | ||||
-rw-r--r-- | src/activeqt/container/qaxobject.cpp | 6 | ||||
-rw-r--r-- | src/activeqt/container/qaxobject.h | 2 | ||||
-rw-r--r-- | src/activeqt/container/qaxscript.cpp | 8 | ||||
-rw-r--r-- | src/activeqt/container/qaxscript.h | 70 | ||||
-rw-r--r-- | src/activeqt/container/qaxwidget.cpp | 4 | ||||
-rw-r--r-- | src/activeqt/container/qaxwidget.h | 6 |
9 files changed, 182 insertions, 182 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 0d5ab65..11c943c 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -239,7 +239,7 @@ static const char *const type_conversion[][2] = \class QAxEventSink \brief The QAxEventSink class implements the event sink for all - IConnectionPoints implemented in the COM object. + IConnectionPoints implemented in the COM object. */ class QAxEventSink : public IDispatch, public IPropertyNotifySink @@ -292,14 +292,14 @@ public: void addSignal(DISPID memid, const char *name) { - QByteArray signalname = name; - int pi = signalname.indexOf('('); + QByteArray signalname = name; + int pi = signalname.indexOf('('); int i = 0; while (type_conversion[i][0]) { int ti = pi; int len = int(strlen(type_conversion[i][0])); while ((ti = signalname.indexOf(type_conversion[i][0], ti)) != -1) - signalname.replace(ti, len, type_conversion[i][1]); + signalname.replace(ti, len, type_conversion[i][1]); ++i; } @@ -627,12 +627,12 @@ public: QString ctrl; QHash<QUuid, QAxEventSink*> eventSink; - uint useEventSink :1; - uint useMetaObject :1; - uint useClassInfo :1; + uint useEventSink :1; + uint useMetaObject :1; + uint useClassInfo :1; uint cachedMetaObject :1; - uint initialized :1; - uint tryCache :1; + uint initialized :1; + uint tryCache :1; IUnknown *ptr; mutable IDispatch *disp; @@ -1089,9 +1089,9 @@ void QAxBase::disableEventSink() */ void QAxBase::disableMetaObject() { - d->useMetaObject = false; - d->useEventSink = false; - d->useClassInfo = false; + d->useMetaObject = false; + d->useEventSink = false; + d->useClassInfo = false; } /*! @@ -2925,8 +2925,8 @@ void MetaObjectGenerator::readEventInfo() if (cpoint) cpoint->Release(); epoints->Release(); } else if (classInfo) { // no enumeration - search source interfaces and ask for those - TYPEATTR *typeattr = 0; - classInfo->GetTypeAttr(&typeattr); + TYPEATTR *typeattr = 0; + classInfo->GetTypeAttr(&typeattr); if (typeattr) { for (int i = 0; i < typeattr->cImplTypes; ++i) { int flags = 0; diff --git a/src/activeqt/container/qaxbase.h b/src/activeqt/container/qaxbase.h index 58efb85..16e8f50 100644 --- a/src/activeqt/container/qaxbase.h +++ b/src/activeqt/container/qaxbase.h @@ -63,15 +63,15 @@ class QAxBase public: typedef QMap<QString, QVariant> PropertyBag; - + QAxBase(IUnknown *iface = 0); virtual ~QAxBase(); - + QString control() const; - + long queryInterface(const QUuid &, void**) const; - - QVariant dynamicCall(const char *name, const QVariant &v1 = QVariant(), + + QVariant dynamicCall(const char *name, const QVariant &v1 = QVariant(), const QVariant &v2 = QVariant(), const QVariant &v3 = QVariant(), const QVariant &v4 = QVariant(), @@ -96,21 +96,21 @@ public: virtual QObject *qObject() const = 0; virtual const char *className() const = 0; - + PropertyBag propertyBag() const; void setPropertyBag(const PropertyBag&); - + QString generateDocumentation(); - + virtual bool propertyWritable(const char*) const; virtual void setPropertyWritable(const char*, bool); - + bool isNull() const; QStringList verbs() const; - + QVariant asVariant() const; - + #ifdef qdoc Q_SIGNALS: void signal(const QString&,int,void*); @@ -153,7 +153,7 @@ private: bool initializeLicensedHelper(void *factory, const QString &key, IUnknown **ptr); QAxBasePrivate *d; QAxMetaObject *internalMetaObject() const; - + virtual const QMetaObject *parentMetaObject() const = 0; int internalProperty(QMetaObject::Call, int index, void **v); int internalInvoke(QMetaObject::Call, int index, void **v); @@ -198,7 +198,7 @@ inline QDataStream &operator >>(QDataStream &s, QAxBase &c) s >> bag; c.setPropertyBag(bag); c.qObject()->blockSignals(false); - + return s; } @@ -207,7 +207,7 @@ inline QDataStream &operator <<(QDataStream &s, const QAxBase &c) QAxBase::PropertyBag bag = c.propertyBag(); s << c.control(); s << bag; - + return s; } #endif // QT_NO_DATASTREAM diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp index bad02cb..8bbca6c 100644 --- a/src/activeqt/container/qaxdump.cpp +++ b/src/activeqt/container/qaxdump.cpp @@ -94,7 +94,7 @@ static QByteArray namedPrototype(const QList<QByteArray> ¶meterTypes, const if (p < parameterNames.count()) prototype += ' ' + parameterNames.at(p); - + if (numDefArgs >= parameterTypes.count() - p) prototype += " = 0"; if (p < parameterTypes.count() - 1) @@ -111,7 +111,7 @@ static QByteArray toType(const QByteArray &t) int vartype = QVariant::nameToType(type); if (vartype == QVariant::Invalid) type = "int"; - + if (type.at(0) == 'Q') type = type.mid(1); type[0] = toupper(type.at(0)); @@ -121,7 +121,7 @@ static QByteArray toType(const QByteArray &t) type = "Map"; else if (type == "Uint") type = "UInt"; - + return "to" + type + "()"; } @@ -130,13 +130,13 @@ QString qax_generateDocumentation(QAxBase *that) that->metaObject(); if (that->isNull()) - return QString(); + return QString(); ITypeInfo *typeInfo = 0; IDispatch *dispatch = 0; that->queryInterface(IID_IDispatch, (void**)&dispatch); if (dispatch) - dispatch->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeInfo); + dispatch->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeInfo); QString docu; QTextStream stream(&docu, QIODevice::WriteOnly); @@ -153,17 +153,17 @@ QString qax_generateDocumentation(QAxBase *that) const char *inter = 0; int interCount = 1; while ((inter = mo->classInfo(mo->indexOfClassInfo("Interface " + QByteArray::number(interCount))).value())) { - stream << "<li>" << inter << endl; - interCount++; + stream << "<li>" << inter << endl; + interCount++; } stream << "</ul>" << endl; stream << "<h3>Event Interfaces</h3>" << endl; stream << "<ul>" << endl; - interCount = 1; + interCount = 1; while ((inter = mo->classInfo(mo->indexOfClassInfo("Event Interface " + QByteArray::number(interCount))).value())) { - stream << "<li>" << inter << endl; - interCount++; + stream << "<li>" << inter << endl; + interCount++; } stream << "</ul>" << endl; @@ -171,12 +171,12 @@ QString qax_generateDocumentation(QAxBase *that) const int slotCount = mo->methodCount(); if (slotCount) { - stream << "<h2>Public Slots:</h2>" << endl; - stream << "<ul>" << endl; + stream << "<h2>Public Slots:</h2>" << endl; + stream << "<ul>" << endl; int defArgCount = 0; - for (int islot = mo->methodOffset(); islot < slotCount; ++islot) { - const QMetaMethod slot = mo->method(islot); + for (int islot = mo->methodOffset(); islot < slotCount; ++islot) { + const QMetaMethod slot = mo->method(islot); if (slot.methodType() != QMetaMethod::Slot) continue; @@ -185,26 +185,26 @@ QString qax_generateDocumentation(QAxBase *that) continue; } - QByteArray returntype(slot.typeName()); + QByteArray returntype(slot.typeName()); if (returntype.isEmpty()) returntype = "void"; QByteArray prototype = namedPrototype(slot.parameterTypes(), slot.parameterNames(), defArgCount); QByteArray signature = slot.methodSignature(); - QByteArray name = signature.left(signature.indexOf('(')); - stream << "<li>" << returntype << " <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl; - + QByteArray name = signature.left(signature.indexOf('(')); + stream << "<li>" << returntype << " <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl; + prototype = namedPrototype(slot.parameterTypes(), slot.parameterNames()); - QString detail = QString::fromLatin1("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + + QString detail = QString::fromLatin1("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + QLatin1String(returntype.constData()) + QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1Char(' ') + QString::fromLatin1(prototype.constData()) + QLatin1String("<tt> [slot]</tt></h3>\n"); prototype = namedPrototype(slot.parameterTypes(), QList<QByteArray>()); - detail += docuFromName(typeInfo, QString::fromLatin1(name.constData())); - detail += QLatin1String("<p>Connect a signal to this slot:<pre>\n"); - detail += QString::fromLatin1("\tQObject::connect(sender, SIGNAL(someSignal") + QString::fromLatin1(prototype.constData()) + + detail += docuFromName(typeInfo, QString::fromLatin1(name.constData())); + detail += QLatin1String("<p>Connect a signal to this slot:<pre>\n"); + detail += QString::fromLatin1("\tQObject::connect(sender, SIGNAL(someSignal") + QString::fromLatin1(prototype.constData()) + QLatin1String("), object, SLOT(") + QString::fromLatin1(name.constData()) + QString::fromLatin1(prototype.constData()) + QLatin1String("));"); - detail += QLatin1String("</pre>\n"); + detail += QLatin1String("</pre>\n"); if (1) { detail += QLatin1String("<p>Or call the function directly:<pre>\n"); @@ -227,16 +227,16 @@ QString qax_generateDocumentation(QAxBase *that) detail += QLatin1Char(')'); if (returntype != "void" && returntype != "QAxObject *" && returntype != "QVariant") detail += QLatin1Char('.') + QLatin1String(toType(returntype)); - detail += QLatin1String(";</pre>\n"); - } else { - detail += QLatin1String("<p>This function has parameters of unsupported types and cannot be called directly."); - } + detail += QLatin1String(";</pre>\n"); + } else { + detail += QLatin1String("<p>This function has parameters of unsupported types and cannot be called directly."); + } - methodDetails << detail; + methodDetails << detail; defArgCount = 0; - } + } - stream << "</ul>" << endl; + stream << "</ul>" << endl; } int signalCount = mo->methodCount(); if (signalCount) { @@ -248,18 +248,18 @@ QString qax_generateDocumentation(QAxBase *that) } typeInfo = 0; - stream << "<h2>Signals:</h2>" << endl; - stream << "<ul>" << endl; + stream << "<h2>Signals:</h2>" << endl; + stream << "<ul>" << endl; - for (int isignal = mo->methodOffset(); isignal < signalCount; ++isignal) { - const QMetaMethod signal(mo->method(isignal)); + for (int isignal = mo->methodOffset(); isignal < signalCount; ++isignal) { + const QMetaMethod signal(mo->method(isignal)); if (signal.methodType() != QMetaMethod::Signal) continue; QByteArray prototype = namedPrototype(signal.parameterTypes(), signal.parameterNames()); QByteArray signature = signal.methodSignature(); - QByteArray name = signature.left(signature.indexOf('(')); - stream << "<li>void <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl; + QByteArray name = signature.left(signature.indexOf('(')); + stream << "<li>void <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl; QString detail = QLatin1String("<h3><a name=") + QLatin1String(name.constData()) + QLatin1String("></a>void ") + QLatin1String(name.constData()) + QLatin1Char(' ') + @@ -279,18 +279,18 @@ QString qax_generateDocumentation(QAxBase *that) } while (typeInfo); } prototype = namedPrototype(signal.parameterTypes(), QList<QByteArray>()); - detail += QLatin1String("<p>Connect a slot to this signal:<pre>\n"); - detail += QLatin1String("\tQObject::connect(object, SIGNAL(") + QString::fromLatin1(name.constData()) + + detail += QLatin1String("<p>Connect a slot to this signal:<pre>\n"); + detail += QLatin1String("\tQObject::connect(object, SIGNAL(") + QString::fromLatin1(name.constData()) + QString::fromLatin1(prototype.constData()) + QLatin1String("), receiver, SLOT(someSlot") + QString::fromLatin1(prototype.constData()) + QLatin1String("));"); - detail += QLatin1String("</pre>\n"); + detail += QLatin1String("</pre>\n"); - methodDetails << detail; + methodDetails << detail; if (typeInfo) typeInfo->Release(); typeInfo = 0; - } - stream << "</ul>" << endl; + } + stream << "</ul>" << endl; if (typeLib) typeLib->Release(); @@ -299,97 +299,97 @@ QString qax_generateDocumentation(QAxBase *that) const int propCount = mo->propertyCount(); if (propCount) { if (dispatch) - dispatch->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeInfo); - stream << "<h2>Properties:</h2>" << endl; - stream << "<ul>" << endl; + dispatch->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeInfo); + stream << "<h2>Properties:</h2>" << endl; + stream << "<ul>" << endl; - for (int iprop = 0; iprop < propCount; ++iprop) { - const QMetaProperty prop = mo->property(iprop); - QByteArray name(prop.name()); - QByteArray type(prop.typeName()); + for (int iprop = 0; iprop < propCount; ++iprop) { + const QMetaProperty prop = mo->property(iprop); + QByteArray name(prop.name()); + QByteArray type(prop.typeName()); - stream << "<li>" << type << " <a href=\"#" << name << "\"><b>" << name << "</b></a>;</li>" << endl; - QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + + stream << "<li>" << type << " <a href=\"#" << name << "\"><b>" << name << "</b></a>;</li>" << endl; + QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + QLatin1String(type.constData()) + - QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1String("</h3>\n"); - detail += docuFromName(typeInfo, QString::fromLatin1(name)); - QVariant::Type vartype = QVariant::nameToType(type); - if (!prop.isReadable()) - continue; + QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1String("</h3>\n"); + detail += docuFromName(typeInfo, QString::fromLatin1(name)); + QVariant::Type vartype = QVariant::nameToType(type); + if (!prop.isReadable()) + continue; - if (prop.isEnumType()) - vartype = QVariant::Int; + if (prop.isEnumType()) + vartype = QVariant::Int; if (vartype != QVariant::Invalid) { - detail += QLatin1String("<p>Read this property's value using QObject::property:<pre>\n"); + detail += QLatin1String("<p>Read this property's value using QObject::property:<pre>\n"); if (prop.isEnumType()) - detail += QLatin1String("\tint val = "); + detail += QLatin1String("\tint val = "); else detail += QLatin1Char('\t') + QLatin1String(type.constData()) + QLatin1String(" val = "); - detail += QLatin1String("object->property(\"") + QLatin1String(name.constData()) + + detail += QLatin1String("object->property(\"") + QLatin1String(name.constData()) + QLatin1String("\").") + QLatin1String(toType(type).constData()) + QLatin1String(";\n"); - detail += QLatin1String("</pre>\n"); - } else if (type == "IDispatch*" || type == "IUnknown*") { - detail += QLatin1String("<p>Get the subobject using querySubObject:<pre>\n"); - detail += QLatin1String("\tQAxObject *") + QLatin1String(name.constData()) + + detail += QLatin1String("</pre>\n"); + } else if (type == "IDispatch*" || type == "IUnknown*") { + detail += QLatin1String("<p>Get the subobject using querySubObject:<pre>\n"); + detail += QLatin1String("\tQAxObject *") + QLatin1String(name.constData()) + QLatin1String(" = object->querySubObject(\"") + QLatin1String(name.constData()) + QLatin1String("\");\n"); - detail += QLatin1String("</pre>\n"); - } else { - detail += QLatin1String("<p>This property is of an unsupported type.\n"); - } - if (prop.isWritable()) { - detail += QLatin1String("Set this property' value using QObject::setProperty:<pre>\n"); + detail += QLatin1String("</pre>\n"); + } else { + detail += QLatin1String("<p>This property is of an unsupported type.\n"); + } + if (prop.isWritable()) { + detail += QLatin1String("Set this property' value using QObject::setProperty:<pre>\n"); if (prop.isEnumType()) { detail += QLatin1String("\tint newValue = ... // string representation of values also supported\n"); } else { - detail += QLatin1String("\t") + QString::fromLatin1(type.constData()) + QLatin1String(" newValue = ...\n"); + detail += QLatin1String("\t") + QString::fromLatin1(type.constData()) + QLatin1String(" newValue = ...\n"); } - detail += QLatin1String("\tobject->setProperty(\"") + QString::fromLatin1(name) + QLatin1String("\", newValue);\n"); - detail += QLatin1String("</pre>\n"); - detail += QLatin1String("Or using the "); - QByteArray setterSlot; + detail += QLatin1String("\tobject->setProperty(\"") + QString::fromLatin1(name) + QLatin1String("\", newValue);\n"); + detail += QLatin1String("</pre>\n"); + detail += QLatin1String("Or using the "); + QByteArray setterSlot; if (isupper(name.at(0))) { - setterSlot = "Set" + name; - } else { - QByteArray nameUp = name; - nameUp[0] = toupper(nameUp.at(0)); - setterSlot = "set" + nameUp; - } - detail += QLatin1String("<a href=\"#") + QString::fromLatin1(setterSlot) + QLatin1String("\">") + + setterSlot = "Set" + name; + } else { + QByteArray nameUp = name; + nameUp[0] = toupper(nameUp.at(0)); + setterSlot = "set" + nameUp; + } + detail += QLatin1String("<a href=\"#") + QString::fromLatin1(setterSlot) + QLatin1String("\">") + QString::fromLatin1(setterSlot.constData()) + QLatin1String("</a> slot.\n"); - } - if (prop.isEnumType()) { - detail += QLatin1String("<p>See also <a href=\"#") + QString::fromLatin1(type) + + } + if (prop.isEnumType()) { + detail += QLatin1String("<p>See also <a href=\"#") + QString::fromLatin1(type) + QLatin1String("\">") + QString::fromLatin1(type) + QLatin1String("</a>.\n"); - } + } - propDetails << detail; - } - stream << "</ul>" << endl; + propDetails << detail; + } + stream << "</ul>" << endl; } const int enumCount = mo->enumeratorCount(); if (enumCount) { - stream << "<hr><h2>Member Type Documentation</h2>" << endl; - for (int i = 0; i < enumCount; ++i) { - const QMetaEnum enumdata = mo->enumerator(i); - stream << "<h3><a name=" << enumdata.name() << "></a>" << enumdata.name() << "</h3>" << endl; - stream << "<ul>" << endl; - for (int e = 0; e < enumdata.keyCount(); ++e) { - stream << "<li>" << enumdata.key(e) << "\t=" << enumdata.value(e) << "</li>" << endl; - } - stream << "</ul>" << endl; - } + stream << "<hr><h2>Member Type Documentation</h2>" << endl; + for (int i = 0; i < enumCount; ++i) { + const QMetaEnum enumdata = mo->enumerator(i); + stream << "<h3><a name=" << enumdata.name() << "></a>" << enumdata.name() << "</h3>" << endl; + stream << "<ul>" << endl; + for (int e = 0; e < enumdata.keyCount(); ++e) { + stream << "<li>" << enumdata.key(e) << "\t=" << enumdata.value(e) << "</li>" << endl; + } + stream << "</ul>" << endl; + } } if (methodDetails.count()) { - stream << "<hr><h2>Member Function Documentation</h2>" << endl; - for (int i = 0; i < methodDetails.count(); ++i) - stream << methodDetails.at(i) << endl; + stream << "<hr><h2>Member Function Documentation</h2>" << endl; + for (int i = 0; i < methodDetails.count(); ++i) + stream << methodDetails.at(i) << endl; } if (propDetails.count()) { - stream << "<hr><h2>Property Documentation</h2>" << endl; - for (int i = 0; i < propDetails.count(); ++i) - stream << propDetails.at(i) << endl; + stream << "<hr><h2>Property Documentation</h2>" << endl; + for (int i = 0; i < propDetails.count(); ++i) + stream << propDetails.at(i) << endl; } if (typeInfo) diff --git a/src/activeqt/container/qaxobject.cpp b/src/activeqt/container/qaxobject.cpp index d0b2674..7303e74 100644 --- a/src/activeqt/container/qaxobject.cpp +++ b/src/activeqt/container/qaxobject.cpp @@ -72,9 +72,9 @@ QT_BEGIN_NAMESPACE \warning You can subclass QAxObject, but you cannot use the Q_OBJECT macro in the subclass (the generated moc-file will not compile), so you - cannot add further signals, slots or properties. This limitation is - due to the metaobject information generated in runtime. - To work around this problem, aggregate the QAxObject as a member of + cannot add further signals, slots or properties. This limitation is + due to the metaobject information generated in runtime. + To work around this problem, aggregate the QAxObject as a member of the QObject subclass. \sa QAxBase, QAxWidget, QAxScript, {ActiveQt Framework} diff --git a/src/activeqt/container/qaxobject.h b/src/activeqt/container/qaxobject.h index 8ec2358..ceb96ca 100644 --- a/src/activeqt/container/qaxobject.h +++ b/src/activeqt/container/qaxobject.h @@ -57,7 +57,7 @@ public: QAxObject(const QString &c, QObject *parent = 0); QAxObject(IUnknown *iface, QObject *parent = 0); ~QAxObject(); - + bool doVerb(const QString &verb); protected: diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp index 431a82a..c56474d 100644 --- a/src/activeqt/container/qaxscript.cpp +++ b/src/activeqt/container/qaxscript.cpp @@ -232,10 +232,10 @@ HRESULT WINAPI QAxScriptSite::OnScriptTerminate(const VARIANT *result, const EXC emit script->finished(VARIANTToQVariant(*result, 0)); if (exception) emit script->finished(exception->wCode, - QString::fromWCharArray(exception->bstrSource), - QString::fromWCharArray(exception->bstrDescription), - QString::fromWCharArray(exception->bstrHelpFile) - ); + QString::fromWCharArray(exception->bstrSource), + QString::fromWCharArray(exception->bstrDescription), + QString::fromWCharArray(exception->bstrHelpFile) + ); return S_OK; } diff --git a/src/activeqt/container/qaxscript.h b/src/activeqt/container/qaxscript.h index 6885541..84a6702 100644 --- a/src/activeqt/container/qaxscript.h +++ b/src/activeqt/container/qaxscript.h @@ -65,55 +65,55 @@ public: Disconnected = 3, Closed = 4 }; - + QAxScriptEngine(const QString &language, QAxScript *script); ~QAxScriptEngine(); - + bool isValid() const; bool hasIntrospection() const; - + QString scriptLanguage() const; - + State state() const; void setState(State st); - + void addItem(const QString &name); - + long queryInterface(const QUuid &, void**) const; - + protected: bool initialize(IUnknown** ptr); - + private: QAxScript *script_code; IActiveScript *engine; - + QString script_language; }; class QAxScript : public QObject { Q_OBJECT - + public: enum FunctionFlags { FunctionNames = 0, - FunctionSignatures + FunctionSignatures }; - + QAxScript(const QString &name, QAxScriptManager *manager); ~QAxScript(); - + bool load(const QString &code, const QString &language = QString()); - + QStringList functions(FunctionFlags = FunctionNames) const; - + QString scriptCode() const; QString scriptName() const; QAxScriptEngine *scriptEngine() const; - - QVariant call(const QString &function, const QVariant &v1 = QVariant(), - const QVariant &v2 = QVariant(), + + QVariant call(const QString &function, const QVariant &v1 = QVariant(), + const QVariant &v2 = QVariant(), const QVariant &v3 = QVariant(), const QVariant &v4 = QVariant(), const QVariant &v5 = QVariant(), @@ -121,7 +121,7 @@ public: const QVariant &v7 = QVariant(), const QVariant &v8 = QVariant()); QVariant call(const QString &function, QList<QVariant> &arguments); - + Q_SIGNALS: void entered(); void finished(); @@ -129,14 +129,14 @@ Q_SIGNALS: void finished(int code, const QString &source,const QString &description, const QString &help); void stateChanged(int state); void error(int code, const QString &description, int sourcePosition, const QString &sourceText); - + private: friend class QAxScriptSite; friend class QAxScriptEngine; - + void updateObjects(); QAxBase *findObject(const QString &name); - + QString script_name; QString script_code; QAxScriptManager *script_manager; @@ -147,23 +147,23 @@ private: class QAxScriptManager : public QObject { Q_OBJECT - + public: QAxScriptManager(QObject *parent = 0); ~QAxScriptManager(); - + void addObject(QAxBase *object); void addObject(QObject *object); - + QStringList functions(QAxScript::FunctionFlags = QAxScript::FunctionNames) const; QStringList scriptNames() const; QAxScript *script(const QString &name) const; - + QAxScript* load(const QString &code, const QString &name, const QString &language); QAxScript* load(const QString &file, const QString &name); - - QVariant call(const QString &function, const QVariant &v1 = QVariant(), - const QVariant &v2 = QVariant(), + + QVariant call(const QString &function, const QVariant &v1 = QVariant(), + const QVariant &v2 = QVariant(), const QVariant &v3 = QVariant(), const QVariant &v4 = QVariant(), const QVariant &v5 = QVariant(), @@ -171,21 +171,21 @@ public: const QVariant &v7 = QVariant(), const QVariant &v8 = QVariant()); QVariant call(const QString &function, QList<QVariant> &arguments); - + static bool registerEngine(const QString &name, const QString &extension, const QString &code = QString()); static QString scriptFileFilter(); - + Q_SIGNALS: void error(QAxScript *script, int code, const QString &description, int sourcePosition, const QString &sourceText); - + private Q_SLOTS: void objectDestroyed(QObject *o); void scriptError(int code, const QString &description, int sourcePosition, const QString &sourceText); - + private: friend class QAxScript; QAxScriptManagerPrivate *d; - + void updateScript(QAxScript*); QAxScript *scriptForFunction(const QString &function) const; }; @@ -228,7 +228,7 @@ inline void QAxScriptManager::addObject(QObject *object) { QAxBase *wrapper = qax_create_object_wrapper(object); if (!wrapper) { - qWarning("QAxScriptMananger::addObject: Class %s not exposed through the QAxFactory", + qWarning("QAxScriptMananger::addObject: Class %s not exposed through the QAxFactory", object->metaObject()->className()); Q_ASSERT(wrapper); } diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index 88f3da9..7c3a0a8 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -1545,9 +1545,9 @@ HRESULT WINAPI QAxClientSite::SetBorderSpace(LPCBORDERWIDTHS pborderwidths) HRESULT WINAPI QAxClientSite::SetActiveObject(IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) { AX_DEBUG(QAxClientSite::SetActiveObject); - + Q_UNUSED(pszObjName); - // we are ignoring the name of the object, as suggested by MSDN documentation + // we are ignoring the name of the object, as suggested by MSDN documentation // for IOleInPlaceUIWindow::SetActiveObject(). if (m_spInPlaceActiveObject) { diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h index a4ca3f9..2c8817b 100644 --- a/src/activeqt/container/qaxwidget.h +++ b/src/activeqt/container/qaxwidget.h @@ -58,12 +58,12 @@ class QAxWidget : public QWidget, public QAxBase public: QObject* qObject() const { return (QWidget*)this; } const char *className() const; - + QAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); QAxWidget(const QString &c, QWidget *parent = 0, Qt::WindowFlags f = 0); QAxWidget(IUnknown *iface, QWidget *parent = 0, Qt::WindowFlags f = 0); ~QAxWidget(); - + void clear(); bool doVerb(const QString &verb); @@ -76,7 +76,7 @@ protected: bool initialize(IUnknown**); virtual bool createHostWindow(bool); bool createHostWindow(bool, const QByteArray&); - + void changeEvent(QEvent *e); void resizeEvent(QResizeEvent *); |