diff --git a/src/widget.cpp b/src/widget.cpp index 594315b..f0bb212 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1148,6 +1148,16 @@ void Widget::on_pushButton_clear_clicked() // 清空临时缓存目录 }); } +void Widget::on_pushButton_clearWebCache_clicked() +{ + QtConcurrent::run([=]() + { + + QString dataLocal = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation); + QDir cacheDir(dataLocal ); + cacheDir.removeRecursively(); }); +} + quint64 Widget::dirFileSize(const QString &path) { QDir dir(path); diff --git a/src/widget.h b/src/widget.h index 254b26c..f9faad9 100644 --- a/src/widget.h +++ b/src/widget.h @@ -91,6 +91,7 @@ private slots: void on_pushButton_updateApt_clicked(); void on_pushButton_uninstall_clicked(); void on_pushButton_clear_clicked(); + void on_pushButton_clearWebCache_clicked(); void on_pushButton_website_clicked(); void on_pushButton_clicked(); void on_btn_openDir_clicked(); diff --git a/src/widget.ui b/src/widget.ui index 2b25684..e35fede 100644 --- a/src/widget.ui +++ b/src/widget.ui @@ -345,7 +345,7 @@ 0 - 2 + 3 @@ -489,7 +489,7 @@ 0 0 - 903 + 889 849 @@ -993,8 +993,8 @@ 0 0 - 869 - 325 + 851 + 324 @@ -1123,8 +1123,8 @@ 0 0 - 738 - 886 + 889 + 716 @@ -1285,7 +1285,31 @@ - + + + + color:#808080 + + + Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. + + + + + + + 0B + + + + + + + Location:/tmp/spark-store + + + + Qt::Horizontal @@ -1305,16 +1329,6 @@ - - - - color:#808080 - - - Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. - - - @@ -1328,17 +1342,10 @@ - - + + - 0B - - - - - - - Location:/tmp/spark-store + Clear Web Cache