aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/qt/src/util.cpp')
-rw-r--r--lang/qt/src/util.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/lang/qt/src/util.cpp b/lang/qt/src/util.cpp
index 297c76a6..4b437ffb 100644
--- a/lang/qt/src/util.cpp
+++ b/lang/qt/src/util.cpp
@@ -37,6 +37,7 @@
#include "util.h"
+#include "cleaner.h"
#include "qgpgme_debug.h"
#include <QFile>
@@ -68,17 +69,6 @@ QStringList toFingerprints(const std::vector<GpgME::Key> &keys)
return fprs;
}
-void removeFile(const QString &fileName)
-{
- if (QFile::exists(fileName)) {
- if (QFile::remove(fileName)) {
- qCDebug(QGPGME_LOG) << __func__ << "- Removed file" << fileName;
- } else {
- qCDebug(QGPGME_LOG) << __func__ << "- Removing file" << fileName << "failed";
- }
- }
-}
-
/**
* Generates a string of random characters for the file names of temporary files.
* Never use this for generating passwords or similar use cases requiring highly
@@ -157,7 +147,7 @@ PartialFileGuard::PartialFileGuard(const QString &fileName)
PartialFileGuard::~PartialFileGuard()
{
if (!mTempFileName.isEmpty()) {
- removeFile(mTempFileName);
+ Cleaner::removeFile(mTempFileName);
}
}