Add a tool menu item that will recompress a capture file

This commit is contained in:
baldurk
2017-11-16 19:06:45 +00:00
parent 13de20612b
commit 016bc29609
16 changed files with 289 additions and 64 deletions
+11
View File
@@ -183,6 +183,8 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
ui->action_Resolve_Symbols->setEnabled(false);
ui->action_Resolve_Symbols->setText(tr("Resolve Symbols"));
ui->action_Recompress_Capture->setEnabled(false);
LambdaThread *th = new LambdaThread([this]() {
m_Ctx.Config().AddAndroidHosts();
for(RemoteHost *host : m_Ctx.Config().RemoteHosts)
@@ -1295,6 +1297,8 @@ void MainWindow::OnCaptureLoaded()
statusProgress->setVisible(false);
ui->action_Recompress_Capture->setEnabled(true);
ui->action_Start_Replay_Loop->setEnabled(true);
setCaptureHasErrors(!m_Ctx.DebugMessages().empty());
@@ -1335,6 +1339,8 @@ void MainWindow::OnCaptureClosed()
ui->action_Resolve_Symbols->setEnabled(false);
ui->action_Resolve_Symbols->setText(tr("Resolve Symbols"));
ui->action_Recompress_Capture->setEnabled(false);
SetTitle();
// if the remote sever disconnected during capture replay, resort back to a 'disconnected' state
@@ -1628,6 +1634,11 @@ void MainWindow::on_action_Resolve_Symbols_triggered()
m_Ctx.GetAPIInspector()->Refresh();
}
void MainWindow::on_action_Recompress_Capture_triggered()
{
m_Ctx.RecompressCapture();
}
void MainWindow::on_action_Start_Replay_Loop_triggered()
{
if(!m_Ctx.IsCaptureLoaded())