fix macOS built-in updater

This commit is contained in:
tobtoht
2021-10-28 18:55:47 +02:00
parent 518fa831ae
commit fc9452b513
6 changed files with 55 additions and 10 deletions
+10
View File
@@ -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);