Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: correct typos in desktopintegration.cpp #24

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktopintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,16 @@
return false;
}

// only affact the one in XDG_CONFIG_HOME, don't care about the system one (even if there is one).
// only affect the one in XDG_CONFIG_HOME, don't care about the system one (even if there is one).
void DesktopIntegration::setAutoStart(const QString &desktopId, bool on)

Check warning on line 179 in desktopintegration.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

The function 'setAutoStart' is never used.
{
QString srcFilePath = AppInfo::fullPathByDesktopId(desktopId);

Check warning on line 181 in desktopintegration.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Local variable 'srcFilePath' shadows outer variable
if (srcFilePath.isEmpty()) return;

const QString autoStartFileRelPath(QString("autostart/%1").arg(desktopId));
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
// Ensure there is an 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,
// which need us to override (even though it's very not likely to happen).
bool createdByUs = false;
Expand Down