aboutsummaryrefslogtreecommitdiff
path: root/src/qt/utils.cpp
blob: cb0ad4f90e6f8d9aa60985c4d07ecb3e8f8e2961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}