diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 20:42:18 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 20:42:18 -0600 |
commit | 9ee857cfe81d576da157a5561c72d8eede524919 (patch) | |
tree | 75f3d90b7bd2284db92343d6eeaaa8aa926a3df4 /kcontrol/privacy/kprivacymanager.cpp | |
parent | fa8e4262f55433b54a2e97922b86ce922ccef1d8 (diff) | |
download | tdebase-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.cpp | 14 |
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) { |