mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
add isWindows property
This commit is contained in:
parent
26abdee5c4
commit
1a610db431
1 changed files with 3 additions and 1 deletions
4
main.cpp
4
main.cpp
|
@ -110,12 +110,14 @@ int main(int argc, char *argv[])
|
||||||
// to save the wallet file (.keys, .bin), they have to be user-accessible for
|
// to save the wallet file (.keys, .bin), they have to be user-accessible for
|
||||||
// backups - I reckon we save that in My Documents\Monero Accounts\ on
|
// backups - I reckon we save that in My Documents\Monero Accounts\ on
|
||||||
// Windows, ~/Monero Accounts/ on nix / osx
|
// Windows, ~/Monero Accounts/ on nix / osx
|
||||||
|
bool isWindows = false;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
isWindows = true;
|
||||||
QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation);
|
QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation);
|
||||||
#elif defined(Q_OS_UNIX)
|
#elif defined(Q_OS_UNIX)
|
||||||
QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
|
QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
|
||||||
#endif
|
#endif
|
||||||
|
engine.rootContext()->setContextProperty("isWindows", isWindows);
|
||||||
|
|
||||||
if (!moneroAccountsRootDir.empty()) {
|
if (!moneroAccountsRootDir.empty()) {
|
||||||
QString moneroAccountsDir = moneroAccountsRootDir.at(0) + "/Monero/wallets";
|
QString moneroAccountsDir = moneroAccountsRootDir.at(0) + "/Monero/wallets";
|
||||||
|
|
Loading…
Reference in a new issue