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 :
|
m_runner(new IosRunner(this, runConfig, cppDebug, qmlDebug ? QmlDebug::QmlProfilerServices :
|
||||||
QmlDebug::NoQmlDebugServices))
|
QmlDebug::NoQmlDebugServices))
|
||||||
{
|
{
|
||||||
connect(m_runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
|
connect(m_runControl, &AnalyzerRunControl::starting,
|
||||||
m_runner, SLOT(start()));
|
m_runner, &IosRunner::start);
|
||||||
connect(m_runControl, SIGNAL(finished()),
|
connect(m_runControl, &RunControl::finished,
|
||||||
m_runner, SLOT(stop()));
|
m_runner, &IosRunner::stop);
|
||||||
connect(&m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
|
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
||||||
SLOT(qmlServerReady()));
|
this, &IosAnalyzeSupport::qmlServerReady);
|
||||||
|
|
||||||
connect(m_runner, SIGNAL(gotServerPorts(int,int)),
|
connect(m_runner, &IosRunner::gotServerPorts,
|
||||||
SLOT(handleServerPorts(int,int)));
|
this, &IosAnalyzeSupport::handleServerPorts);
|
||||||
connect(m_runner, SIGNAL(gotInferiorPid(Q_PID,int)),
|
connect(m_runner, &IosRunner::gotInferiorPid,
|
||||||
SLOT(handleGotInferiorPid(Q_PID,int)));
|
this, &IosAnalyzeSupport::handleGotInferiorPid);
|
||||||
connect(m_runner, SIGNAL(finished(bool)),
|
connect(m_runner, &IosRunner::finished,
|
||||||
SLOT(handleRemoteProcessFinished(bool)));
|
this, &IosAnalyzeSupport::handleRemoteProcessFinished);
|
||||||
|
|
||||||
connect(m_runner, SIGNAL(errorMsg(QString)),
|
connect(m_runner, &IosRunner::errorMsg,
|
||||||
SLOT(handleRemoteErrorOutput(QString)));
|
this, &IosAnalyzeSupport::handleRemoteErrorOutput);
|
||||||
connect(m_runner, SIGNAL(appOutput(QString)),
|
connect(m_runner, &IosRunner::appOutput,
|
||||||
SLOT(handleRemoteOutput(QString)));
|
this, &IosAnalyzeSupport::handleRemoteOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
IosAnalyzeSupport::~IosAnalyzeSupport()
|
IosAnalyzeSupport::~IosAnalyzeSupport()
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
Analyzer::AnalyzerRunControl *runControl, bool cppDebug, bool qmlDebug);
|
Analyzer::AnalyzerRunControl *runControl, bool cppDebug, bool qmlDebug);
|
||||||
~IosAnalyzeSupport();
|
~IosAnalyzeSupport();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void qmlServerReady();
|
void qmlServerReady();
|
||||||
void handleServerPorts(int gdbServerFd, int qmlPort);
|
void handleServerPorts(int gdbServerFd, int qmlPort);
|
||||||
void handleGotInferiorPid(Q_PID, int qmlPort);
|
void handleGotInferiorPid(Q_PID, int qmlPort);
|
||||||
@@ -66,7 +66,6 @@ private slots:
|
|||||||
void handleRemoteOutput(const QString &output);
|
void handleRemoteOutput(const QString &output);
|
||||||
void handleRemoteErrorOutput(const QString &output);
|
void handleRemoteErrorOutput(const QString &output);
|
||||||
|
|
||||||
private:
|
|
||||||
Analyzer::AnalyzerRunControl *m_runControl;
|
Analyzer::AnalyzerRunControl *m_runControl;
|
||||||
IosRunner * const m_runner;
|
IosRunner * const m_runner;
|
||||||
QmlDebug::QmlOutputParser m_outputParser;
|
QmlDebug::QmlOutputParser m_outputParser;
|
||||||
|
|||||||
@@ -164,22 +164,22 @@ IosDebugSupport::IosDebugSupport(IosRunConfiguration *runConfig,
|
|||||||
m_runner(new IosRunner(this, runConfig, cppDebug, qmlDebug ? QmlDebug::QmlDebuggerServices :
|
m_runner(new IosRunner(this, runConfig, cppDebug, qmlDebug ? QmlDebug::QmlDebuggerServices :
|
||||||
QmlDebug::NoQmlDebugServices))
|
QmlDebug::NoQmlDebugServices))
|
||||||
{
|
{
|
||||||
connect(m_runControl, SIGNAL(requestRemoteSetup()),
|
connect(m_runControl, &DebuggerRunControl::requestRemoteSetup,
|
||||||
m_runner, SLOT(start()));
|
m_runner, &IosRunner::start);
|
||||||
connect(m_runControl, SIGNAL(finished()),
|
connect(m_runControl, &RunControl::finished,
|
||||||
m_runner, SLOT(stop()));
|
m_runner, &IosRunner::stop);
|
||||||
|
|
||||||
connect(m_runner, SIGNAL(gotServerPorts(int,int)),
|
connect(m_runner, &IosRunner::gotServerPorts,
|
||||||
SLOT(handleServerPorts(int,int)));
|
this, &IosDebugSupport::handleServerPorts);
|
||||||
connect(m_runner, SIGNAL(gotInferiorPid(Q_PID,int)),
|
connect(m_runner, &IosRunner::gotInferiorPid,
|
||||||
SLOT(handleGotInferiorPid(Q_PID,int)));
|
this, &IosDebugSupport::handleGotInferiorPid);
|
||||||
connect(m_runner, SIGNAL(finished(bool)),
|
connect(m_runner, &IosRunner::finished,
|
||||||
SLOT(handleRemoteProcessFinished(bool)));
|
this, &IosDebugSupport::handleRemoteProcessFinished);
|
||||||
|
|
||||||
connect(m_runner, SIGNAL(errorMsg(QString)),
|
connect(m_runner, &IosRunner::errorMsg,
|
||||||
SLOT(handleRemoteErrorOutput(QString)));
|
this, &IosDebugSupport::handleRemoteErrorOutput);
|
||||||
connect(m_runner, SIGNAL(appOutput(QString)),
|
connect(m_runner, &IosRunner::appOutput,
|
||||||
SLOT(handleRemoteOutput(QString)));
|
this, &IosDebugSupport::handleRemoteOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
IosDebugSupport::~IosDebugSupport()
|
IosDebugSupport::~IosDebugSupport()
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
Debugger::DebuggerRunControl *runControl, bool cppDebug, bool qmlDebug);
|
Debugger::DebuggerRunControl *runControl, bool cppDebug, bool qmlDebug);
|
||||||
~IosDebugSupport();
|
~IosDebugSupport();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleServerPorts(int gdbServerFd, int qmlPort);
|
void handleServerPorts(int gdbServerFd, int qmlPort);
|
||||||
void handleGotInferiorPid(Q_PID, int qmlPort);
|
void handleGotInferiorPid(Q_PID, int qmlPort);
|
||||||
void handleRemoteProcessFinished(bool cleanEnd);
|
void handleRemoteProcessFinished(bool cleanEnd);
|
||||||
@@ -62,7 +62,6 @@ private slots:
|
|||||||
void handleRemoteOutput(const QString &output);
|
void handleRemoteOutput(const QString &output);
|
||||||
void handleRemoteErrorOutput(const QString &output);
|
void handleRemoteErrorOutput(const QString &output);
|
||||||
|
|
||||||
private:
|
|
||||||
Debugger::DebuggerRunControl *m_runControl;
|
Debugger::DebuggerRunControl *m_runControl;
|
||||||
IosRunner * const m_runner;
|
IosRunner * const m_runner;
|
||||||
const QString m_dumperLib;
|
const QString m_dumperLib;
|
||||||
|
|||||||
@@ -145,21 +145,20 @@ void IosRunner::start()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_toolHandler = new IosToolHandler(m_deviceType, this);
|
m_toolHandler = new IosToolHandler(m_deviceType, this);
|
||||||
connect(m_toolHandler, SIGNAL(appOutput(Ios::IosToolHandler*,QString)),
|
connect(m_toolHandler, &IosToolHandler::appOutput,
|
||||||
SLOT(handleAppOutput(Ios::IosToolHandler*,QString)));
|
this, &IosRunner::handleAppOutput);
|
||||||
connect(m_toolHandler,
|
connect(m_toolHandler, &IosToolHandler::didStartApp,
|
||||||
SIGNAL(didStartApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
|
this, &IosRunner::handleDidStartApp);
|
||||||
SLOT(handleDidStartApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
|
connect(m_toolHandler, &IosToolHandler::errorMsg,
|
||||||
connect(m_toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
|
this, &IosRunner::handleErrorMsg);
|
||||||
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
|
connect(m_toolHandler, &IosToolHandler::gotServerPorts,
|
||||||
connect(m_toolHandler, SIGNAL(gotServerPorts(Ios::IosToolHandler*,QString,QString,int,int)),
|
this, &IosRunner::handleGotServerPorts);
|
||||||
SLOT(handleGotServerPorts(Ios::IosToolHandler*,QString,QString,int,int)));
|
connect(m_toolHandler, &IosToolHandler::gotInferiorPid,
|
||||||
connect(m_toolHandler, SIGNAL(gotInferiorPid(Ios::IosToolHandler*,QString,QString,Q_PID)),
|
this, &IosRunner::handleGotInferiorPid);
|
||||||
SLOT(handleGotInferiorPid(Ios::IosToolHandler*,QString,QString,Q_PID)));
|
connect(m_toolHandler, &IosToolHandler::toolExited,
|
||||||
connect(m_toolHandler, SIGNAL(toolExited(Ios::IosToolHandler*,int)),
|
this, &IosRunner::handleToolExited);
|
||||||
SLOT(handleToolExited(Ios::IosToolHandler*,int)));
|
connect(m_toolHandler, &IosToolHandler::finished,
|
||||||
connect(m_toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
|
this, &IosRunner::handleFinished);
|
||||||
SLOT(handleFinished(Ios::IosToolHandler*)));
|
|
||||||
m_toolHandler->requestRunApp(bundlePath(), extraArgs(), runType(), deviceId());
|
m_toolHandler->requestRunApp(bundlePath(), extraArgs(), runType(), deviceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ signals:
|
|||||||
void appOutput(const QString &output);
|
void appOutput(const QString &output);
|
||||||
void errorMsg(const QString &msg);
|
void errorMsg(const QString &msg);
|
||||||
void finished(bool cleanExit);
|
void finished(bool cleanExit);
|
||||||
private slots:
|
|
||||||
|
private:
|
||||||
void handleDidStartApp(Ios::IosToolHandler *handler, const QString &bundlePath,
|
void handleDidStartApp(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||||
const QString &deviceId, Ios::IosToolHandler::OpStatus status);
|
const QString &deviceId, Ios::IosToolHandler::OpStatus status);
|
||||||
void handleGotServerPorts(Ios::IosToolHandler *handler, const QString &bundlePath,
|
void handleGotServerPorts(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||||
@@ -87,7 +88,7 @@ private slots:
|
|||||||
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
|
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
|
||||||
void handleToolExited(Ios::IosToolHandler *handler, int code);
|
void handleToolExited(Ios::IosToolHandler *handler, int code);
|
||||||
void handleFinished(Ios::IosToolHandler *handler);
|
void handleFinished(Ios::IosToolHandler *handler);
|
||||||
private:
|
|
||||||
IosToolHandler *m_toolHandler;
|
IosToolHandler *m_toolHandler;
|
||||||
QString m_bundleDir;
|
QString m_bundleDir;
|
||||||
QStringList m_arguments;
|
QStringList m_arguments;
|
||||||
|
|||||||
Reference in New Issue
Block a user