From ef6ed05f432becdab2558c64dddfed78f13aef22 Mon Sep 17 00:00:00 2001 From: Wang Zichong Date: Mon, 4 Sep 2023 13:56:04 +0800 Subject: [PATCH] fix: correct autostart desktop file 'Hidden' check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 与上个提交相关,检查 Hidden 值的方式调整并修正对应的注释。 Log: --- desktopintegration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktopintegration.cpp b/desktopintegration.cpp index d9cb7d86..db1c2b95 100644 --- a/desktopintegration.cpp +++ b/desktopintegration.cpp @@ -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; @@ -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)) {