MCPcopy Create free account
hub / github.com/SaschaWillems/VulkanCapsViewer / checkReportDatabaseState

Method checkReportDatabaseState

vulkanCapsViewer.cpp:2029–2064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2027}
2028
2029void VulkanCapsViewer::checkReportDatabaseState()
2030{
2031 if (vulkanGPUs[selectedDeviceIndex].hasFeaturModifyingTool) {
2032 setReportState(ReportState::update_disabled);
2033 return;
2034 }
2035
2036 ui.labelDevicePresent->setText("<font color='#000000'>Connecting to database...</font>");
2037 ui.toolButtonOnlineDevice->setEnabled(false);
2038
2039 QApplication::setOverrideCursor(Qt::WaitCursor);
2040 QString message;
2041 if (!database.checkServerConnection(message))
2042 {
2043 ui.labelDevicePresent->setText("<font color='#FF0000'>Could not connect to the database!\n\nPlease check your internet connection and proxy settings!</font>");
2044 QApplication::restoreOverrideCursor();
2045 return;
2046 }
2047
2048 int reportId;
2049 if (database.checkReportPresent(vulkanGPUs[selectedDeviceIndex], reportId))
2050 {
2051 // Check if report can be updated with new information not yet stored in the database
2052 if (database.checkCanUpdateReport(vulkanGPUs[selectedDeviceIndex], reportId)) {
2053 setReportState(ReportState::is_updatable);
2054 }
2055 else {
2056 setReportState(ReportState::is_present);
2057 }
2058 }
2059 else
2060 {
2061 setReportState(ReportState::not_present);
2062 }
2063 QApplication::restoreOverrideCursor();
2064}
2065
2066// Upload a report without visual dialogs (e.g. from command line)
2067int VulkanCapsViewer::uploadReportNonVisual(int deviceIndex, QString submitter, QString comment)

Callers

nothing calls this directly

Calls 3

checkServerConnectionMethod · 0.80
checkReportPresentMethod · 0.80
checkCanUpdateReportMethod · 0.80

Tested by

no test coverage detected