mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-03 17:39:49 +00:00
.desktop: fix application file path
This commit is contained in:
parent
204cdde39d
commit
a73d715b72
2 changed files with 11 additions and 1 deletions
|
@ -202,6 +202,15 @@ QString applicationPath() {
|
||||||
return applicationPath;
|
return applicationPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString applicationFilePath() {
|
||||||
|
QString appimagePath = qgetenv("APPIMAGE");
|
||||||
|
if (!appimagePath.isEmpty()) {
|
||||||
|
return appimagePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QApplication::applicationFilePath();
|
||||||
|
}
|
||||||
|
|
||||||
bool validateJSON(const QByteArray &blob) {
|
bool validateJSON(const QByteArray &blob) {
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(blob);
|
QJsonDocument doc = QJsonDocument::fromJson(blob);
|
||||||
QString jsonString = doc.toJson(QJsonDocument::Indented);
|
QString jsonString = doc.toJson(QJsonDocument::Indented);
|
||||||
|
@ -267,7 +276,7 @@ QString xdgDesktopEntry(){
|
||||||
"Icon=feather\n"
|
"Icon=feather\n"
|
||||||
"Categories=Network;GNOME;Qt;\n"
|
"Categories=Network;GNOME;Qt;\n"
|
||||||
"StartupNotify=false\n"
|
"StartupNotify=false\n"
|
||||||
).arg(QApplication::applicationFilePath());
|
).arg(applicationFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool xdgDesktopEntryWrite(const QString &path){
|
bool xdgDesktopEntryWrite(const QString &path){
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace Utils
|
||||||
bool dirExists(const QString &path);
|
bool dirExists(const QString &path);
|
||||||
QString defaultWalletDir();
|
QString defaultWalletDir();
|
||||||
QString applicationPath();
|
QString applicationPath();
|
||||||
|
QString applicationFilePath();
|
||||||
|
|
||||||
bool validateJSON(const QByteArray &blob);
|
bool validateJSON(const QByteArray &blob);
|
||||||
bool readJsonFile(QIODevice &device, QSettings::SettingsMap &map);
|
bool readJsonFile(QIODevice &device, QSettings::SettingsMap &map);
|
||||||
|
|
Loading…
Reference in a new issue