diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-04-28 23:30:02 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-07-21 12:47:25 +0200 |
commit | 853924b9b66ba7ad1e2c52e869c83d9faac1332a (patch) | |
tree | cfecd18161ad4a28e123787d853a929093c51a12 | |
parent | 70b7084252e9b60c39a50185b2c89b72b624e334 (diff) |
Add a TU for QQmlDebugServer
This allows includemoc'ing, as well as de-inlining the destructor of
this polymorphic class.
Requires to rename the original qdebugserver.cpp, which turned out to
be the implementation file for QQmlDebugServer_Factory_. I chose,
surprise, qqmldebugserverfactory.cpp. The whole plugin could even be
implemented in a single .cpp file, I guess.
Task-number: QTBUG-45582
Task-number: QTBUG-102948
Change-Id: I81aa4c60fa30ba5ced546afc72c5a4a3ba0e619f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 30e2ae00a934a6dec7cd438e9c8d4493769507e7)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/plugins/qmltooling/qmldbg_server/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_server/qqmldebugserverfactory.cpp (renamed from src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp) | 2 | ||||
-rw-r--r-- | src/qml/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugconnector_p.h | 1 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugserver.cpp | 49 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugserver_p.h | 1 |
6 files changed, 54 insertions, 3 deletions
diff --git a/src/plugins/qmltooling/qmldbg_server/CMakeLists.txt b/src/plugins/qmltooling/qmldbg_server/CMakeLists.txt index 3e809d8210..927f077b64 100644 --- a/src/plugins/qmltooling/qmldbg_server/CMakeLists.txt +++ b/src/plugins/qmltooling/qmldbg_server/CMakeLists.txt @@ -9,7 +9,7 @@ qt_internal_add_plugin(QQmlDebugServerFactoryPlugin CLASS_NAME QQmlDebugServerFactory PLUGIN_TYPE qmltooling SOURCES - qqmldebugserver.cpp + qqmldebugserverfactory.cpp qqmldebugserverfactory.h LIBRARIES Qt::PacketProtocolPrivate diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserverfactory.cpp index e75c518ebf..724fcf0e76 100644 --- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp +++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserverfactory.cpp @@ -766,4 +766,4 @@ QQmlDebugConnector *QQmlDebugServerFactory::create(const QString &key) QT_END_NAMESPACE -#include "qqmldebugserver.moc" +#include "qqmldebugserverfactory.moc" diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 45a1b274e6..1cacf0d889 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -510,7 +510,7 @@ qt_internal_extend_target(Qml CONDITION QT_FEATURE_qml_debug debugger/qqmldebug.cpp debugger/qqmldebugconnector.cpp debugger/qqmldebugpluginmanager_p.h - debugger/qqmldebugserver_p.h + debugger/qqmldebugserver.cpp debugger/qqmldebugserver_p.h debugger/qqmldebugserverconnection_p.h debugger/qqmldebugservice.cpp debugger/qqmldebugservice_p.h debugger/qqmldebugservicefactory_p.h diff --git a/src/qml/debugger/qqmldebugconnector_p.h b/src/qml/debugger/qqmldebugconnector_p.h index f9cb73dc22..74f405eb99 100644 --- a/src/qml/debugger/qqmldebugconnector_p.h +++ b/src/qml/debugger/qqmldebugconnector_p.h @@ -65,6 +65,7 @@ QT_BEGIN_NAMESPACE class Q_QML_PRIVATE_EXPORT QQmlDebugConnector { + virtual ~QQmlDebugConnector() = default; // don't break 'override' on ~QQmlDebugServer public: static QQmlDebugConnector *instance() { return nullptr; } diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp new file mode 100644 index 0000000000..5119fc4209 --- /dev/null +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2022 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 "qqmldebugserver_p.h" + +QT_BEGIN_NAMESPACE + +QQmlDebugServer::~QQmlDebugServer() + = default; + +QT_END_NAMESPACE + +#include "moc_qqmldebugserver_p.cpp" diff --git a/src/qml/debugger/qqmldebugserver_p.h b/src/qml/debugger/qqmldebugserver_p.h index 6aa4274c35..0dffb36e60 100644 --- a/src/qml/debugger/qqmldebugserver_p.h +++ b/src/qml/debugger/qqmldebugserver_p.h @@ -62,6 +62,7 @@ class Q_QML_PRIVATE_EXPORT QQmlDebugServer : public QQmlDebugConnector { Q_OBJECT public: + ~QQmlDebugServer() override; virtual void setDevice(QIODevice *socket) = 0; }; |