| 684 | } |
| 685 | |
| 686 | void MainWindow::LoadFromFilename(const QString &filename, bool temporary) |
| 687 | { |
| 688 | QFileInfo path(filename); |
| 689 | QString ext = path.suffix().toLower(); |
| 690 | |
| 691 | if(ext == lit("rdc")) |
| 692 | { |
| 693 | LoadCapture(filename, m_Ctx.Config().DefaultReplayOptions, temporary, true); |
| 694 | } |
| 695 | else if(ext == lit("cap")) |
| 696 | { |
| 697 | OpenCaptureConfigFile(filename, false); |
| 698 | } |
| 699 | else if(ext == lit("exe")) |
| 700 | { |
| 701 | OpenCaptureConfigFile(filename, true); |
| 702 | } |
| 703 | else |
| 704 | { |
| 705 | // not a recognised filetype, see if we can load it anyway |
| 706 | LoadCapture(filename, m_Ctx.Config().DefaultReplayOptions, temporary, true); |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | void MainWindow::OnCaptureTrigger(const QString &exe, const QString &workingDir, |
| 711 | const QString &cmdLine, |