| 2027 | } |
| 2028 | |
| 2029 | void 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) |
| 2067 | int VulkanCapsViewer::uploadReportNonVisual(int deviceIndex, QString submitter, QString comment) |
nothing calls this directly
no test coverage detected