Commit 5d6f5ff2 authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Move unrelated code out of QmlProfilerClientManager

The client manager should not be bothered with details of QML events,
but rather just connect the client, the model manager, and the state
manager.

Change-Id: Iec4499f8441a06d4ef5cbcf7bfe23da6f5e7f239
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann's avatarUlf Hermann <ulf.hermann@qt.io>
parent 4ab130ed
...@@ -59,16 +59,6 @@ void QmlProfilerClientManager::setFlushInterval(quint32 flushInterval) ...@@ -59,16 +59,6 @@ void QmlProfilerClientManager::setFlushInterval(quint32 flushInterval)
m_flushInterval = flushInterval; m_flushInterval = flushInterval;
} }
bool QmlProfilerClientManager::aggregateTraces() const
{
return m_aggregateTraces;
}
void QmlProfilerClientManager::setAggregateTraces(bool aggregateTraces)
{
m_aggregateTraces = aggregateTraces;
}
void QmlProfilerClientManager::setRetryParams(int interval, int maxAttempts) void QmlProfilerClientManager::setRetryParams(int interval, int maxAttempts)
{ {
m_retryInterval = interval; m_retryInterval = interval;
...@@ -183,6 +173,12 @@ void QmlProfilerClientManager::startLocalServer() ...@@ -183,6 +173,12 @@ void QmlProfilerClientManager::startLocalServer()
m_connectionTimer.start(m_retryInterval); m_connectionTimer.start(m_retryInterval);
} }
void QmlProfilerClientManager::stopRecording()
{
QTC_ASSERT(m_qmlclientplugin, return);
m_qmlclientplugin->setRecording(false);
}
void QmlProfilerClientManager::retryConnect() void QmlProfilerClientManager::retryConnect()
{ {
if (!m_localSocket.isEmpty()) { if (!m_localSocket.isEmpty()) {
...@@ -230,24 +226,31 @@ void QmlProfilerClientManager::connectClientSignals() ...@@ -230,24 +226,31 @@ void QmlProfilerClientManager::connectClientSignals()
QTC_ASSERT(m_qmlclientplugin, return); QTC_ASSERT(m_qmlclientplugin, return);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::complete,
this, &QmlProfilerClientManager::qmlComplete);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::newEngine,
this, &QmlProfilerClientManager::qmlNewEngine);
QTC_ASSERT(m_modelManager, return); QTC_ASSERT(m_modelManager, return);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::traceFinished, QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::traceFinished,
m_modelManager->traceTime(), &QmlProfilerTraceTime::increaseEndTime); m_modelManager->traceTime(), &QmlProfilerTraceTime::increaseEndTime);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::traceStarted,
m_modelManager->traceTime(), &QmlProfilerTraceTime::decreaseStartTime);
QTC_ASSERT(m_profilerState, return); QTC_ASSERT(m_profilerState, return);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::recordingChanged,
m_profilerState.data(), &QmlProfilerStateManager::setServerRecording);
QObject::connect(m_profilerState.data(), &QmlProfilerStateManager::requestedFeaturesChanged, QObject::connect(m_profilerState.data(), &QmlProfilerStateManager::requestedFeaturesChanged,
m_qmlclientplugin.data(), &QmlProfilerTraceClient::setRequestedFeatures); m_qmlclientplugin.data(), &QmlProfilerTraceClient::setRequestedFeatures);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::recordedFeaturesChanged, QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::recordedFeaturesChanged,
m_profilerState.data(), &QmlProfilerStateManager::setRecordedFeatures); m_profilerState.data(), &QmlProfilerStateManager::setRecordedFeatures);
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::traceStarted,
this, [this](qint64 time) {
m_profilerState->setServerRecording(true);
m_modelManager->traceTime()->decreaseStartTime(time);
});
QObject::connect(m_qmlclientplugin.data(), &QmlProfilerTraceClient::complete,
this, [this](qint64 time) {
m_modelManager->traceTime()->increaseEndTime(time);
m_profilerState->setServerRecording(false);
});
QObject::connect(m_profilerState.data(), &QmlProfilerStateManager::clientRecordingChanged,
m_qmlclientplugin.data(), &QmlProfilerTraceClient::setRecording);
} }
void QmlProfilerClientManager::disconnectClientSignals() void QmlProfilerClientManager::disconnectClientSignals()
...@@ -261,6 +264,8 @@ void QmlProfilerClientManager::disconnectClientSignals() ...@@ -261,6 +264,8 @@ void QmlProfilerClientManager::disconnectClientSignals()
QTC_ASSERT(m_profilerState, return); QTC_ASSERT(m_profilerState, return);
QObject::disconnect(m_profilerState.data(), &QmlProfilerStateManager::requestedFeaturesChanged, QObject::disconnect(m_profilerState.data(), &QmlProfilerStateManager::requestedFeaturesChanged,
m_qmlclientplugin.data(), &QmlProfilerTraceClient::setRequestedFeatures); m_qmlclientplugin.data(), &QmlProfilerTraceClient::setRequestedFeatures);
QObject::disconnect(m_profilerState.data(), &QmlProfilerStateManager::clientRecordingChanged,
m_qmlclientplugin.data(), &QmlProfilerTraceClient::setRecording);
} }
bool QmlProfilerClientManager::isConnected() const bool QmlProfilerClientManager::isConnected() const
...@@ -285,10 +290,11 @@ void QmlProfilerClientManager::disconnectClient() ...@@ -285,10 +290,11 @@ void QmlProfilerClientManager::disconnectClient()
void QmlProfilerClientManager::qmlDebugConnectionOpened() void QmlProfilerClientManager::qmlDebugConnectionOpened()
{ {
logState(tr("Debug connection opened")); logState(tr("Debug connection opened"));
QTC_ASSERT(m_profilerState, return);
QTC_ASSERT(m_connection && m_qmlclientplugin, return); QTC_ASSERT(m_connection && m_qmlclientplugin, return);
QTC_ASSERT(m_connection->isConnected(), return); QTC_ASSERT(m_connection->isConnected(), return);
stopConnectionTimer(); stopConnectionTimer();
clientRecordingChanged(); m_qmlclientplugin->setRecording(m_profilerState->clientRecording());
emit connectionOpened(); emit connectionOpened();
} }
...@@ -318,70 +324,12 @@ void QmlProfilerClientManager::logState(const QString &msg) ...@@ -318,70 +324,12 @@ void QmlProfilerClientManager::logState(const QString &msg)
QmlProfilerTool::logState(QLatin1String("QML Profiler: ") + msg); QmlProfilerTool::logState(QLatin1String("QML Profiler: ") + msg);
} }
void QmlProfilerClientManager::qmlComplete(qint64 maximumTime)
{
QTC_ASSERT(m_profilerState && m_modelManager, return);
if (m_profilerState->currentState() == QmlProfilerStateManager::AppStopRequested)
m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
m_modelManager->traceTime()->increaseEndTime(maximumTime);
if (m_modelManager && !m_aggregateTraces)
m_modelManager->acquiringDone();
}
void QmlProfilerClientManager::qmlNewEngine(int engineId)
{
QTC_ASSERT(m_connection && m_qmlclientplugin, return);
if (m_qmlclientplugin->isRecording() != m_profilerState->clientRecording())
m_qmlclientplugin->setRecording(m_profilerState->clientRecording());
else
m_qmlclientplugin->sendRecordingStatus(engineId);
}
void QmlProfilerClientManager::setProfilerStateManager(QmlProfilerStateManager *profilerState) void QmlProfilerClientManager::setProfilerStateManager(QmlProfilerStateManager *profilerState)
{ {
// Don't do this while connecting // Don't do this while connecting
QTC_ASSERT(m_connection.isNull() && m_qmlclientplugin.isNull(), disconnectClient()); QTC_ASSERT(m_connection.isNull() && m_qmlclientplugin.isNull(), disconnectClient());
if (m_profilerState) {
disconnect(m_profilerState.data(), &QmlProfilerStateManager::stateChanged,
this, &QmlProfilerClientManager::profilerStateChanged);
disconnect(m_profilerState.data(), &QmlProfilerStateManager::clientRecordingChanged,
this, &QmlProfilerClientManager::clientRecordingChanged);
}
m_profilerState = profilerState; m_profilerState = profilerState;
// connect
if (m_profilerState) {
connect(m_profilerState.data(), &QmlProfilerStateManager::stateChanged,
this, &QmlProfilerClientManager::profilerStateChanged);
connect(m_profilerState.data(), &QmlProfilerStateManager::clientRecordingChanged,
this, &QmlProfilerClientManager::clientRecordingChanged);
}
}
void QmlProfilerClientManager::profilerStateChanged()
{
QTC_ASSERT(m_profilerState, return);
switch (m_profilerState->currentState()) {
case QmlProfilerStateManager::AppStopRequested :
if (m_profilerState->serverRecording()) {
if (m_qmlclientplugin)
m_qmlclientplugin->setRecording(false);
} else {
m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
}
break;
default:
break;
}
}
void QmlProfilerClientManager::clientRecordingChanged()
{
QTC_ASSERT(m_profilerState, return);
if (m_qmlclientplugin)
m_qmlclientplugin->setRecording(m_profilerState->clientRecording());
} }
void QmlProfilerClientManager::stopConnectionTimer() void QmlProfilerClientManager::stopConnectionTimer()
......
...@@ -59,14 +59,13 @@ public: ...@@ -59,14 +59,13 @@ public:
void setModelManager(QmlProfilerModelManager *m); void setModelManager(QmlProfilerModelManager *m);
void setFlushInterval(quint32 flushInterval); void setFlushInterval(quint32 flushInterval);
bool aggregateTraces() const;
void setAggregateTraces(bool aggregateTraces);
void setRetryParams(int interval, int maxAttempts); void setRetryParams(int interval, int maxAttempts);
void retryConnect(); void retryConnect();
void connectToTcpServer(); void connectToTcpServer();
void startLocalServer(); void startLocalServer();
void stopRecording();
signals: signals:
void connectionOpened(); void connectionOpened();
void connectionFailed(); void connectionFailed();
...@@ -89,8 +88,6 @@ private: ...@@ -89,8 +88,6 @@ private:
int m_maximumRetries = 50; int m_maximumRetries = 50;
int m_numRetries = 0; int m_numRetries = 0;
bool m_aggregateTraces = true;
void disconnectClient(); void disconnectClient();
void stopConnectionTimer(); void stopConnectionTimer();
...@@ -100,12 +97,6 @@ private: ...@@ -100,12 +97,6 @@ private:
void logState(const QString &); void logState(const QString &);
void qmlComplete(qint64 maximumTime);
void qmlNewEngine(int engineId);
void profilerStateChanged();
void clientRecordingChanged();
void createConnection(); void createConnection();
void connectClientSignals(); void connectClientSignals();
void disconnectClientSignals(); void disconnectClientSignals();
......
...@@ -149,6 +149,7 @@ public: ...@@ -149,6 +149,7 @@ public:
quint64 availableFeatures; quint64 availableFeatures;
quint64 visibleFeatures; quint64 visibleFeatures;
quint64 recordedFeatures; quint64 recordedFeatures;
bool aggregateTraces;
QHash<ProfileFeature, QVector<EventLoader> > eventLoaders; QHash<ProfileFeature, QVector<EventLoader> > eventLoaders;
QVector<Finalizer> finalizers; QVector<Finalizer> finalizers;
...@@ -164,6 +165,7 @@ QmlProfilerModelManager::QmlProfilerModelManager(Utils::FileInProjectFinder *fin ...@@ -164,6 +165,7 @@ QmlProfilerModelManager::QmlProfilerModelManager(Utils::FileInProjectFinder *fin
d->availableFeatures = 0; d->availableFeatures = 0;
d->visibleFeatures = 0; d->visibleFeatures = 0;
d->recordedFeatures = 0; d->recordedFeatures = 0;
d->aggregateTraces = false;
d->model = new QmlProfilerDataModel(finder, this); d->model = new QmlProfilerDataModel(finder, this);
d->state = Empty; d->state = Empty;
d->traceTime = new QmlProfilerTraceTime(this); d->traceTime = new QmlProfilerTraceTime(this);
...@@ -275,6 +277,17 @@ void QmlProfilerModelManager::setRecordedFeatures(quint64 features) ...@@ -275,6 +277,17 @@ void QmlProfilerModelManager::setRecordedFeatures(quint64 features)
} }
} }
bool QmlProfilerModelManager::aggregateTraces() const
{
return d->aggregateTraces;
}
void QmlProfilerModelManager::setAggregateTraces(bool aggregateTraces)
{
d->aggregateTraces = aggregateTraces;
}
const char *QmlProfilerModelManager::featureName(ProfileFeature feature) const char *QmlProfilerModelManager::featureName(ProfileFeature feature)
{ {
return ProfileFeatureNames[feature]; return ProfileFeatureNames[feature];
......
...@@ -114,6 +114,8 @@ public: ...@@ -114,6 +114,8 @@ public:
void setVisibleFeatures(quint64 features); void setVisibleFeatures(quint64 features);
quint64 recordedFeatures() const; quint64 recordedFeatures() const;
void setRecordedFeatures(quint64 features); void setRecordedFeatures(quint64 features);
bool aggregateTraces() const;
void setAggregateTraces(bool aggregateTraces);
void acquiringDone(); void acquiringDone();
void processingDone(); void processingDone();
......
...@@ -145,7 +145,7 @@ void QmlProfilerStateManager::setClientRecording(bool recording) ...@@ -145,7 +145,7 @@ void QmlProfilerStateManager::setClientRecording(bool recording)
#endif #endif
if (d->m_clientRecording != recording) { if (d->m_clientRecording != recording) {
d->m_clientRecording = recording; d->m_clientRecording = recording;
emit clientRecordingChanged(); emit clientRecordingChanged(recording);
} }
} }
...@@ -156,7 +156,7 @@ void QmlProfilerStateManager::setServerRecording(bool recording) ...@@ -156,7 +156,7 @@ void QmlProfilerStateManager::setServerRecording(bool recording)
#endif #endif
if (d->m_serverRecording != recording) { if (d->m_serverRecording != recording) {
d->m_serverRecording = recording; d->m_serverRecording = recording;
emit serverRecordingChanged(); emit serverRecordingChanged(recording);
} }
} }
......
...@@ -53,8 +53,8 @@ public: ...@@ -53,8 +53,8 @@ public:
signals: signals:
void stateChanged(); void stateChanged();
void clientRecordingChanged(); void clientRecordingChanged(bool);
void serverRecordingChanged(); void serverRecordingChanged(bool);
void requestedFeaturesChanged(quint64); void requestedFeaturesChanged(quint64);
void recordedFeaturesChanged(quint64); void recordedFeaturesChanged(quint64);
......
...@@ -327,7 +327,7 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(RunConfiguration *runConfi ...@@ -327,7 +327,7 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(RunConfiguration *runConfi
if (QmlProfilerSettings *settings = static_cast<QmlProfilerSettings *>(aspect->currentSettings())) { if (QmlProfilerSettings *settings = static_cast<QmlProfilerSettings *>(aspect->currentSettings())) {
d->m_profilerConnections->setFlushInterval(settings->flushEnabled() ? d->m_profilerConnections->setFlushInterval(settings->flushEnabled() ?
settings->flushInterval() : 0); settings->flushInterval() : 0);
d->m_profilerConnections->setAggregateTraces(settings->aggregateTraces()); d->m_profilerModelManager->setAggregateTraces(settings->aggregateTraces());
} }
} }
} }
...@@ -448,7 +448,7 @@ void QmlProfilerTool::recordingButtonChanged(bool recording) ...@@ -448,7 +448,7 @@ void QmlProfilerTool::recordingButtonChanged(bool recording)
if (recording && d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) { if (recording && d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) {
if (checkForUnsavedNotes()) { if (checkForUnsavedNotes()) {
if (!d->m_profilerConnections->aggregateTraces() || if (!d->m_profilerModelManager->aggregateTraces() ||
d->m_profilerModelManager->state() == QmlProfilerModelManager::Done) d->m_profilerModelManager->state() == QmlProfilerModelManager::Done)
clearData(); // clear before the recording starts, unless we aggregate recordings clearData(); // clear before the recording starts, unless we aggregate recordings
if (d->m_profilerState->clientRecording()) if (d->m_profilerState->clientRecording())
...@@ -731,7 +731,7 @@ void QmlProfilerTool::restoreFeatureVisibility() ...@@ -731,7 +731,7 @@ void QmlProfilerTool::restoreFeatureVisibility()
void QmlProfilerTool::clientsDisconnected() void QmlProfilerTool::clientsDisconnected()
{ {
if (d->m_profilerModelManager->state() == QmlProfilerModelManager::AcquiringData) { if (d->m_profilerModelManager->state() == QmlProfilerModelManager::AcquiringData) {
if (d->m_profilerConnections->aggregateTraces()) { if (d->m_profilerModelManager->aggregateTraces()) {
d->m_profilerModelManager->acquiringDone(); d->m_profilerModelManager->acquiringDone();
} else { } else {
// If the application stopped by itself, check if we have all the data // If the application stopped by itself, check if we have all the data
...@@ -868,8 +868,14 @@ void QmlProfilerTool::profilerStateChanged() ...@@ -868,8 +868,14 @@ void QmlProfilerTool::profilerStateChanged()
break; break;
case QmlProfilerStateManager::AppStopRequested: case QmlProfilerStateManager::AppStopRequested:
// Don't allow toggling the recording while data is loaded when application quits // Don't allow toggling the recording while data is loaded when application quits
if (d->m_profilerState->serverRecording()) if (d->m_profilerState->serverRecording()) {
d->m_recordButton->setEnabled(false); d->m_recordButton->setEnabled(false);
// Turn off recording and wait for remaining data
d->m_profilerConnections->stopRecording();
} else {
// Directly transition to idle
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
}
break; break;
default: default:
// no special action needed for other states // no special action needed for other states
...@@ -903,7 +909,7 @@ void QmlProfilerTool::serverRecordingChanged() ...@@ -903,7 +909,7 @@ void QmlProfilerTool::serverRecordingChanged()
showSaveDialog(); showSaveDialog();
setRecording(true); setRecording(true);
if (!d->m_profilerConnections->aggregateTraces() || if (!d->m_profilerModelManager->aggregateTraces() ||
d->m_profilerModelManager->state() == QmlProfilerModelManager::Done) d->m_profilerModelManager->state() == QmlProfilerModelManager::Done)
clearData(); clearData();
d->m_profilerModelManager->startAcquiring(); d->m_profilerModelManager->startAcquiring();
...@@ -911,9 +917,14 @@ void QmlProfilerTool::serverRecordingChanged() ...@@ -911,9 +917,14 @@ void QmlProfilerTool::serverRecordingChanged()
setRecording(false); setRecording(false);
// changes back once loading is finished, see profilerDataModelStateChanged() // changes back once loading is finished, see profilerDataModelStateChanged()
if (!d->m_profilerConnections->aggregateTraces()) if (!d->m_profilerModelManager->aggregateTraces()) {
d->m_recordButton->setEnabled(false); d->m_recordButton->setEnabled(false);
d->m_profilerModelManager->acquiringDone();
}
} }
} else if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppStopRequested) {
d->m_profilerModelManager->acquiringDone();
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
} }
} }
......
...@@ -180,7 +180,7 @@ QmlProfilerTraceClient::QmlProfilerTraceClient(QmlDebug::QmlDebugConnection *cli ...@@ -180,7 +180,7 @@ QmlProfilerTraceClient::QmlProfilerTraceClient(QmlDebug::QmlDebugConnection *cli
{ {
setRequestedFeatures(features); setRequestedFeatures(features);
connect(&d->engineControl, &QmlDebug::QmlEngineControlClient::engineAboutToBeAdded, connect(&d->engineControl, &QmlDebug::QmlEngineControlClient::engineAboutToBeAdded,
this, &QmlProfilerTraceClient::newEngine); this, &QmlProfilerTraceClient::sendRecordingStatus);
} }
QmlProfilerTraceClient::~QmlProfilerTraceClient() QmlProfilerTraceClient::~QmlProfilerTraceClient()
...@@ -259,14 +259,6 @@ void QmlProfilerTraceClient::setFlushInterval(quint32 flushInterval) ...@@ -259,14 +259,6 @@ void QmlProfilerTraceClient::setFlushInterval(quint32 flushInterval)
d->flushInterval = flushInterval; d->flushInterval = flushInterval;
} }
void QmlProfilerTraceClient::setRecordingFromServer(bool v)
{
if (v == d->recording)
return;
d->recording = v;
emit recordingChanged(v);
}
bool QmlProfilerTraceClientPrivate::updateFeatures(ProfileFeature feature) bool QmlProfilerTraceClientPrivate::updateFeatures(ProfileFeature feature)
{ {
quint64 flag = 1ULL << feature; quint64 flag = 1ULL << feature;
...@@ -300,11 +292,8 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data) ...@@ -300,11 +292,8 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
d->processCurrentEvent(); d->processCurrentEvent();
} }
emit complete(d->maximumTime); emit complete(d->maximumTime);
setRecordingFromServer(false);
} else if (d->currentEvent.type.message() == Event } else if (d->currentEvent.type.message() == Event
&& d->currentEvent.type.detailType() == StartTrace) { && d->currentEvent.type.detailType() == StartTrace) {
if (!d->recording)
setRecordingFromServer(true);
emit traceStarted(d->currentEvent.event.timestamp(), emit traceStarted(d->currentEvent.event.timestamp(),
d->currentEvent.event.numbers<QList<int>, qint32>()); d->currentEvent.event.numbers<QList<int>, qint32>());
} else if (d->currentEvent.type.message() == Event } else if (d->currentEvent.type.message() == Event
......
...@@ -65,7 +65,6 @@ signals: ...@@ -65,7 +65,6 @@ signals:
void recordingChanged(bool arg); void recordingChanged(bool arg);
void recordedFeaturesChanged(quint64 features); void recordedFeaturesChanged(quint64 features);
void newEngine(int engineId);
void cleared(); void cleared();
...@@ -73,9 +72,6 @@ protected: ...@@ -73,9 +72,6 @@ protected:
virtual void stateChanged(State status); virtual void stateChanged(State status);
virtual void messageReceived(const QByteArray &); virtual void messageReceived(const QByteArray &);
private:
void setRecordingFromServer(bool);
private: private:
class QmlProfilerTraceClientPrivate *d; class QmlProfilerTraceClientPrivate *d;
}; };
......
...@@ -223,12 +223,9 @@ void QmlProfilerClientManagerTest::testUnresponsiveLocal() ...@@ -223,12 +223,9 @@ void QmlProfilerClientManagerTest::testUnresponsiveLocal()
void responsiveTestData() void responsiveTestData()
{ {
QTest::addColumn<quint32>("flushInterval"); QTest::addColumn<quint32>("flushInterval");
QTest::addColumn<bool>("aggregateTraces");
QTest::newRow("no flush, no aggregate") << 0u << false; QTest::newRow("no flush") << 0u;
QTest::newRow("no flush, aggregate") << 0u << true; QTest::newRow("flush") << 1u;
QTest::newRow("flush, no aggregate") << 1u << false;
QTest::newRow("flush, aggregate") << 1u << true;
} }
void QmlProfilerClientManagerTest::testResponsiveTcp_data() void QmlProfilerClientManagerTest::testResponsiveTcp_data()
...@@ -257,7 +254,6 @@ void fakeDebugServer(QIODevice *socket) ...@@ -257,7 +254,6 @@ void fakeDebugServer(QIODevice *socket)
void QmlProfilerClientManagerTest::testResponsiveTcp() void QmlProfilerClientManagerTest::testResponsiveTcp()
{ {
QFETCH(quint32, flushInterval); QFETCH(quint32, flushInterval);
QFETCH(bool, aggregateTraces);
QString hostName; QString hostName;
Utils::Port port = LocalQmlProfilerRunner::findFreePort(hostName); Utils::Port port = LocalQmlProfilerRunner::findFreePort(hostName);
...@@ -280,8 +276,6 @@ void QmlProfilerClientManagerTest::testResponsiveTcp() ...@@ -280,8 +276,6 @@ void QmlProfilerClientManagerTest::testResponsiveTcp()
clientManager.setProfilerStateManager(&stateManager); clientManager.setProfilerStateManager(&stateManager);
clientManager.setModelManager(&modelManager); clientManager.setModelManager(&modelManager);
clientManager.setFlushInterval(flushInterval); clientManager.setFlushInterval(flushInterval);
clientManager.setAggregateTraces(aggregateTraces);
QCOMPARE(clientManager.aggregateTraces(), aggregateTraces);
connect(&clientManager, &QmlProfilerClientManager::connectionFailed, connect(&clientManager, &QmlProfilerClientManager::connectionFailed,
&clientManager, &QmlProfilerClientManager::retryConnect); &clientManager, &QmlProfilerClientManager::retryConnect);
...@@ -320,7 +314,6 @@ void QmlProfilerClientManagerTest::testResponsiveLocal_data() ...@@ -320,7 +314,6 @@ void QmlProfilerClientManagerTest::testResponsiveLocal_data()
void QmlProfilerClientManagerTest::testResponsiveLocal() void QmlProfilerClientManagerTest::testResponsiveLocal()
{ {
QFETCH(quint32, flushInterval); QFETCH(quint32, flushInterval);
QFETCH(bool, aggregateTraces);
QString socketFile = LocalQmlProfilerRunner::findFreeSocket(); QString socketFile = LocalQmlProfilerRunner::findFreeSocket();
...@@ -332,8 +325,6 @@ void QmlProfilerClientManagerTest::testResponsiveLocal() ...@@ -332,8 +325,6 @@ void QmlProfilerClientManagerTest::testResponsiveLocal()
clientManager.setProfilerStateManager(&stateManager); clientManager.setProfilerStateManager(&stateManager);
clientManager.setModelManager(&modelManager); clientManager.setModelManager(&modelManager);
clientManager.setFlushInterval(flushInterval); clientManager.setFlushInterval(flushInterval);
clientManager.setAggregateTraces(aggregateTraces);
QCOMPARE(clientManager.aggregateTraces(), aggregateTraces);
connect(&clientManager, &QmlProfilerClientManager::connectionFailed, connect(&clientManager, &QmlProfilerClientManager::connectionFailed,
&clientManager, &QmlProfilerClientManager::retryConnect); &clientManager, &QmlProfilerClientManager::retryConnect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment