aboutsummaryrefslogtreecommitdiff
path: root/src/qt/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/utils.cpp')
-rw-r--r--src/qt/utils.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/qt/utils.cpp b/src/qt/utils.cpp
new file mode 100644
index 00000000..cb0ad4f9
--- /dev/null
+++ b/src/qt/utils.cpp
@@ -0,0 +1,20 @@
+#include <QtCore>
+
+#include "utils.h"
+
+bool fileExists(QString path) {
+ QFileInfo check_file(path);
+ if (check_file.exists() && check_file.isFile())
+ return true;
+ else
+ return false;
+}
+
+QString getAccountName(){
+ QString accountName = qgetenv("USER"); // mac/linux
+ if (accountName.isEmpty())
+ accountName = qgetenv("USERNAME"); // Windows
+ if (accountName.isEmpty())
+ accountName = "My monero Account";
+ return accountName;
+}