forked from qt-creator/qt-creator
iOS: Remove unused variable
It was set, but nobody was actually using it. Change-Id: I99c6fcd4605591d65e5f3fb3f489a3de0c61fb24 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -480,14 +480,14 @@ void installApp(QPromise<SimulatorControl::Response> &promise,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
expected_str<void> result = runSimCtlCommand({"install", simUdid, bundlePath.toString()},
|
QString allOutput;
|
||||||
nullptr,
|
expected_str<void> result = runSimCtlCommand(
|
||||||
&response.commandOutput,
|
{"install", simUdid, bundlePath.toString()}, nullptr, &allOutput, [&promise] {
|
||||||
[&promise] { return promise.isCanceled(); });
|
return promise.isCanceled();
|
||||||
|
});
|
||||||
if (!result) {
|
if (!result) {
|
||||||
const QString error = result.error().isEmpty()
|
const QString error = result.error().isEmpty() ? allOutput
|
||||||
? response.commandOutput
|
: (result.error() + "\n" + allOutput);
|
||||||
: (result.error() + "\n" + response.commandOutput);
|
|
||||||
promise.addResult(make_unexpected(error));
|
promise.addResult(make_unexpected(error));
|
||||||
} else {
|
} else {
|
||||||
promise.addResult(response);
|
promise.addResult(response);
|
||||||
@@ -527,10 +527,9 @@ void launchApp(QPromise<SimulatorControl::Response> &promise,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString stdOutput;
|
QString stdOutput;
|
||||||
expected_str<void> result = runSimCtlCommand(args,
|
expected_str<void> result = runSimCtlCommand(args, &stdOutput, nullptr, [&promise] {
|
||||||
&stdOutput,
|
return promise.isCanceled();
|
||||||
&response.commandOutput,
|
});
|
||||||
[&promise] { return promise.isCanceled(); });
|
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
promise.addResult(make_unexpected(result.error()));
|
promise.addResult(make_unexpected(result.error()));
|
||||||
@@ -553,10 +552,9 @@ void launchApp(QPromise<SimulatorControl::Response> &promise,
|
|||||||
void deleteSimulator(QPromise<SimulatorControl::Response> &promise, const QString &simUdid)
|
void deleteSimulator(QPromise<SimulatorControl::Response> &promise, const QString &simUdid)
|
||||||
{
|
{
|
||||||
SimulatorControl::ResponseData response(simUdid);
|
SimulatorControl::ResponseData response(simUdid);
|
||||||
expected_str<void> result = runSimCtlCommand({"delete", simUdid},
|
expected_str<void> result = runSimCtlCommand({"delete", simUdid}, nullptr, nullptr, [&promise] {
|
||||||
nullptr,
|
return promise.isCanceled();
|
||||||
&response.commandOutput,
|
});
|
||||||
[&promise] { return promise.isCanceled(); });
|
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
promise.addResult(make_unexpected(result.error()));
|
promise.addResult(make_unexpected(result.error()));
|
||||||
@@ -567,10 +565,9 @@ void deleteSimulator(QPromise<SimulatorControl::Response> &promise, const QStrin
|
|||||||
void resetSimulator(QPromise<SimulatorControl::Response> &promise, const QString &simUdid)
|
void resetSimulator(QPromise<SimulatorControl::Response> &promise, const QString &simUdid)
|
||||||
{
|
{
|
||||||
SimulatorControl::ResponseData response(simUdid);
|
SimulatorControl::ResponseData response(simUdid);
|
||||||
expected_str<void> result = runSimCtlCommand({"erase", simUdid},
|
expected_str<void> result = runSimCtlCommand({"erase", simUdid}, nullptr, nullptr, [&promise] {
|
||||||
nullptr,
|
return promise.isCanceled();
|
||||||
&response.commandOutput,
|
});
|
||||||
[&promise] { return promise.isCanceled(); });
|
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
promise.addResult(make_unexpected(result.error()));
|
promise.addResult(make_unexpected(result.error()));
|
||||||
@@ -583,10 +580,10 @@ void renameSimulator(QPromise<SimulatorControl::Response> &promise,
|
|||||||
const QString &newName)
|
const QString &newName)
|
||||||
{
|
{
|
||||||
SimulatorControl::ResponseData response(simUdid);
|
SimulatorControl::ResponseData response(simUdid);
|
||||||
expected_str<void> result = runSimCtlCommand({"rename", simUdid, newName},
|
expected_str<void> result
|
||||||
nullptr,
|
= runSimCtlCommand({"rename", simUdid, newName}, nullptr, nullptr, [&promise] {
|
||||||
&response.commandOutput,
|
return promise.isCanceled();
|
||||||
[&promise] { return promise.isCanceled(); });
|
});
|
||||||
if (!result)
|
if (!result)
|
||||||
promise.addResult(make_unexpected(result.error()));
|
promise.addResult(make_unexpected(result.error()));
|
||||||
else
|
else
|
||||||
@@ -606,11 +603,11 @@ void createSimulator(QPromise<SimulatorControl::Response> &promise,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString stdOutput;
|
QString stdOutput;
|
||||||
expected_str<void> result
|
expected_str<void> result = runSimCtlCommand(
|
||||||
= runSimCtlCommand({"create", name, deviceType.identifier, runtime.identifier},
|
{"create", name, deviceType.identifier, runtime.identifier},
|
||||||
&stdOutput,
|
&stdOutput,
|
||||||
&response.commandOutput,
|
nullptr,
|
||||||
[&promise] { return promise.isCanceled(); });
|
[&promise] { return promise.isCanceled(); });
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
response.simUdid = stdOutput.trimmed();
|
response.simUdid = stdOutput.trimmed();
|
||||||
@@ -626,10 +623,10 @@ void takeSceenshot(QPromise<SimulatorControl::Response> &promise,
|
|||||||
const QString &filePath)
|
const QString &filePath)
|
||||||
{
|
{
|
||||||
SimulatorControl::ResponseData response(simUdid);
|
SimulatorControl::ResponseData response(simUdid);
|
||||||
expected_str<void> result = runSimCtlCommand({"io", simUdid, "screenshot", filePath},
|
expected_str<void> result
|
||||||
nullptr,
|
= runSimCtlCommand({"io", simUdid, "screenshot", filePath}, nullptr, nullptr, [&promise] {
|
||||||
&response.commandOutput,
|
return promise.isCanceled();
|
||||||
[&promise] { return promise.isCanceled(); });
|
});
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
promise.addResult(make_unexpected(result.error()));
|
promise.addResult(make_unexpected(result.error()));
|
||||||
|
@@ -60,7 +60,6 @@ public:
|
|||||||
|
|
||||||
QString simUdid;
|
QString simUdid;
|
||||||
qint64 inferiorPid{-1};
|
qint64 inferiorPid{-1};
|
||||||
QString commandOutput;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using Response = Utils::expected_str<ResponseData>;
|
using Response = Utils::expected_str<ResponseData>;
|
||||||
|
Reference in New Issue
Block a user