aboutsummaryrefslogtreecommitdiff
path: root/oshelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'oshelper.cpp')
-rw-r--r--oshelper.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/oshelper.cpp b/oshelper.cpp
index cecae38e..ecb85ec1 100644
--- a/oshelper.cpp
+++ b/oshelper.cpp
@@ -1,6 +1,8 @@
#include "oshelper.h"
#include <QTemporaryFile>
#include <QDir>
+#include <QDebug>
+#include <QString>
OSHelper::OSHelper(QObject *parent) : QObject(parent)
{
@@ -18,6 +20,16 @@ QString OSHelper::temporaryFilename() const
return tempFileName;
}
+bool OSHelper::removeTemporaryWallet(const QString &fileName) const
+{
+ // Temporary files should be deleted automatically by default, in case they wouldn't, we delete them manually as well
+ bool cache_deleted = QFile::remove(fileName);
+ bool address_deleted = QFile::remove(fileName + ".address.txt");
+ bool keys_deleted = QFile::remove(fileName +".keys");
+
+ return cache_deleted && address_deleted && keys_deleted;
+}
+
QString OSHelper::temporaryPath() const
{
return QDir::tempPath();