aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_debugger
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_debugger')
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp6
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
index bdcbf0023a..d435e82390 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
@@ -94,7 +94,7 @@ qint64 NullDevice::writeData(const char *data, qint64 len)
// (otherwise we assert in QVariant::operator<< when actually saving it)
static bool isSaveable(const QVariant &value)
{
- const int valType = static_cast<int>(value.type());
+ const int valType = static_cast<int>(value.userType());
if (valType >= QMetaType::User)
return false;
NullDevice nullDevice;
@@ -220,7 +220,7 @@ QVariant QQmlEngineDebugServiceImpl::valueContents(QVariant value) const
//QObject * is not streamable.
//Convert all such instances to a String value
- if (value.type() == QVariant::List) {
+ if (value.userType() == QMetaType::QVariantList) {
QVariantList contents;
QVariantList list = value.toList();
int count = list.size();
@@ -230,7 +230,7 @@ QVariant QQmlEngineDebugServiceImpl::valueContents(QVariant value) const
return contents;
}
- if (value.type() == QVariant::Map) {
+ if (value.userType() == QMetaType::QVariantMap) {
QVariantMap contents;
const auto map = value.toMap();
for (auto i = map.cbegin(), end = map.cend(); i != end; ++i)
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
index 61fea96e2f..333ce4b26f 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
@@ -66,7 +66,6 @@ void JavaScriptJob::run()
QV4::ScopedContext ctx(scope, engine->currentStackFrame ? engine->currentContext()
: engine->scriptContext());
- QObject scopeObject;
QV4::CppStackFrame *frame = engine->currentStackFrame;
@@ -76,9 +75,10 @@ void JavaScriptJob::run()
ctx = static_cast<QV4::ExecutionContext *>(&frame->jsFrame->context);
if (context >= 0) {
- QQmlContext *extraContext = qmlContext(QQmlDebugService::objectForId(context));
+ QObject *forId = QQmlDebugService::objectForId(context);
+ QQmlContext *extraContext = qmlContext(forId);
if (extraContext)
- ctx = QV4::QmlContext::create(ctx, QQmlContextData::get(extraContext), &scopeObject);
+ ctx = QV4::QmlContext::create(ctx, QQmlContextData::get(extraContext), forId);
} else if (frameNr < 0) { // Use QML context if available
QQmlEngine *qmlEngine = engine->qmlEngine();
if (qmlEngine) {
@@ -99,7 +99,7 @@ void JavaScriptJob::run()
}
}
if (!engine->qmlContext())
- ctx = QV4::QmlContext::create(ctx, QQmlContextData::get(qmlRootContext), &scopeObject);
+ ctx = QV4::QmlContext::create(ctx, QQmlContextData::get(qmlRootContext), nullptr);
}
}