Showing the changes to interface/src/ui/DiskCacheEditor.cpp (1 of 1 file). Show all
Unified · Split
| @@ -138,9 +138,10 @@ void DiskCacheEditor::refresh() { · 137 unmodified lines | ||
| 138 | 138 | void DiskCacheEditor::clear() { |
| 139 | 139 | QMessageBox::StandardButton buttonClicked = |
| 140 | 140 | OffscreenUi::question(_dialog, "Clearing disk cache", |
| 141 | − "You are about to erase all the content of the disk cache," | |
| 142 | − "are you sure you want to do that?"); | |
| 143 | − if (buttonClicked == QMessageBox::Yes) { | |
| 141 | + "You are about to erase all the content of the disk cache, " | |
| 142 | + "are you sure you want to do that?", | |
| 143 | + QMessageBox::Ok | QMessageBox::Cancel); | |
| 144 | + if (buttonClicked == QMessageBox::Ok) { | |
| 144 | 145 | if (auto cache = NetworkAccessManager::getInstance().cache()) { |
| 145 | 146 | qDebug() << "DiskCacheEditor::clear(): Clearing disk cache."; |
| 146 | 147 | cache->clear(); |