forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.7'
Conflicts: src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectexplorericons.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
@@ -244,7 +243,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool,
|
||||
// In the TCP case, it doesn't hurt either to start the profiler before.
|
||||
addStartDependency(m_profiler);
|
||||
|
||||
StandardRunnable debuggee = runnable().as<StandardRunnable>();
|
||||
Runnable debuggee = runnable();
|
||||
|
||||
QString code;
|
||||
if (serverUrl.scheme() == Utils::urlSocketScheme())
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "qmlprofilerstatemanager.h"
|
||||
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
|
||||
#include <utils/outputformat.h>
|
||||
#include <utils/port.h>
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
@@ -321,6 +320,7 @@ QmlProfilerTool::QmlProfilerTool()
|
||||
|
||||
QmlProfilerTool::~QmlProfilerTool()
|
||||
{
|
||||
d->m_profilerModelManager->clearAll();
|
||||
delete d;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "localqmlprofilerrunner_test.h"
|
||||
|
||||
#include <debugger/analyzer/analyzermanager.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
|
||||
#include <qmlprofiler/qmlprofilerruncontrol.h>
|
||||
#include <qmlprofiler/qmlprofilertool.h>
|
||||
|
||||
@@ -48,7 +48,7 @@ void LocalQmlProfilerRunnerTest::testRunner()
|
||||
QmlProfilerTool tool;
|
||||
QPointer<ProjectExplorer::RunControl> runControl;
|
||||
QPointer<LocalQmlProfilerSupport> profiler;
|
||||
ProjectExplorer::StandardRunnable debuggee;
|
||||
ProjectExplorer::Runnable debuggee;
|
||||
QUrl serverUrl;
|
||||
|
||||
bool running = false;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
|
||||
#include <QLibraryInfo>
|
||||
#include <QTest>
|
||||
@@ -63,11 +64,33 @@ public:
|
||||
ProjectExplorer::FileType::Source, false);
|
||||
root->addNode(std::move(fileNode));
|
||||
setRootProjectNode(std::move(root));
|
||||
setDisplayName(file.toString());
|
||||
setId("QmlProfilerDetailsRewriterTest.DummyProject");
|
||||
}
|
||||
|
||||
bool needsConfiguration() const final { return false; }
|
||||
};
|
||||
|
||||
class DummyBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
|
||||
{
|
||||
public:
|
||||
QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *) const final
|
||||
{
|
||||
return QList<ProjectExplorer::BuildInfo *>();
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::BuildInfo *> availableSetups(const ProjectExplorer::Kit *,
|
||||
const QString &) const final
|
||||
{
|
||||
return QList<ProjectExplorer::BuildInfo *>();
|
||||
}
|
||||
|
||||
int priority(const ProjectExplorer::Kit *, const QString &) const final
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
QmlProfilerDetailsRewriterTest::QmlProfilerDetailsRewriterTest(QObject *parent) : QObject(parent)
|
||||
{
|
||||
connect(&m_rewriter, &QmlProfilerDetailsRewriter::eventDetailsChanged,
|
||||
@@ -78,6 +101,9 @@ QmlProfilerDetailsRewriterTest::QmlProfilerDetailsRewriterTest(QObject *parent)
|
||||
|
||||
void QmlProfilerDetailsRewriterTest::testMissingModelManager()
|
||||
{
|
||||
DummyBuildConfigurationFactory factory;
|
||||
Q_UNUSED(factory);
|
||||
|
||||
seedRewriter();
|
||||
delete m_modelManager;
|
||||
m_modelManager = nullptr;
|
||||
@@ -99,6 +125,9 @@ void QmlProfilerDetailsRewriterTest::testMissingModelManager()
|
||||
|
||||
void QmlProfilerDetailsRewriterTest::testRequestDetailsForLocation()
|
||||
{
|
||||
DummyBuildConfigurationFactory factory;
|
||||
Q_UNUSED(factory);
|
||||
|
||||
seedRewriter();
|
||||
QVERIFY(!m_rewriterDone);
|
||||
bool found1 = false;
|
||||
@@ -147,6 +176,9 @@ void QmlProfilerDetailsRewriterTest::testRequestDetailsForLocation()
|
||||
|
||||
void QmlProfilerDetailsRewriterTest::testGetLocalFile()
|
||||
{
|
||||
DummyBuildConfigurationFactory factory;
|
||||
Q_UNUSED(factory);
|
||||
|
||||
seedRewriter();
|
||||
QCOMPARE(m_rewriter.getLocalFile("notthere.qml"), QString());
|
||||
QCOMPARE(m_rewriter.getLocalFile("Test.qml"),
|
||||
|
||||
Reference in New Issue
Block a user