diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-08-26 14:33:51 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-18 14:36:39 +0000 |
commit | 0cbda65924ff5440bf283aa7a988f335bba4e660 (patch) | |
tree | 0fbd3f2b9cf209caea3413ff49015cb4c832764f /src/plugins | |
parent | 9f5945a6309a3026f4ab724d2f16676f505965d8 (diff) |
QmlTooling: Move native debug service into own plugin
QV4DebugService and QQmlNativeDebugService cannot coexist at the same
time. Thus, there is no point in putting them into one plugin.
Change-Id: Ic042f7472fce23d504c62ccf96756b0f1bd68534
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservice.json | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro | 21 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp (renamed from src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h (renamed from src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.json | 3 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp | 54 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.h | 57 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmltooling.pro | 4 |
10 files changed, 139 insertions, 10 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro b/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro index 820b8bbfec..f3f8a21ff8 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro +++ b/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro @@ -4,7 +4,6 @@ QT = qml-private core-private packetprotocol-private SOURCES += \ $$PWD/qqmldebuggerservicefactory.cpp \ $$PWD/qqmlenginedebugservice.cpp \ - $$PWD/qqmlnativedebugservice.cpp \ $$PWD/qqmlwatcher.cpp \ $$PWD/qv4debugservice.cpp \ $$PWD/qv4debugger.cpp \ @@ -17,7 +16,6 @@ HEADERS += \ $$PWD/../shared/qqmldebugpacket.h \ $$PWD/qqmldebuggerservicefactory.h \ $$PWD/qqmlenginedebugservice.h \ - $$PWD/qqmlnativedebugservice.h \ $$PWD/qqmlwatcher.h \ $$PWD/qv4debugservice.h \ $$PWD/qv4debugger.h \ diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservice.json b/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservice.json index b1152e2a31..442d7781a1 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservice.json +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservice.json @@ -1,3 +1,3 @@ { - "Keys": [ "QmlDebugger", "V8Debugger", "NativeQmlDebugger" ] + "Keys": [ "QmlDebugger", "V8Debugger" ] } diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp index 7b1ffb7ccc..9315adf4ce 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp @@ -40,7 +40,6 @@ #include "qqmldebuggerservicefactory.h" #include "qqmlenginedebugservice.h" #include "qv4debugservice.h" -#include "qqmlnativedebugservice.h" #include <private/qqmldebugserviceinterfaces_p.h> QT_BEGIN_NAMESPACE @@ -53,9 +52,6 @@ QQmlDebugService *QQmlDebuggerServiceFactory::create(const QString &key) if (key == QV4DebugServiceImpl::s_key) return new QV4DebugServiceImpl(this); - if (key == QQmlNativeDebugServiceImpl::s_key) - return new QQmlNativeDebugServiceImpl(this); - return 0; } diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro b/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro new file mode 100644 index 0000000000..1873a6a77c --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro @@ -0,0 +1,21 @@ +TARGET = qmldbg_nativedebugger +QT = qml-private core packetprotocol-private + +SOURCES += \ + $$PWD/qqmlnativedebugservicefactory.cpp \ + $$PWD/qqmlnativedebugservice.cpp + +HEADERS += \ + $$PWD/../shared/qqmldebugpacket.h \ + $$PWD/qqmlnativedebugservicefactory.h \ + $$PWD/qqmlnativedebugservice.h \ + +INCLUDEPATH += $$PWD \ + $$PWD/../shared + +OTHER_FILES += \ + $$PWD/qqmlnativedebugservice.json + +PLUGIN_TYPE = qmltooling +PLUGIN_CLASS_NAME = QQmlNativeDebugServiceFactory +load(qt_plugin) diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp index 9c198a8afc..9c198a8afc 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.h b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h index 8015513f9e..58bf1bc94a 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.h +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h @@ -67,7 +67,6 @@ QT_BEGIN_NAMESPACE class NativeDebugger; class BreakPointHandler; -class QQmlDebuggerServiceFactory; class QQmlNativeDebugServiceImpl : public QQmlNativeDebugService { @@ -86,7 +85,6 @@ public: void emitAsynchronousMessageToClient(const QJsonObject &message); private: - friend class QQmlDebuggerServiceFactory; friend class NativeDebugger; QList<QPointer<NativeDebugger> > m_debuggers; diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.json b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.json new file mode 100644 index 0000000000..2951166298 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "NativeQmlDebugger" ] +} diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp new file mode 100644 index 0000000000..1841c82d5d --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qqmlnativedebugservice.h" +#include "qqmlnativedebugservicefactory.h" +#include <private/qqmldebugserviceinterfaces_p.h> + +QT_BEGIN_NAMESPACE + +QQmlDebugService *QQmlNativeDebugServiceFactory::create(const QString &key) +{ + if (key == QQmlNativeDebugServiceImpl::s_key) + return new QQmlNativeDebugServiceImpl(this); + + return 0; +} + +QT_END_NAMESPACE diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.h b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.h new file mode 100644 index 0000000000..c4a8850bec --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQMLNATIVEDEBUGSERVICEFACTORY_H +#define QQMLNATIVEDEBUGSERVICEFACTORY_H + +#include <private/qqmldebugservicefactory_p.h> + +QT_BEGIN_NAMESPACE + +class QQmlNativeDebugServiceFactory : public QQmlDebugServiceFactory +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlDebugServiceFactory_iid FILE "qqmlnativedebugservice.json") +public: + QQmlDebugService *create(const QString &key); +}; + +QT_END_NAMESPACE + +#endif // QQMLNATIVEDEBUGSERVICEFACTORY_H diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro index 56996a452f..8123e2999e 100644 --- a/src/plugins/qmltooling/qmltooling.pro +++ b/src/plugins/qmltooling/qmltooling.pro @@ -20,13 +20,15 @@ qtConfig(qml-network) { SUBDIRS += \ qmldbg_debugger \ qmldbg_profiler \ - qmldbg_messages + qmldbg_messages \ + qmldbg_nativedebugger qmldbg_server.depends = packetprotocol qmldbg_native.depends = packetprotocol qmldbg_debugger.depends = packetprotocol qmldbg_profiler.depends = packetprotocol qmldbg_messages.depends = packetprotocol +qmldbg_nativedebugger.depends = packetprotocol qtHaveModule(quick) { SUBDIRS += \ |