| 201 | } |
| 202 | |
| 203 | void ScreenshotManager::uploadDone(const QString &fileName, const QString &url, const QString &deleteHash) |
| 204 | { |
| 205 | for (Screenshot *screenshot : qAsConst(mScreenshots)) { |
| 206 | if (screenshot->options().fileName == fileName |
| 207 | || screenshot->unloadedFileName() == fileName) { |
| 208 | screenshot->uploadDone(url); |
| 209 | |
| 210 | if (screenshot->options().file) { |
| 211 | updateHistory(fileName, url, deleteHash); |
| 212 | } else { |
| 213 | saveHistory("", url, deleteHash); |
| 214 | } |
| 215 | |
| 216 | return; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | // If we get here, it's because the screenshot upload wasn't on the current screenshot list, which means it's a View History/Upload Later upload. |
| 221 | updateHistory(fileName, url, deleteHash); |
| 222 | } |
| 223 | |
| 224 | // Singleton |
| 225 | ScreenshotManager *ScreenshotManager::mInstance = nullptr; |
nothing calls this directly
no outgoing calls
no test coverage detected