diff options
Diffstat (limited to 'src/plugins')
9 files changed, 48 insertions, 38 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp index b4b95f6713..430ba4f255 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp @@ -55,11 +55,11 @@ QT_BEGIN_NAMESPACE -QV4::CallContext *QV4DataCollector::findContext(int frame) +QV4::SimpleCallContext *QV4DataCollector::findContext(int frame) { QV4::ExecutionContext *ctx = engine()->currentContext; while (ctx) { - QV4::CallContext *cCtxt = ctx->asCallContext(); + QV4::SimpleCallContext *cCtxt = ctx->asSimpleCallContext(); if (cCtxt && cCtxt->d()->v4Function) { if (frame < 1) return cCtxt; @@ -71,7 +71,7 @@ QV4::CallContext *QV4DataCollector::findContext(int frame) return 0; } -QV4::Heap::CallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, int scope) +QV4::Heap::SimpleCallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, int scope) { if (!ctxt) return 0; @@ -81,7 +81,7 @@ QV4::Heap::CallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, for (; scope > 0 && ctx; --scope) ctx = ctx->d()->outer; - return (ctx && ctx->d()) ? ctx->asCallContext()->d() : 0; + return (ctx && ctx->d()) ? ctx->asSimpleCallContext()->d() : 0; } QVector<QV4::Heap::ExecutionContext::ContextType> QV4DataCollector::getScopeTypes(int frame) @@ -89,7 +89,7 @@ QVector<QV4::Heap::ExecutionContext::ContextType> QV4DataCollector::getScopeType QVector<QV4::Heap::ExecutionContext::ContextType> types; QV4::Scope scope(engine()); - QV4::CallContext *sctxt = findContext(frame); + QV4::SimpleCallContext *sctxt = findContext(frame); if (!sctxt || sctxt->d()->type < QV4::Heap::ExecutionContext::Type_QmlContext) return types; @@ -297,9 +297,11 @@ bool QV4DataCollector::collectScope(QJsonObject *dict, int frameNr, int scopeNr) QV4::ScopedObject scopeObject(scope, engine()->newObject()); Q_ASSERT(names.size() == collectedRefs.size()); - for (int i = 0, ei = collectedRefs.size(); i != ei; ++i) - scopeObject->put(engine(), names.at(i), - QV4::Value::fromReturnedValue(getValue(collectedRefs.at(i)))); + QV4::ScopedString propName(scope); + for (int i = 0, ei = collectedRefs.size(); i != ei; ++i) { + propName = engine()->newString(names.at(i)); + scopeObject->put(propName, QV4::Value::fromReturnedValue(getValue(collectedRefs.at(i)))); + } Ref scopeObjectRef = addRef(scopeObject); if (m_redundantRefs) { @@ -338,7 +340,7 @@ QJsonObject QV4DataCollector::buildFrame(const QV4::StackFrame &stackFrame, int QV4::Scope scope(engine()); QV4::ScopedContext ctxt(scope, findContext(frameNr)); while (ctxt) { - if (QV4::CallContext *cCtxt = ctxt->asCallContext()) { + if (QV4::SimpleCallContext *cCtxt = ctxt->asSimpleCallContext()) { if (cCtxt->d()->activation) break; } @@ -346,7 +348,7 @@ QJsonObject QV4DataCollector::buildFrame(const QV4::StackFrame &stackFrame, int } if (ctxt) { - QV4::ScopedValue o(scope, ctxt->asCallContext()->d()->activation); + QV4::ScopedValue o(scope, ctxt->asSimpleCallContext()->d()->activation); frame[QLatin1String("receiver")] = toRef(collect(o)); } @@ -398,8 +400,8 @@ QV4DataCollector::Ref QV4DataCollector::addRef(QV4::Value value, bool deduplicat { class ExceptionStateSaver { - quint32 *hasExceptionLoc; - quint32 hadException; + quint8 *hasExceptionLoc; + quint8 hadException; public: ExceptionStateSaver(QV4::ExecutionEngine *engine) diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h index 2c2514a1b3..de12e8d527 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h @@ -58,11 +58,11 @@ public: typedef uint Ref; typedef QVector<uint> Refs; - static QV4::Heap::CallContext *findScope(QV4::ExecutionContext *ctxt, int scope); + static QV4::Heap::SimpleCallContext *findScope(QV4::ExecutionContext *ctxt, int scope); static int encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType); QVector<QV4::Heap::ExecutionContext::ContextType> getScopeTypes(int frame); - QV4::CallContext *findContext(int frame); + QV4::SimpleCallContext *findContext(int frame); QV4DataCollector(QV4::ExecutionEngine *engine); diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp index a624cf22a4..107ec60943 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp @@ -90,12 +90,15 @@ void JavaScriptJob::run() QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(qmlRootContext); QV4::ScopedObject withContext(scope, engine->newObject()); + QV4::ScopedString k(scope); + QV4::ScopedValue v(scope); for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { QObject *object = ctxtPriv->instances.at(ii); if (QQmlContext *context = qmlContext(object)) { if (QQmlContextData *cdata = QQmlContextData::get(context)) { - QV4::ScopedValue v(scope, QV4::QObjectWrapper::wrap(engine, object)); - withContext->put(engine, cdata->findObjectId(object), v); + v = QV4::QObjectWrapper::wrap(engine, object); + k = engine->newString(cdata->findObjectId(object)); + withContext->put(k, v); } } } diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp index 6152853917..97e4b4e3e4 100644 --- a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp @@ -57,15 +57,15 @@ public: QLocalClientConnection(); ~QLocalClientConnection(); - void setServer(QQmlDebugServer *server); - bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress); - bool setFileName(const QString &filename, bool block); + void setServer(QQmlDebugServer *server) override; + bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress) override; + bool setFileName(const QString &filename, bool block) override; - bool isConnected() const; - void disconnect(); + bool isConnected() const override; + void disconnect() override; - void waitForConnection(); - void flush(); + void waitForConnection() override; + void flush() override; private: void connectionEstablished(); diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp index 7f842419e7..6cb1ab4051 100644 --- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp @@ -481,17 +481,20 @@ void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &a QJsonArray output; QV4::Scope scope(engine); - if (QV4::CallContext *callContext = executionContext->asCallContext()) { + if (QV4::SimpleCallContext *callContext = executionContext->asSimpleCallContext()) { QV4::Value thisObject = callContext->thisObject(); collector.collect(&output, QString(), QStringLiteral("this"), thisObject); QV4::Identifier *const *variables = callContext->variables(); QV4::Identifier *const *formals = callContext->formals(); - for (unsigned i = 0, ei = callContext->variableCount(); i != ei; ++i) { - QString qName; - if (QV4::Identifier *name = variables[i]) - qName = name->string; - QV4::Value val = callContext->d()->locals[i]; - collector.collect(&output, QString(), qName, val); + if (callContext->d()->type == QV4::Heap::ExecutionContext::Type_CallContext) { + QV4::CallContext *ctx = static_cast<QV4::CallContext *>(callContext); + for (unsigned i = 0, ei = ctx->variableCount(); i != ei; ++i) { + QString qName; + if (QV4::Identifier *name = variables[i]) + qName = name->string; + QV4::Value val = ctx->d()->locals[i]; + collector.collect(&output, QString(), qName, val); + } } for (unsigned i = 0, ei = callContext->formalCount(); i != ei; ++i) { QString qName; diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp index f6f48e43a4..bcfb3b8a75 100644 --- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp +++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp @@ -114,7 +114,7 @@ public: return m_pluginName; } - void run(); + void run() override; private: QQmlDebugServerImpl *m_server; diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp index b305c3f535..af4f5292ba 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -55,15 +55,15 @@ public: QTcpServerConnection(); ~QTcpServerConnection(); - void setServer(QQmlDebugServer *server); - bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress); - bool setFileName(const QString &fileName, bool block); + void setServer(QQmlDebugServer *server) override; + bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress) override; + bool setFileName(const QString &fileName, bool block) override; - bool isConnected() const; - void disconnect(); + bool isConnected() const override; + void disconnect() override; - void waitForConnection(); - void flush(); + void waitForConnection() override; + void flush() override; private: void newConnection(); diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h index f1ab580a84..f828843227 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h @@ -86,6 +86,7 @@ public: void setDevicePixelRatio(qreal ratio) override; void setMirrorHorizontal(bool mirror) override; void setMirrorVertical(bool mirror) override; + void setSamples(int) override { } public Q_SLOTS: void markDirtyTexture() override; diff --git a/src/plugins/scenegraph/openvg/qsgopenvglayer.h b/src/plugins/scenegraph/openvg/qsgopenvglayer.h index 2af0bfb40f..8deedc3347 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvglayer.h +++ b/src/plugins/scenegraph/openvg/qsgopenvglayer.h @@ -83,6 +83,7 @@ public: void setDevicePixelRatio(qreal ratio) override; void setMirrorHorizontal(bool mirror) override; void setMirrorVertical(bool mirror) override; + void setSamples(int) override { } public slots: void markDirtyTexture() override; |