diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2019-12-18 10:14:57 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2019-12-18 10:15:32 +0100 |
commit | 1776037b0443dc57d59afe0772a83b1d47aced14 (patch) | |
tree | 56213eee7188e5f1d2e4abe290b3757603c835ef /src/core/aspects/aspectcommanddebugger.cpp | |
parent | c2ea752f684290d156c500c6a7174fe3f27fa086 (diff) | |
parent | c754eb2883394852f155e31f5366fa25a4ffad42 (diff) |
Merge branch '5.15' into dev
Change-Id: I731aa986e1cc45b3af920db1a23f256927beecf7
Diffstat (limited to 'src/core/aspects/aspectcommanddebugger.cpp')
-rw-r--r-- | src/core/aspects/aspectcommanddebugger.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/core/aspects/aspectcommanddebugger.cpp b/src/core/aspects/aspectcommanddebugger.cpp index eceec1bbd..7635f44c0 100644 --- a/src/core/aspects/aspectcommanddebugger.cpp +++ b/src/core/aspects/aspectcommanddebugger.cpp @@ -39,12 +39,12 @@ #include "aspectcommanddebugger_p.h" -#include <Qt3DCore/qaspectengine.h> #include <QtNetwork/QTcpSocket> #include <QtCore/QJsonDocument> #include <QtCore/QJsonObject> #include <Qt3DCore/private/qabstractaspect_p.h> +#include <Qt3DCore/private/qsysteminformationservice_p.h> QT_BEGIN_NAMESPACE @@ -64,13 +64,6 @@ struct CommandHeader } // anonymous -AspectCommandDebugger::ReadBuffer::ReadBuffer() - : buffer() - , startIdx(0) - , endIdx(0) -{ -} - void AspectCommandDebugger::ReadBuffer::insert(const QByteArray &array) { buffer.insert(endIdx, array); @@ -88,9 +81,9 @@ void AspectCommandDebugger::ReadBuffer::trim() } } -AspectCommandDebugger::AspectCommandDebugger(QObject *parent) +AspectCommandDebugger::AspectCommandDebugger(QSystemInformationService *parent) : QTcpServer(parent) - , m_aspectEngine(nullptr) + , m_service(parent) { } @@ -115,11 +108,6 @@ void AspectCommandDebugger::initialize() qWarning() << Q_FUNC_INFO << "failed to listen on port 8883"; } -void AspectCommandDebugger::setAspectEngine(QAspectEngine *engine) -{ - m_aspectEngine = engine; -} - void AspectCommandDebugger::asynchronousReplyFinished(AsynchronousCommandReply *reply) { Q_ASSERT(reply->isFinished()); @@ -189,7 +177,7 @@ void AspectCommandDebugger::executeCommand(const QString &command, QTcpSocket *socket) { // Only a single aspect is going to reply - const QVariant response = m_aspectEngine->executeCommand(command); + const QVariant response = m_service->executeCommand(command); if (response.userType() == qMetaTypeId<AsynchronousCommandReply *>()) { // AsynchronousCommand // Store the command | socket in a table AsynchronousCommandReply *reply = response.value<AsynchronousCommandReply *>(); |