History

When user is asked about disk cache, allow them to say no.

howard-stearns committed 10 years ago

Commit cd440941 parent 69289841 file · +4 −3Browse files

Showing the changes to interface/src/ui/DiskCacheEditor.cpp (1 of 1 file). Show all

Unified · Split

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