Don't launch blocking execute call on UI thread, pop up progress ticker

* This most commonly happens launching an Android program that takes a
  while to launch, or if you're launching a program with the delay for
  debugger option set.
* Instead of the whole UI hanging, you'll get a progress dialog to
  appear while it's waiting.
This commit is contained in:
baldurk
2017-02-24 17:34:02 +00:00
parent 0ff1ff0d03
commit f76a4cc339
7 changed files with 172 additions and 92 deletions
+10 -9
View File
@@ -745,10 +745,11 @@ void CaptureDialog::triggerCapture()
QString name = m_ProcessModel->data(m_ProcessModel->index(item.row(), 0)).toString();
uint32_t PID = m_ProcessModel->data(m_ProcessModel->index(item.row(), 1)).toUInt();
LiveCapture *live = m_InjectCallback(PID, settings().Environment, name, settings().Options);
if(ui->queueFrameCap->isChecked() && live != NULL)
live->QueueCapture((int)ui->queuedFrame->value());
m_InjectCallback(PID, settings().Environment, name, settings().Options,
[this](LiveCapture *live) {
if(ui->queueFrameCap->isChecked())
live->QueueCapture((int)ui->queuedFrame->value());
});
}
}
else
@@ -781,10 +782,10 @@ void CaptureDialog::triggerCapture()
QString cmdLine = ui->cmdline->text();
LiveCapture *live =
m_CaptureCallback(exe, workingDir, cmdLine, settings().Environment, settings().Options);
if(ui->queueFrameCap->isChecked() && live != NULL)
live->QueueCapture((int)ui->queuedFrame->value());
m_CaptureCallback(exe, workingDir, cmdLine, settings().Environment, settings().Options,
[this](LiveCapture *live) {
if(ui->queueFrameCap->isChecked())
live->QueueCapture((int)ui->queuedFrame->value());
});
}
}