mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-20 08:38:40 +02:00
fix macOS built-in updater
This commit is contained in:
@@ -126,6 +126,16 @@ QString defaultWalletDir() {
|
||||
#endif
|
||||
}
|
||||
|
||||
QString applicationPath() {
|
||||
QString applicationPath = qgetenv("APPIMAGE");
|
||||
if (!applicationPath.isEmpty()) {
|
||||
applicationPath = QFileInfo(applicationPath).absoluteDir().path();
|
||||
} else {
|
||||
applicationPath = QCoreApplication::applicationDirPath();
|
||||
}
|
||||
return applicationPath;
|
||||
}
|
||||
|
||||
bool validateJSON(const QByteArray &blob) {
|
||||
QJsonDocument doc = QJsonDocument::fromJson(blob);
|
||||
QString jsonString = doc.toJson(QJsonDocument::Indented);
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Utils
|
||||
|
||||
bool dirExists(const QString &path);
|
||||
QString defaultWalletDir();
|
||||
QString applicationPath();
|
||||
|
||||
bool validateJSON(const QByteArray &blob);
|
||||
bool readJsonFile(QIODevice &device, QSettings::SettingsMap &map);
|
||||
|
||||
Reference in New Issue
Block a user