QmlProfiler: Verify attached RunControl stops when connection closes

Change-Id: I2b7bd63c4e84fcb0e78318f810ed54e58468d05e
Task-number: QTCREATORBUG-19496
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-01-09 11:14:39 +01:00
parent becbcd4455
commit 58ae456f4b
8 changed files with 120 additions and 29 deletions

View File

@@ -24,8 +24,8 @@
****************************************************************************/
#include "qmlprofilerclientmanager_test.h"
#include "fakedebugserver.h"
#include <qmlprofiler/qmlprofilerruncontrol.h>
#include <qmldebug/qpacketprotocol.h>
#include <projectexplorer/applicationlauncher.h>
#include <utils/url.h>
@@ -222,24 +222,6 @@ void QmlProfilerClientManagerTest::testResponsiveTcp_data()
responsiveTestData();
}
void fakeDebugServer(QIODevice *socket)
{
QmlDebug::QPacketProtocol *protocol = new QmlDebug::QPacketProtocol(socket, socket);
QObject::connect(protocol, &QmlDebug::QPacketProtocol::readyRead, [protocol]() {
QmlDebug::QPacket packet(QDataStream::Qt_4_7);
const int messageId = 0;
const int protocolVersion = 1;
const QStringList pluginNames({"CanvasFrameRate", "EngineControl", "DebugMessages"});
const QList<float> pluginVersions({1.0f, 1.0f, 1.0f});
packet << QString::fromLatin1("QDeclarativeDebugClient") << messageId << protocolVersion
<< pluginNames << pluginVersions << QDataStream::Qt_DefaultCompiledVersion;
protocol->send(packet.data());
protocol->disconnect();
protocol->deleteLater();
});
}
void QmlProfilerClientManagerTest::testResponsiveTcp()
{
QFETCH(quint32, flushInterval);