forked from qt-creator/qt-creator
iOS: Use some more Qt5-style connects
Safer to refactor. Change-Id: Ie909b695e7d1d7a473aba6bb39e6bdf0d5d24d85 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -103,24 +103,24 @@ IosAnalyzeSupport::IosAnalyzeSupport(IosRunConfiguration *runConfig,
|
||||
m_runner(new IosRunner(this, runConfig, cppDebug, qmlDebug ? QmlDebug::QmlProfilerServices :
|
||||
QmlDebug::NoQmlDebugServices))
|
||||
{
|
||||
connect(m_runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
|
||||
m_runner, SLOT(start()));
|
||||
connect(m_runControl, SIGNAL(finished()),
|
||||
m_runner, SLOT(stop()));
|
||||
connect(&m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
|
||||
SLOT(qmlServerReady()));
|
||||
connect(m_runControl, &AnalyzerRunControl::starting,
|
||||
m_runner, &IosRunner::start);
|
||||
connect(m_runControl, &RunControl::finished,
|
||||
m_runner, &IosRunner::stop);
|
||||
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
||||
this, &IosAnalyzeSupport::qmlServerReady);
|
||||
|
||||
connect(m_runner, SIGNAL(gotServerPorts(int,int)),
|
||||
SLOT(handleServerPorts(int,int)));
|
||||
connect(m_runner, SIGNAL(gotInferiorPid(Q_PID,int)),
|
||||
SLOT(handleGotInferiorPid(Q_PID,int)));
|
||||
connect(m_runner, SIGNAL(finished(bool)),
|
||||
SLOT(handleRemoteProcessFinished(bool)));
|
||||
connect(m_runner, &IosRunner::gotServerPorts,
|
||||
this, &IosAnalyzeSupport::handleServerPorts);
|
||||
connect(m_runner, &IosRunner::gotInferiorPid,
|
||||
this, &IosAnalyzeSupport::handleGotInferiorPid);
|
||||
connect(m_runner, &IosRunner::finished,
|
||||
this, &IosAnalyzeSupport::handleRemoteProcessFinished);
|
||||
|
||||
connect(m_runner, SIGNAL(errorMsg(QString)),
|
||||
SLOT(handleRemoteErrorOutput(QString)));
|
||||
connect(m_runner, SIGNAL(appOutput(QString)),
|
||||
SLOT(handleRemoteOutput(QString)));
|
||||
connect(m_runner, &IosRunner::errorMsg,
|
||||
this, &IosAnalyzeSupport::handleRemoteErrorOutput);
|
||||
connect(m_runner, &IosRunner::appOutput,
|
||||
this, &IosAnalyzeSupport::handleRemoteOutput);
|
||||
}
|
||||
|
||||
IosAnalyzeSupport::~IosAnalyzeSupport()
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
Analyzer::AnalyzerRunControl *runControl, bool cppDebug, bool qmlDebug);
|
||||
~IosAnalyzeSupport();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void qmlServerReady();
|
||||
void handleServerPorts(int gdbServerFd, int qmlPort);
|
||||
void handleGotInferiorPid(Q_PID, int qmlPort);
|
||||
@@ -66,7 +66,6 @@ private slots:
|
||||
void handleRemoteOutput(const QString &output);
|
||||
void handleRemoteErrorOutput(const QString &output);
|
||||
|
||||
private:
|
||||
Analyzer::AnalyzerRunControl *m_runControl;
|
||||
IosRunner * const m_runner;
|
||||
QmlDebug::QmlOutputParser m_outputParser;
|
||||
|
||||
@@ -164,22 +164,22 @@ IosDebugSupport::IosDebugSupport(IosRunConfiguration *runConfig,
|
||||
m_runner(new IosRunner(this, runConfig, cppDebug, qmlDebug ? QmlDebug::QmlDebuggerServices :
|
||||
QmlDebug::NoQmlDebugServices))
|
||||
{
|
||||
connect(m_runControl, SIGNAL(requestRemoteSetup()),
|
||||
m_runner, SLOT(start()));
|
||||
connect(m_runControl, SIGNAL(finished()),
|
||||
m_runner, SLOT(stop()));
|
||||
connect(m_runControl, &DebuggerRunControl::requestRemoteSetup,
|
||||
m_runner, &IosRunner::start);
|
||||
connect(m_runControl, &RunControl::finished,
|
||||
m_runner, &IosRunner::stop);
|
||||
|
||||
connect(m_runner, SIGNAL(gotServerPorts(int,int)),
|
||||
SLOT(handleServerPorts(int,int)));
|
||||
connect(m_runner, SIGNAL(gotInferiorPid(Q_PID,int)),
|
||||
SLOT(handleGotInferiorPid(Q_PID,int)));
|
||||
connect(m_runner, SIGNAL(finished(bool)),
|
||||
SLOT(handleRemoteProcessFinished(bool)));
|
||||
connect(m_runner, &IosRunner::gotServerPorts,
|
||||
this, &IosDebugSupport::handleServerPorts);
|
||||
connect(m_runner, &IosRunner::gotInferiorPid,
|
||||
this, &IosDebugSupport::handleGotInferiorPid);
|
||||
connect(m_runner, &IosRunner::finished,
|
||||
this, &IosDebugSupport::handleRemoteProcessFinished);
|
||||
|
||||
connect(m_runner, SIGNAL(errorMsg(QString)),
|
||||
SLOT(handleRemoteErrorOutput(QString)));
|
||||
connect(m_runner, SIGNAL(appOutput(QString)),
|
||||
SLOT(handleRemoteOutput(QString)));
|
||||
connect(m_runner, &IosRunner::errorMsg,
|
||||
this, &IosDebugSupport::handleRemoteErrorOutput);
|
||||
connect(m_runner, &IosRunner::appOutput,
|
||||
this, &IosDebugSupport::handleRemoteOutput);
|
||||
}
|
||||
|
||||
IosDebugSupport::~IosDebugSupport()
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
Debugger::DebuggerRunControl *runControl, bool cppDebug, bool qmlDebug);
|
||||
~IosDebugSupport();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleServerPorts(int gdbServerFd, int qmlPort);
|
||||
void handleGotInferiorPid(Q_PID, int qmlPort);
|
||||
void handleRemoteProcessFinished(bool cleanEnd);
|
||||
@@ -62,7 +62,6 @@ private slots:
|
||||
void handleRemoteOutput(const QString &output);
|
||||
void handleRemoteErrorOutput(const QString &output);
|
||||
|
||||
private:
|
||||
Debugger::DebuggerRunControl *m_runControl;
|
||||
IosRunner * const m_runner;
|
||||
const QString m_dumperLib;
|
||||
|
||||
@@ -145,21 +145,20 @@ void IosRunner::start()
|
||||
}
|
||||
|
||||
m_toolHandler = new IosToolHandler(m_deviceType, this);
|
||||
connect(m_toolHandler, SIGNAL(appOutput(Ios::IosToolHandler*,QString)),
|
||||
SLOT(handleAppOutput(Ios::IosToolHandler*,QString)));
|
||||
connect(m_toolHandler,
|
||||
SIGNAL(didStartApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
|
||||
SLOT(handleDidStartApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
|
||||
connect(m_toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
|
||||
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
|
||||
connect(m_toolHandler, SIGNAL(gotServerPorts(Ios::IosToolHandler*,QString,QString,int,int)),
|
||||
SLOT(handleGotServerPorts(Ios::IosToolHandler*,QString,QString,int,int)));
|
||||
connect(m_toolHandler, SIGNAL(gotInferiorPid(Ios::IosToolHandler*,QString,QString,Q_PID)),
|
||||
SLOT(handleGotInferiorPid(Ios::IosToolHandler*,QString,QString,Q_PID)));
|
||||
connect(m_toolHandler, SIGNAL(toolExited(Ios::IosToolHandler*,int)),
|
||||
SLOT(handleToolExited(Ios::IosToolHandler*,int)));
|
||||
connect(m_toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
|
||||
SLOT(handleFinished(Ios::IosToolHandler*)));
|
||||
connect(m_toolHandler, &IosToolHandler::appOutput,
|
||||
this, &IosRunner::handleAppOutput);
|
||||
connect(m_toolHandler, &IosToolHandler::didStartApp,
|
||||
this, &IosRunner::handleDidStartApp);
|
||||
connect(m_toolHandler, &IosToolHandler::errorMsg,
|
||||
this, &IosRunner::handleErrorMsg);
|
||||
connect(m_toolHandler, &IosToolHandler::gotServerPorts,
|
||||
this, &IosRunner::handleGotServerPorts);
|
||||
connect(m_toolHandler, &IosToolHandler::gotInferiorPid,
|
||||
this, &IosRunner::handleGotInferiorPid);
|
||||
connect(m_toolHandler, &IosToolHandler::toolExited,
|
||||
this, &IosRunner::handleToolExited);
|
||||
connect(m_toolHandler, &IosToolHandler::finished,
|
||||
this, &IosRunner::handleFinished);
|
||||
m_toolHandler->requestRunApp(bundlePath(), extraArgs(), runType(), deviceId());
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,8 @@ signals:
|
||||
void appOutput(const QString &output);
|
||||
void errorMsg(const QString &msg);
|
||||
void finished(bool cleanExit);
|
||||
private slots:
|
||||
|
||||
private:
|
||||
void handleDidStartApp(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, Ios::IosToolHandler::OpStatus status);
|
||||
void handleGotServerPorts(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
@@ -87,7 +88,7 @@ private slots:
|
||||
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
|
||||
void handleToolExited(Ios::IosToolHandler *handler, int code);
|
||||
void handleFinished(Ios::IosToolHandler *handler);
|
||||
private:
|
||||
|
||||
IosToolHandler *m_toolHandler;
|
||||
QString m_bundleDir;
|
||||
QStringList m_arguments;
|
||||
|
||||
Reference in New Issue
Block a user