forked from Public/monero-gui
IPC and custom protocol handler for monero://
This commit is contained in:
20
src/qt/utils.cpp
Normal file
20
src/qt/utils.cpp
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user