MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / on_InvestigateProcessButton_clicked

Method on_InvestigateProcessButton_clicked

PeaceMakerGUI/mainwindow.cpp:552–582  ·  view source on GitHub ↗

* @brief MainWindow::on_InvestigateProcessButton_clicked - Open the process investigation window for the selected process. */

Source from the content-addressed store, hash-verified

550 * @brief MainWindow::on_InvestigateProcessButton_clicked - Open the process investigation window for the selected process.
551 */
552void MainWindow::on_InvestigateProcessButton_clicked()
553{
554 PPROCESS_DETAILED_REQUEST processDetailed;
555 PROCESS_SIZES_REQUEST processSizes;
556 int selectedRow;
557
558 if(this->ui->ProcessesTable->selectedItems().size() == 0)
559 {
560 return;
561 }
562
563 //
564 // Since rows start from 0, we need to subtract
565 // the row count from the table size to get the
566 // right index.
567 //
568 selectedRow = processes.size() - 1 - this->ui->ProcessesTable->selectedItems()[0]->row();
569
570 processSizes = communicator.GetProcessSizes(processes[selectedRow].ProcessId, processes[selectedRow].EpochExecutionTime);
571 processDetailed = communicator.RequestDetailedProcess(processes[selectedRow].ProcessId, processes[selectedRow].EpochExecutionTime, processSizes.ImageSize, processSizes.StackSize);
572 if (processDetailed == NULL || processDetailed->Populated == FALSE)
573 {
574 pmlog("main: Failed to retrieve a detailed process report.");
575 return;
576 }
577
578 this->investigatorWindow->UpdateNewProcess(*processDetailed);
579 free(processDetailed);
580 this->investigatorWindow->show();
581 this->investigatorWindow->RefreshWidgets();
582}
583
584/**
585 * @brief MainWindow::on_ProcessSearch_editingFinished - Search for the specified process.

Callers

nothing calls this directly

Calls 5

pmlogFunction · 0.85
GetProcessSizesMethod · 0.80
UpdateNewProcessMethod · 0.80
RefreshWidgetsMethod · 0.80

Tested by

no test coverage detected