diff options
| author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-03-17 16:17:15 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-03-26 12:22:24 +0000 |
| commit | 19d16b33ad2bf7312e2470f31f43fa1acf92f088 (patch) | |
| tree | 53fa6abe329bf37e8a2f4f7a6eb872aaced74456 /src/qml/debugger/qqmldebugconnector.cpp | |
| parent | 5ce1b892a14a9940e4c8abbbed69bc011394c617 (diff) | |
Allow custom debug connectors
Expose a generic method for loading connector plugins in
QQmlDebuggingEnabler and don't insist on the two known ones when
actually loading them. This allows third-party connector plugins
to be loaded, for example to pass QML trace events to a generic
tracing library.
Change-Id: I4f66dfabdbd0c3aff3676f7e2591e0a6c42f8f7f
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/debugger/qqmldebugconnector.cpp')
| -rw-r--r-- | src/qml/debugger/qqmldebugconnector.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp index 6edd28ea01..e6d1a218ad 100644 --- a/src/qml/debugger/qqmldebugconnector.cpp +++ b/src/qml/debugger/qqmldebugconnector.cpp @@ -127,18 +127,15 @@ QQmlDebugConnector *QQmlDebugConnector::instance() } if (!params->instance) { - const QString serverConnector = QStringLiteral("QQmlDebugServer"); - const QString nativeConnector = QStringLiteral("QQmlNativeDebugConnector"); - const bool isNative = params->arguments.startsWith(QLatin1String("native")); if (!params->pluginKey.isEmpty()) { - if (params->pluginKey == serverConnector || params->pluginKey == nativeConnector) - params->instance = loadQQmlDebugConnector(params->pluginKey); - else - return 0; // We cannot load anything else, yet + params->instance = loadQQmlDebugConnector(params->pluginKey); } else if (params->arguments.isEmpty()) { return 0; // no explicit class name given and no command line arguments } else { - params->instance = loadQQmlDebugConnector(isNative ? nativeConnector : serverConnector); + params->instance = loadQQmlDebugConnector( + params->arguments.startsWith(QLatin1String("native")) ? + QStringLiteral("QQmlNativeDebugConnector") : + QStringLiteral("QQmlDebugServer")); } if (params->instance) { |
