aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmldebugserviceinterfaces_p.h
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2020-02-07 08:13:41 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2021-04-26 13:13:44 +0200
commit784c62441333de8d13d31c719ac01e6096247c01 (patch)
treec9916e04f0e7d7ddf1cf6467f0f9ad643267e58a /src/qml/debugger/qqmldebugserviceinterfaces_p.h
parentf9b85604179e162c68ac8c42f97b1b3329c79b0a (diff)
Implement debugtranslationservice
- moves the language feature from the preview service to an own debugtranslationservice - with the help of a proxytranslator the service gets all translate requests Change-Id: Ic26677bb1706abbea2db23e6aafe7a3f00648962 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/debugger/qqmldebugserviceinterfaces_p.h')
-rw-r--r--src/qml/debugger/qqmldebugserviceinterfaces_p.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces_p.h b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
index a58a075848..02367d1984 100644
--- a/src/qml/debugger/qqmldebugserviceinterfaces_p.h
+++ b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
class QWindow;
class QQuickWindow;
-class QQmlTranslationBinding;
+
#if !QT_CONFIG(qml_debug)
@@ -107,8 +107,7 @@ class QQmlNativeDebugService {};
class QQmlDebugTranslationService {
public:
virtual QString foundElidedText(QObject *, const QString &, const QString &) {return {};}
- virtual void foundTranslationBinding(QQmlTranslationBinding *, QObject *,
- const QQmlRefPointer<QQmlContextData> &) {}
+ virtual void foundTranslationBinding(const TranslationBindingInformation &) {}
};
#else
@@ -170,6 +169,15 @@ protected:
QQmlBoundSignal *nextSignal(QQmlBoundSignal *prev) { return prev->m_nextSignal; }
};
+#if QT_CONFIG(translation)
+struct TranslationBindingInformation
+{
+ QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit;
+ const QV4::CompiledData::Binding *compiledBinding;
+ QObject *scopeObject;
+ QQmlRefPointer<QQmlContextData> ctxt;
+};
+
class Q_QML_PRIVATE_EXPORT QQmlDebugTranslationService : public QQmlDebugService
{
Q_OBJECT
@@ -177,8 +185,7 @@ public:
static const QString s_key;
virtual QString foundElidedText(QObject *qQuickTextObject, const QString &layoutText, const QString &elideText) = 0;
- virtual void foundTranslationBinding(QQmlTranslationBinding *binding, QObject *scopeObject,
- const QQmlRefPointer<QQmlContextData> &contextData) = 0;
+ virtual void foundTranslationBinding(const TranslationBindingInformation &translationBindingInformation) = 0;
protected:
friend class QQmlDebugConnector;
@@ -186,6 +193,7 @@ protected:
QQmlDebugService(s_key, version, parent) {}
};
+#endif //QT_CONFIG(translation)
class Q_QML_PRIVATE_EXPORT QQmlInspectorService : public QQmlDebugService
{