summaryrefslogtreecommitdiffstats
path: root/kcontrol/privacy/kprivacymanager.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <[email protected]>2013-03-02 20:42:18 -0600
committerDarrell Anderson <[email protected]>2013-03-02 20:42:18 -0600
commit9ee857cfe81d576da157a5561c72d8eede524919 (patch)
tree75f3d90b7bd2284db92343d6eeaaa8aa926a3df4 /kcontrol/privacy/kprivacymanager.cpp
parentfa8e4262f55433b54a2e97922b86ce922ccef1d8 (diff)
downloadtdebase-9ee857cfe81d576da157a5561c72d8eede524919.tar.gz
tdebase-9ee857cfe81d576da157a5561c72d8eede524919.zip
Provide kcmprivacy option to delete kpdf metadata.
This resolves bug report 1216.
Diffstat (limited to 'kcontrol/privacy/kprivacymanager.cpp')
-rw-r--r--kcontrol/privacy/kprivacymanager.cpp14
1 files changed, 13 insertions, 1 deletions
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)
{