mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
When user is asked about disk cache, allow them to say no.
This commit is contained in:
parent
6928984448
commit
cd44094efa
1 changed files with 4 additions and 3 deletions
|
@ -138,9 +138,10 @@ void DiskCacheEditor::refresh() {
|
||||||
void DiskCacheEditor::clear() {
|
void DiskCacheEditor::clear() {
|
||||||
QMessageBox::StandardButton buttonClicked =
|
QMessageBox::StandardButton buttonClicked =
|
||||||
OffscreenUi::question(_dialog, "Clearing disk cache",
|
OffscreenUi::question(_dialog, "Clearing disk cache",
|
||||||
"You are about to erase all the content of the disk cache,"
|
"You are about to erase all the content of the disk cache, "
|
||||||
"are you sure you want to do that?");
|
"are you sure you want to do that?",
|
||||||
if (buttonClicked == QMessageBox::Yes) {
|
QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
|
if (buttonClicked == QMessageBox::Ok) {
|
||||||
if (auto cache = NetworkAccessManager::getInstance().cache()) {
|
if (auto cache = NetworkAccessManager::getInstance().cache()) {
|
||||||
qDebug() << "DiskCacheEditor::clear(): Clearing disk cache.";
|
qDebug() << "DiskCacheEditor::clear(): Clearing disk cache.";
|
||||||
cache->clear();
|
cache->clear();
|
||||||
|
|
Loading…
Reference in a new issue