Wizard: rework

This commit is contained in:
tobtoht
2021-03-12 20:01:53 +01:00
parent cc5b3c3c27
commit 6741e684f5
63 changed files with 2781 additions and 1783 deletions
+18
View File
@@ -468,4 +468,22 @@ QTextCharFormat Utils::addressTextFormat(const SubaddressIndex &index) {
return rec;
}
return QTextCharFormat();
}
bool Utils::isTorsocks() {
#if defined(Q_OS_MAC)
return qgetenv("DYLD_INSERT_LIBRARIES").indexOf("libtorsocks") >= 0;
#elif defined(Q_OS_LINUX)
return qgetenv("LD_PRELOAD").indexOf("libtorsocks") >= 0;
#else
return false;
#endif
}
QString Utils::defaultWalletDir() {
#if defined(Q_OS_LINUX) or defined(Q_OS_MAC)
return QString("%1/Monero/wallets").arg(QDir::homePath());
#elif defined(Q_OS_WIN)
return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/Monero/wallets";
#endif
}