forked from qt-creator/qt-creator
QmlProfiler: Drop static accessors from QmlProfilerTool
It wasn't really a singleton even before. For testing purposes make the client/state/model managers accessible. Change-Id: Ie5efbc47a6b9119495f999e4e05877d4789da407 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Internal {
|
||||
|
||||
void QmlProfilerToolTest::testAttachToWaitingApplication()
|
||||
{
|
||||
QmlProfilerTool *profilerTool = QmlProfilerTool::instance();
|
||||
QmlProfilerTool profilerTool(nullptr);
|
||||
QTcpServer server;
|
||||
QUrl serverUrl = Utils::urlFromLocalHostAndFreePort();
|
||||
QVERIFY(serverUrl.port() >= 0);
|
||||
@@ -63,7 +63,7 @@ void QmlProfilerToolTest::testAttachToWaitingApplication()
|
||||
});
|
||||
|
||||
timer.start();
|
||||
ProjectExplorer::RunControl *runControl = profilerTool->attachToWaitingApplication();
|
||||
ProjectExplorer::RunControl *runControl = profilerTool.attachToWaitingApplication();
|
||||
QVERIFY(runControl);
|
||||
|
||||
QTRY_VERIFY(connection);
|
||||
|
||||
Reference in New Issue
Block a user