MCPcopy Create free account
hub / github.com/baldurk/renderdoc / PopulateRecentCaptureFiles

Method PopulateRecentCaptureFiles

qrenderdoc/Windows/MainWindow.cpp:1286–1311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1284}
1285
1286void MainWindow::PopulateRecentCaptureFiles()
1287{
1288 ui->menu_Recent_Capture_Files->clear();
1289
1290 ui->menu_Recent_Capture_Files->setEnabled(false);
1291
1292 int idx = 1;
1293 for(int i = m_Ctx.Config().RecentCaptureFiles.count() - 1; i >= 0; i--)
1294 {
1295 QString filename = m_Ctx.Config().RecentCaptureFiles[i];
1296 QString filenameDisplay = filename;
1297 filenameDisplay.replace(QLatin1Char('&'), lit("&&"));
1298 ui->menu_Recent_Capture_Files->addAction(QFormatStr("&%1 %2").arg(idx).arg(filenameDisplay),
1299 [this, filename] { recentCaptureFile(filename); });
1300 idx++;
1301
1302 ui->menu_Recent_Capture_Files->setEnabled(true);
1303
1304 // only populate the 9 most recent, even if more exist in memory
1305 if(idx == 10)
1306 break;
1307 }
1308
1309 ui->menu_Recent_Capture_Files->addSeparator();
1310 ui->menu_Recent_Capture_Files->addAction(ui->action_Clear_Capture_Files_History);
1311}
1312
1313void MainWindow::ClearRecentCaptureSettings()
1314{

Callers 1

saveCaptureMethod · 0.80

Calls 6

QLatin1CharClass · 0.85
clearMethod · 0.45
countMethod · 0.45
ConfigMethod · 0.45
replaceMethod · 0.45
argMethod · 0.45

Tested by

no test coverage detected