Skip to content

Commit 8dfe6be

Browse files
committed
add remove cache for toolbar exit
1 parent 30a2816 commit 8dfe6be

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/SetupWidgets.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ QWidget *bgMenu;
1717
static QVBoxLayout *penSettingsLayout;
1818
static QVBoxLayout *pageSettingsLayout;
1919

20+
extern void clearCache();
21+
2022
void setupWidgets(){
2123
// Pen Settings Menu
2224
QWidget *penSettings = new QWidget();
@@ -124,6 +126,7 @@ void setupWidgets(){
124126
args4 << "set" << "org.gnome.mutter" << "overlay-key" << "'SUPER_L'";
125127
p4.execute("gsettings", args4);
126128
#endif
129+
clearCache();
127130
enable_erc();
128131
exit(0);
129132
});

src/widgets/DrawingWidget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,5 +801,7 @@ QString generateRandomString(int length) {
801801
}
802802

803803
void clearCache(){
804-
removeDirectory(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/pardus-pen/");
804+
QString cache_main = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/pardus-pen/";
805+
debug("Clear cache:%s\n", cache_main.toStdString().c_str());
806+
removeDirectory(cache_main);
805807
}

0 commit comments

Comments
 (0)