mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +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;
|
||||
}
|
||||
|
||||
QString applicationFilePath() {
|
||||
QString appimagePath = qgetenv("APPIMAGE");
|
||||
if (!appimagePath.isEmpty()) {
|
||||
return appimagePath;
|
||||
}
|
||||
|
||||
return QApplication::applicationFilePath();
|
||||
}
|
||||
|
||||
bool validateJSON(const QByteArray &blob) {
|
||||
QJsonDocument doc = QJsonDocument::fromJson(blob);
|
||||
QString jsonString = doc.toJson(QJsonDocument::Indented);
|
||||
|
@ -267,7 +276,7 @@ QString xdgDesktopEntry(){
|
|||
"Icon=feather\n"
|
||||
"Categories=Network;GNOME;Qt;\n"
|
||||
"StartupNotify=false\n"
|
||||
).arg(QApplication::applicationFilePath());
|
||||
).arg(applicationFilePath());
|
||||
}
|
||||
|
||||
bool xdgDesktopEntryWrite(const QString &path){
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace Utils
|
|||
bool dirExists(const QString &path);
|
||||
QString defaultWalletDir();
|
||||
QString applicationPath();
|
||||
QString applicationFilePath();
|
||||
|
||||
bool validateJSON(const QByteArray &blob);
|
||||
bool readJsonFile(QIODevice &device, QSettings::SettingsMap &map);
|
||||
|
|
Loading…
Reference in a new issue