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>
This commit is contained in:
parent
9f5945a630
commit
0cbda65924
|
@ -4,7 +4,6 @@ QT = qml-private core-private packetprotocol-private
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/qqmldebuggerservicefactory.cpp \
|
$$PWD/qqmldebuggerservicefactory.cpp \
|
||||||
$$PWD/qqmlenginedebugservice.cpp \
|
$$PWD/qqmlenginedebugservice.cpp \
|
||||||
$$PWD/qqmlnativedebugservice.cpp \
|
|
||||||
$$PWD/qqmlwatcher.cpp \
|
$$PWD/qqmlwatcher.cpp \
|
||||||
$$PWD/qv4debugservice.cpp \
|
$$PWD/qv4debugservice.cpp \
|
||||||
$$PWD/qv4debugger.cpp \
|
$$PWD/qv4debugger.cpp \
|
||||||
|
@ -17,7 +16,6 @@ HEADERS += \
|
||||||
$$PWD/../shared/qqmldebugpacket.h \
|
$$PWD/../shared/qqmldebugpacket.h \
|
||||||
$$PWD/qqmldebuggerservicefactory.h \
|
$$PWD/qqmldebuggerservicefactory.h \
|
||||||
$$PWD/qqmlenginedebugservice.h \
|
$$PWD/qqmlenginedebugservice.h \
|
||||||
$$PWD/qqmlnativedebugservice.h \
|
|
||||||
$$PWD/qqmlwatcher.h \
|
$$PWD/qqmlwatcher.h \
|
||||||
$$PWD/qv4debugservice.h \
|
$$PWD/qv4debugservice.h \
|
||||||
$$PWD/qv4debugger.h \
|
$$PWD/qv4debugger.h \
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"Keys": [ "QmlDebugger", "V8Debugger", "NativeQmlDebugger" ]
|
"Keys": [ "QmlDebugger", "V8Debugger" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "qqmldebuggerservicefactory.h"
|
#include "qqmldebuggerservicefactory.h"
|
||||||
#include "qqmlenginedebugservice.h"
|
#include "qqmlenginedebugservice.h"
|
||||||
#include "qv4debugservice.h"
|
#include "qv4debugservice.h"
|
||||||
#include "qqmlnativedebugservice.h"
|
|
||||||
#include <private/qqmldebugserviceinterfaces_p.h>
|
#include <private/qqmldebugserviceinterfaces_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -53,9 +52,6 @@ QQmlDebugService *QQmlDebuggerServiceFactory::create(const QString &key)
|
||||||
if (key == QV4DebugServiceImpl::s_key)
|
if (key == QV4DebugServiceImpl::s_key)
|
||||||
return new QV4DebugServiceImpl(this);
|
return new QV4DebugServiceImpl(this);
|
||||||
|
|
||||||
if (key == QQmlNativeDebugServiceImpl::s_key)
|
|
||||||
return new QQmlNativeDebugServiceImpl(this);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)
|
|
@ -67,7 +67,6 @@ QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class NativeDebugger;
|
class NativeDebugger;
|
||||||
class BreakPointHandler;
|
class BreakPointHandler;
|
||||||
class QQmlDebuggerServiceFactory;
|
|
||||||
|
|
||||||
class QQmlNativeDebugServiceImpl : public QQmlNativeDebugService
|
class QQmlNativeDebugServiceImpl : public QQmlNativeDebugService
|
||||||
{
|
{
|
||||||
|
@ -86,7 +85,6 @@ public:
|
||||||
void emitAsynchronousMessageToClient(const QJsonObject &message);
|
void emitAsynchronousMessageToClient(const QJsonObject &message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class QQmlDebuggerServiceFactory;
|
|
||||||
friend class NativeDebugger;
|
friend class NativeDebugger;
|
||||||
|
|
||||||
QList<QPointer<NativeDebugger> > m_debuggers;
|
QList<QPointer<NativeDebugger> > m_debuggers;
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"Keys": [ "NativeQmlDebugger" ]
|
||||||
|
}
|
|
@ -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
|
|
@ -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
|
|
@ -20,13 +20,15 @@ qtConfig(qml-network) {
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
qmldbg_debugger \
|
qmldbg_debugger \
|
||||||
qmldbg_profiler \
|
qmldbg_profiler \
|
||||||
qmldbg_messages
|
qmldbg_messages \
|
||||||
|
qmldbg_nativedebugger
|
||||||
|
|
||||||
qmldbg_server.depends = packetprotocol
|
qmldbg_server.depends = packetprotocol
|
||||||
qmldbg_native.depends = packetprotocol
|
qmldbg_native.depends = packetprotocol
|
||||||
qmldbg_debugger.depends = packetprotocol
|
qmldbg_debugger.depends = packetprotocol
|
||||||
qmldbg_profiler.depends = packetprotocol
|
qmldbg_profiler.depends = packetprotocol
|
||||||
qmldbg_messages.depends = packetprotocol
|
qmldbg_messages.depends = packetprotocol
|
||||||
|
qmldbg_nativedebugger.depends = packetprotocol
|
||||||
|
|
||||||
qtHaveModule(quick) {
|
qtHaveModule(quick) {
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
|
|
|
@ -205,14 +205,14 @@ protected:
|
||||||
class Q_QML_PRIVATE_EXPORT QQmlNativeDebugService : public QQmlDebugService
|
class Q_QML_PRIVATE_EXPORT QQmlNativeDebugService : public QQmlDebugService
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static const QString s_key;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class QQmlDebugConnector;
|
friend class QQmlDebugConnector;
|
||||||
|
|
||||||
QQmlNativeDebugService(float version, QObject *parent = 0)
|
QQmlNativeDebugService(float version, QObject *parent = 0)
|
||||||
: QQmlDebugService(s_key, version, parent) {}
|
: QQmlDebugService(s_key, version, parent) {}
|
||||||
|
|
||||||
static const QString s_key;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue