From 9ee857cfe81d576da157a5561c72d8eede524919 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Sat, 2 Mar 2013 20:42:18 -0600 Subject: Provide kcmprivacy option to delete kpdf metadata. This resolves bug report 1216. --- kcontrol/privacy/kprivacymanager.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'kcontrol/privacy/kprivacymanager.cpp') diff --git a/kcontrol/privacy/kprivacymanager.cpp b/kcontrol/privacy/kprivacymanager.cpp index c52c1b5c4..c1ff81338 100644 --- a/kcontrol/privacy/kprivacymanager.cpp +++ b/kcontrol/privacy/kprivacymanager.cpp @@ -145,7 +145,7 @@ bool KPrivacyManager::clearFavIcons() { TQDir favIconDir(TDEGlobal::dirs()->saveLocation( "cache", "favicons/" )); favIconDir.setFilter( TQDir::Files ); - + TQStringList entries = favIconDir.entryList(); // erase all files in favicon directory @@ -154,6 +154,18 @@ bool KPrivacyManager::clearFavIcons() return m_error; } +bool KPrivacyManager::clearKPDFDocData() +{ + TQDir kPDFDir(TDEGlobal::dirs()->saveLocation( "data", "kpdf/" )); + kPDFDir.setFilter( TQDir::Files ); + + TQStringList entries = kPDFDir.entryList(); + + // erase all files in kpdf directory + for( TQStringList::Iterator it = entries.begin() ; it != entries.end() ; ++it) + if(!kPDFDir.remove(*it)) m_error = true; + return m_error; +} bool KPrivacyManager::isApplicationRegistered(const TQString &appName) { -- cgit v1.2.1