refs #144 , improved file deleter , no dependency of QObject anymore, now using single deleter object

This commit is contained in:
Klaus Basan
2014-02-20 15:08:48 +01:00
parent 7177d53552
commit 59ff750b4a
4 changed files with 24 additions and 15 deletions

View File

@@ -3,6 +3,17 @@
namespace BlackMisc
{
void CFileDeleter::addFile(const QString &file)
{
if (file.isEmpty()) return;
if (!this->m_fileNames.contains(file)) this->m_fileNames.append(file);
}
void CFileDeleter::addFileForDeletion(const QString &file)
{
CFileDeleter::fileDeleter().addFile(file);
}
CFileDeleter::~CFileDeleter()
{
foreach(const QString fn, this->m_fileNames)