| 101 | } |
| 102 | |
| 103 | void SettingsDatasetsPage::clearCache() { |
| 104 | QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/datasets_local/")); |
| 105 | if (dir.exists()) { |
| 106 | dir.removeRecursively(); |
| 107 | dir.mkpath(dir.path()); |
| 108 | |
| 109 | ui.lFiles->setText(i18n("Files - 0")); |
| 110 | ui.lSize->setText(i18n("Total size - 0B")); |
| 111 | ui.bClearCache->setEnabled(false); |
| 112 | QMessageBox::information(this, i18n("Datasets cache"), i18n("Downloaded files successfully deleted.")); |
| 113 | } |
| 114 | } |
nothing calls this directly
no test coverage detected