aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2021-01-25 04:02:41 +0100
committerTim Jenssen <tim.jenssen@qt.io>2021-01-27 19:56:24 +0100
commitafa9b8087addeceb8af34ea2025a11cc1f63c251 (patch)
treedac9426d6b8c5361f28b255800c98422f7bda5cb
parentc923d04386bf07019288bfbc62503846e58d539c (diff)
QmlDebug: make qt_qmlDebugClearBuffer() accessible
- also fix that qt_qmlDebugMessageBuffer is always valid Change-Id: I3661e424ecaeb7d8c8bd3b1acb137ae34a3f06e4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
index 09baa73f7d..bbb4ea0d88 100644
--- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
+++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
@@ -91,6 +91,8 @@ Q_DECL_EXPORT void qt_qmlDebugObjectAvailable()
Q_DECL_EXPORT void qt_qmlDebugClearBuffer()
{
responseBuffer->clear();
+ qt_qmlDebugMessageBuffer = nullptr;
+ qt_qmlDebugMessageLength = 0;
}
// Send a message to a service.
@@ -157,7 +159,8 @@ quintptr qt_qmlDebugTestHooks[] = {
quintptr(&qt_qmlDebugSendDataToService),
quintptr(&qt_qmlDebugEnableService),
quintptr(&qt_qmlDebugDisableService),
- quintptr(&qt_qmlDebugObjectAvailable)
+ quintptr(&qt_qmlDebugObjectAvailable),
+ quintptr(&qt_qmlDebugClearBuffer)
};
// In blocking mode, this will busy wait until the debugger sets block to false.
@@ -279,6 +282,8 @@ void QQmlNativeDebugConnector::announceObjectAvailability(const QString &objectT
qt_qmlDebugMessageLength = ba.size();
TRACE_PROTOCOL("Reporting engine availabilty");
qt_qmlDebugObjectAvailable(); // Trigger native breakpoint.
+ qt_qmlDebugMessageBuffer = nullptr;
+ qt_qmlDebugMessageLength = 0;
}
bool QQmlNativeDebugConnector::addService(const QString &name, QQmlDebugService *service)