diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2020-01-24 11:26:06 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2020-02-05 14:58:52 +0000 |
commit | 4975a33ba9aa357ba2bca93e292b1fbcfb34c24e (patch) | |
tree | ee096871e60633c203232048131d51759da2cd19 /src/qml/qml/qqmlbinding.cpp | |
parent | 75ce6f3cd03362e6d763ae3bc21ab793a3675fce (diff) |
QmlDebug: add new debugtranslationservice
Users were asking for having the possibility to see where the translated
text will not fit in the reserved/available space.
This is more a preparation patch to get the right connectors to change the
visualization of findings or maybe log this to a file.
Task-number: QDS-1463
Change-Id: Ic0a7a930141d6eeb79964e51c0a165c69888cf5d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index e14b00af22..b9566d5862 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -43,6 +43,10 @@ #include "qqmlcontext.h" #include "qqmlinfo.h" #include "qqmldata_p.h" + +#include <private/qqmldebugserviceinterfaces_p.h> +#include <private/qqmldebugconnector_p.h> + #include <private/qqmlprofiler_p.h> #include <private/qqmlexpression_p.h> #include <private/qqmlscriptstring_p.h> @@ -392,6 +396,11 @@ QQmlBinding *QQmlBinding::createTranslationBinding(const QQmlRefPointer<QV4::Exe b->QQmlJavaScriptExpression::setContext(ctxt); b->setScopeObject(obj); + if (QQmlDebugTranslationService *service + = QQmlDebugConnector::service<QQmlDebugTranslationService>()) { + service->foundTranslationBinding(b, obj, ctxt); + } + return b; } |