add isWindows property

This commit is contained in:
Jaquee 2016-11-29 17:06:06 +01:00
parent 26abdee5c4
commit 1a610db431
No known key found for this signature in database
GPG key ID: 384E52B09F45DC39

View file

@ -110,12 +110,14 @@ int main(int argc, char *argv[])
// 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
// Windows, ~/Monero Accounts/ on nix / osx
bool isWindows = false;
#ifdef Q_OS_WIN
isWindows = true;
QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation);
#elif defined(Q_OS_UNIX)
QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
#endif
engine.rootContext()->setContextProperty("isWindows", isWindows);
if (!moneroAccountsRootDir.empty()) {
QString moneroAccountsDir = moneroAccountsRootDir.at(0) + "/Monero/wallets";