diff options
| author | Ilya Kitaev <mbg033@gmail.com> | 2016-02-24 13:25:20 +0300 |
|---|---|---|
| committer | Ilya Kitaev <mbg033@gmail.com> | 2016-02-24 13:25:20 +0300 |
| commit | 625041df1823f2ce98b53fa054bab47876717c15 (patch) | |
| tree | c12ae212e908571e9310911ba24af4d9ec7afb8b /main.cpp | |
| parent | 1195a89d06956dd91f274182b07774dae8a1c0d2 (diff) | |
| download | monzero-gui-625041df1823f2ce98b53fa054bab47876717c15.tar.gz monzero-gui-625041df1823f2ce98b53fa054bab47876717c15.tar.xz monzero-gui-625041df1823f2ce98b53fa054bab47876717c15.zip | |
integrating cpp wallet mockups with QML
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -57,13 +57,18 @@ 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 + #ifdef Q_OS_WIN QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation); #elif defined(Q_OS_UNIX) QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation); #endif + if (!moneroAccountsRootDir.empty()) { - engine.rootContext()->setContextProperty("moneroAccountsDir", moneroAccountsRootDir.at(0) + "/Monero Accounts"); + QString moneroAccountsDir = moneroAccountsRootDir.at(0) + "/Monero Accounts"; + QDir tempDir; + tempDir.mkpath(moneroAccountsDir); + engine.rootContext()->setContextProperty("moneroAccountsDir", moneroAccountsDir); } engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath()); |
