Skip to content

Commit

Permalink
fix: correct autostart desktop file 'Hidden' check
Browse files Browse the repository at this point in the history
与上个提交相关,检查 Hidden 值的方式调整并修正对应的注释。

Log:
  • Loading branch information
BLumia committed Sep 4, 2023
1 parent 94f5621 commit ef6ed05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desktopintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ bool DesktopIntegration::isAutoStart(const QString &desktopId) const
const QString & autoStartPath(QDir(path).absoluteFilePath(autoStartFileRelPath));
if (QFile::exists(autoStartPath)) {
DDesktopEntry entry(autoStartPath);
if (entry.rawValue("Hidden", "Desktop Entry", "False") == QLatin1String("False")) {
if (entry.rawValue("Hidden", "Desktop Entry", "false") == QLatin1String("false")) {
return true;
}
return false;
Expand All @@ -175,7 +175,7 @@ void DesktopIntegration::setAutoStart(const QString &desktopId, bool on)
const QString autoStartPath(QDir(DStandardPaths::path(DStandardPaths::XDG::ConfigHome)).absoluteFilePath(autoStartFileRelPath));

// Ensure there is a autostart entry file under the $XDG_CONFIG_HOME/autostart/ folder
// Ee always create this file since the *system* might *have* one entry with hidden=True,
// Ee always create this file since the *system* might *have* one entry with Hidden=true,
// which need us to override (even though it's very not likely to happen).
bool createdByUs = false;
if (!QFile::exists(autoStartPath)) {
Expand Down

0 comments on commit ef6ed05

Please sign in to comment.