Merge remote-tracking branch 'origin/4.3'

Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
This commit is contained in:
Eike Ziller
2017-05-15 15:31:55 +02:00
39 changed files with 168 additions and 88 deletions

View File

@@ -248,6 +248,7 @@ class IosDeviceToolHandlerPrivate : public IosToolHandlerPrivate
{
public:
explicit IosDeviceToolHandlerPrivate(const IosDeviceType &devType, IosToolHandler *q);
~IosDeviceToolHandlerPrivate();
// IosToolHandlerPrivate overrides
public:
@@ -656,8 +657,11 @@ IosDeviceToolHandlerPrivate::IosDeviceToolHandlerPrivate(const IosDeviceType &de
: IosToolHandlerPrivate(devType, q)
{
auto deleter = [](QProcess *p) {
p->kill();
p->waitForFinished(10000);
if (p->state() != QProcess::NotRunning) {
p->kill();
if (!p->waitForFinished(2000))
p->terminate();
}
delete p;
};
process = std::shared_ptr<QProcess>(new QProcess, deleter);
@@ -696,6 +700,20 @@ IosDeviceToolHandlerPrivate::IosDeviceToolHandlerPrivate(const IosDeviceType &de
QObject::connect(&killTimer, &QTimer::timeout, std::bind(&IosDeviceToolHandlerPrivate::killProcess, this));
}
IosDeviceToolHandlerPrivate::~IosDeviceToolHandlerPrivate()
{
if (isRunning()) {
// Disconnect the signals to avoid notifications while destructing.
// QTCREATORBUG-18147
process->disconnect();
// Quit ios-tool gracefully before kill is executed.
process->write("k\n\r");
process->closeWriteChannel();
// Give some time to ios-tool to finish.
process->waitForFinished(2000);
}
}
void IosDeviceToolHandlerPrivate::requestTransferApp(const QString &bundlePath,
const QString &deviceId, int timeout)
{