diff options
Diffstat (limited to 'src/core/aspects/aspectcommanddebugger.cpp')
-rw-r--r-- | src/core/aspects/aspectcommanddebugger.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/aspects/aspectcommanddebugger.cpp b/src/core/aspects/aspectcommanddebugger.cpp index d2d19d011..e6c9d7232 100644 --- a/src/core/aspects/aspectcommanddebugger.cpp +++ b/src/core/aspects/aspectcommanddebugger.cpp @@ -37,9 +37,9 @@ void AspectCommandDebugger::ReadBuffer::insert(const QByteArray &array) void AspectCommandDebugger::ReadBuffer::trim() { if (startIdx != endIdx && startIdx != 0) { - memcpy(buffer.data(), - buffer.constData() + startIdx, - size()); + memmove(buffer.data(), + buffer.constData() + startIdx, + size()); endIdx -= startIdx; startIdx = 0; } @@ -53,17 +53,17 @@ AspectCommandDebugger::AspectCommandDebugger(QSystemInformationService *parent) void AspectCommandDebugger::initialize() { - QObject::connect(this, &QTcpServer::newConnection, [this] { + QObject::connect(this, &QTcpServer::newConnection, this, [this] { QTcpSocket *socket = nextPendingConnection(); m_connections.push_back(socket); - QObject::connect(socket, &QTcpSocket::disconnected, [this, socket] { + QObject::connect(socket, &QTcpSocket::disconnected, this, [this, socket] { m_connections.removeOne(socket); // Destroy object to make sure all QObject connection are removed socket->deleteLater(); }); - QObject::connect(socket, &QTcpSocket::readyRead, [this, socket] { + QObject::connect(socket, &QTcpSocket::readyRead, this, [this, socket] { onCommandReceived(socket); }); }); |