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

Method PopulateReportedBugs

qrenderdoc/Windows/MainWindow.cpp:1373–1425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1371}
1372
1373void MainWindow::PopulateReportedBugs()
1374{
1375 ui->menu_Reported_Bugs->clear();
1376
1377 ui->menu_Reported_Bugs->setEnabled(false);
1378
1379 bool unread = false;
1380
1381 int idx = 1;
1382 for(int i = m_Ctx.Config().CrashReport_ReportedBugs.count() - 1; i >= 0; i--)
1383 {
1384 BugReport &bug = m_Ctx.Config().CrashReport_ReportedBugs[i];
1385 QString fmt = tr("&%1: Bug reported at %2");
1386
1387 if(bug.unreadUpdates)
1388 fmt = tr("&%1: (Update) Bug reported at %2");
1389
1390 QAction *action = ui->menu_Reported_Bugs->addAction(
1391 fmt.arg(idx).arg(QDateTime(bug.submitDate).toString()), [this, i] {
1392 BugReport &bug = m_Ctx.Config().CrashReport_ReportedBugs[i];
1393
1394 QDesktopServices::openUrl(QString(bug.URL()));
1395
1396 bug.unreadUpdates = false;
1397 m_Ctx.Config().Save();
1398
1399 PopulateReportedBugs();
1400 });
1401 idx++;
1402
1403 if(bug.unreadUpdates)
1404 {
1405 action->setIcon(Icons::bug());
1406 unread = true;
1407 }
1408
1409 ui->menu_Reported_Bugs->setEnabled(true);
1410 }
1411
1412 ui->menu_Reported_Bugs->addSeparator();
1413 ui->menu_Reported_Bugs->addAction(ui->action_Clear_Reported_Bugs);
1414
1415 if(unread)
1416 {
1417 ui->menu_Help->setIcon(Icons::bug());
1418 ui->menu_Reported_Bugs->setIcon(Icons::bug());
1419 }
1420 else
1421 {
1422 ui->menu_Help->setIcon(QIcon());
1423 ui->menu_Reported_Bugs->setIcon(QIcon());
1424 }
1425}
1426
1427void MainWindow::CheckUpdates(bool forceCheck, UpdateResultMethod callback)
1428{

Callers

nothing calls this directly

Calls 12

trFunction · 0.50
QDateTimeClass · 0.50
QStringFunction · 0.50
QIconFunction · 0.50
clearMethod · 0.45
countMethod · 0.45
ConfigMethod · 0.45
argMethod · 0.45
toStringMethod · 0.45
URLMethod · 0.45
SaveMethod · 0.45
setIconMethod · 0.45

Tested by

no test coverage detected