| 317 | } |
| 318 | |
| 319 | void LiveCapture::openNewWindow_triggered() |
| 320 | { |
| 321 | if(ui->captures->selectedItems().size() == 1) |
| 322 | { |
| 323 | Capture *cap = GetCapture(ui->captures->selectedItems()[0]); |
| 324 | |
| 325 | QString temppath = m_Ctx.TempCaptureFilename(lit("newwindow")); |
| 326 | |
| 327 | if(!cap->local) |
| 328 | { |
| 329 | RDDialog::critical(this, tr("Cannot open new instance"), |
| 330 | tr("Can't open capture in new instance with remote server in use")); |
| 331 | return; |
| 332 | } |
| 333 | |
| 334 | QFile f(cap->path); |
| 335 | |
| 336 | if(!f.copy(temppath)) |
| 337 | { |
| 338 | RDDialog::critical(this, tr("Cannot save temporary capture"), |
| 339 | tr("Couldn't save capture to temporary location\n%1").arg(f.errorString())); |
| 340 | return; |
| 341 | } |
| 342 | |
| 343 | QStringList args; |
| 344 | args << lit("--tempfile") << temppath; |
| 345 | QProcess::startDetached(qApp->applicationFilePath(), args); |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | void LiveCapture::saveCapture_triggered() |
| 350 | { |
nothing calls this directly
no test coverage detected