forked from qt-creator/qt-creator
qmlpreview: prepare plugin to have an external client
- export the plugin andd add client creator API to be able to implement external debugtranslationclients - use the private/qqmldebugtranslationprotocol_p.h from Qt5::QmlDebugPrivate - have a basic client implementation which cares about changing language - remove out of date elide warning implementation - remove old ui - remove the menu entry The old client implementation is incompatible with the will be introduced service and there was never an officially released compatible service. Therefore we can remove the old client implementation without causing any harm. Change-Id: I26b5e8a99ba30ae6377443b3fffb05901b1cac28 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -34,34 +34,14 @@ class QMLPREVIEW_EXPORT QmlDebugTranslationClient : public QmlDebug::QmlDebugCli
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//needs to be in sync with QQmlDebugTranslationClient in qtdeclarative/src/plugins/qmltooling/qmldbg_preview/qqmldebugtranslationservice.h
|
||||
enum class Command {
|
||||
ChangeLanguage,
|
||||
MissingTranslationsChecked,
|
||||
EnableElidedTextWarning,
|
||||
DisableElidedTextWarning,
|
||||
ChangeWarningColor,
|
||||
ChangeElidedTextWarningString,
|
||||
SetDebugTranslationServiceLogFile,
|
||||
TestAllLanguages
|
||||
};
|
||||
|
||||
explicit QmlDebugTranslationClient(QmlDebug::QmlDebugConnection *connection);
|
||||
|
||||
void changeLanguage(const QUrl &url, const QString &localeIsoCode);
|
||||
void changeWarningColor(const QColor &warningColor);
|
||||
void changeElidedTextWarningString(const QString &warningString); //is QByteArray better here?
|
||||
void changeElideWarning(bool elideWarning);
|
||||
void setDebugTranslationServiceLogFile(const QString &logFilePath);
|
||||
void enableElidedTextWarning();
|
||||
void disableElidedTextWarning();
|
||||
|
||||
void messageReceived(const QByteArray &message) override;
|
||||
void stateChanged(State state) override;
|
||||
|
||||
signals:
|
||||
// void pathRequested(const QString &path);
|
||||
// void errorReported(const QString &error);
|
||||
void debugServiceUnavailable();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user