forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.1'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/qmakeprojectmanager/makestep.cpp src/shared/qbs Change-Id: If1787ed23afa786ed2cef57f53c1db642559cbe0
This commit is contained in:
@@ -79,6 +79,35 @@ LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuratio
|
||||
this, &LocalQmlProfilerRunner::start);
|
||||
connect(runControl, &RunControl::finished,
|
||||
this, &LocalQmlProfilerRunner::stop);
|
||||
|
||||
m_outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput());
|
||||
|
||||
connect(runControl, &Debugger::AnalyzerRunControl::appendMessageRequested,
|
||||
this, [this](RunControl *runControl, const QString &msg, Utils::OutputFormat format) {
|
||||
Q_UNUSED(runControl);
|
||||
Q_UNUSED(format);
|
||||
m_outputParser.processOutput(msg);
|
||||
});
|
||||
|
||||
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
||||
runControl, [this, runControl](Utils::Port port) {
|
||||
runControl->notifyRemoteSetupDone(port);
|
||||
});
|
||||
|
||||
connect(&m_outputParser, &QmlDebug::QmlOutputParser::noOutputMessage,
|
||||
runControl, [this, runControl]() {
|
||||
runControl->notifyRemoteSetupDone(Utils::Port());
|
||||
});
|
||||
|
||||
connect(&m_outputParser, &QmlDebug::QmlOutputParser::connectingToSocketMessage,
|
||||
runControl, [this, runControl]() {
|
||||
runControl->notifyRemoteSetupDone(Utils::Port());
|
||||
});
|
||||
|
||||
connect(&m_outputParser, &QmlDebug::QmlOutputParser::errorMessage,
|
||||
runControl, [this, runControl](const QString &message) {
|
||||
runControl->notifyRemoteSetupFailed(message);
|
||||
});
|
||||
}
|
||||
|
||||
void LocalQmlProfilerRunner::start()
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <utils/port.h>
|
||||
#include <projectexplorer/applicationlauncher.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
#include <qmldebug/qmloutputparser.h>
|
||||
|
||||
namespace Debugger {
|
||||
class AnalyzerRunControl;
|
||||
@@ -66,6 +67,7 @@ private:
|
||||
|
||||
Configuration m_configuration;
|
||||
ProjectExplorer::ApplicationLauncher m_launcher;
|
||||
QmlDebug::QmlOutputParser m_outputParser;
|
||||
};
|
||||
|
||||
} // namespace QmlProfiler
|
||||
|
||||
@@ -70,7 +70,6 @@ public:
|
||||
Internal::QmlProfilerTool *m_tool = 0;
|
||||
QmlProfilerStateManager *m_profilerState = 0;
|
||||
QTimer m_noDebugOutputTimer;
|
||||
QmlDebug::QmlOutputParser m_outputParser;
|
||||
bool m_running = false;
|
||||
};
|
||||
|
||||
@@ -90,18 +89,9 @@ QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration,
|
||||
// (application output might be redirected / blocked)
|
||||
d->m_noDebugOutputTimer.setSingleShot(true);
|
||||
d->m_noDebugOutputTimer.setInterval(4000);
|
||||
connect(&d->m_noDebugOutputTimer, &QTimer::timeout,
|
||||
this, [this](){processIsRunning(Utils::Port());});
|
||||
|
||||
d->m_outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput());
|
||||
connect(&d->m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
||||
this, &QmlProfilerRunControl::processIsRunning);
|
||||
connect(&d->m_outputParser, &QmlDebug::QmlOutputParser::noOutputMessage,
|
||||
this, [this](){processIsRunning(Utils::Port());});
|
||||
connect(&d->m_outputParser, &QmlDebug::QmlOutputParser::connectingToSocketMessage,
|
||||
this, [this](){processIsRunning(Utils::Port());});
|
||||
connect(&d->m_outputParser, &QmlDebug::QmlOutputParser::errorMessage,
|
||||
this, &QmlProfilerRunControl::wrongSetupMessageBox);
|
||||
connect(&d->m_noDebugOutputTimer, &QTimer::timeout, this, [this]() {
|
||||
notifyRemoteSetupDone(Utils::Port());
|
||||
});
|
||||
}
|
||||
|
||||
QmlProfilerRunControl::~QmlProfilerRunControl()
|
||||
@@ -203,13 +193,7 @@ void QmlProfilerRunControl::cancelProcess()
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void QmlProfilerRunControl::appendMessage(const QString &msg, Utils::OutputFormat format)
|
||||
{
|
||||
AnalyzerRunControl::appendMessage(msg, format);
|
||||
d->m_outputParser.processOutput(msg);
|
||||
}
|
||||
|
||||
void QmlProfilerRunControl::wrongSetupMessageBox(const QString &errorMessage)
|
||||
void QmlProfilerRunControl::notifyRemoteSetupFailed(const QString &errorMessage)
|
||||
{
|
||||
QMessageBox *infoBox = new QMessageBox(ICore::mainWindow());
|
||||
infoBox->setIcon(QMessageBox::Critical);
|
||||
@@ -242,12 +226,6 @@ void QmlProfilerRunControl::wrongSetupMessageBoxFinished(int button)
|
||||
}
|
||||
|
||||
void QmlProfilerRunControl::notifyRemoteSetupDone(Utils::Port port)
|
||||
{
|
||||
d->m_noDebugOutputTimer.stop();
|
||||
emit processRunning(port);
|
||||
}
|
||||
|
||||
void QmlProfilerRunControl::processIsRunning(Utils::Port port)
|
||||
{
|
||||
d->m_noDebugOutputTimer.stop();
|
||||
|
||||
|
||||
@@ -46,21 +46,19 @@ public:
|
||||
void registerProfilerStateManager( QmlProfilerStateManager *profilerState );
|
||||
|
||||
void notifyRemoteSetupDone(Utils::Port port) override;
|
||||
void notifyRemoteSetupFailed(const QString &errorMessage) override;
|
||||
void start() override;
|
||||
StopResult stop() override;
|
||||
bool isRunning() const override;
|
||||
void cancelProcess();
|
||||
void notifyRemoteFinished() override;
|
||||
void appendMessage(const QString &msg, Utils::OutputFormat format) override;
|
||||
bool supportsReRunning() const override { return false; }
|
||||
|
||||
signals:
|
||||
void processRunning(Utils::Port port);
|
||||
|
||||
private:
|
||||
void wrongSetupMessageBox(const QString &errorMessage);
|
||||
void wrongSetupMessageBoxFinished(int);
|
||||
void processIsRunning(Utils::Port port);
|
||||
void profilerStateChanged();
|
||||
|
||||
class QmlProfilerRunControlPrivate;
|
||||
|
||||
Reference in New Issue
Block a user