Simplify tray icon related code

This commit is contained in:
Chocobo1
2021-12-13 15:56:20 +08:00
parent b8a84dbd83
commit 85777ea491
8 changed files with 125 additions and 140 deletions

View File

@@ -210,12 +210,12 @@ void Preferences::setHideZeroComboValues(const int n)
// In Mac OS X the dock is sufficient for our needs so we disable the sys tray functionality.
// See extensive discussion in https://github.com/qbittorrent/qBittorrent/pull/3018
#ifndef Q_OS_MACOS
bool Preferences::systrayIntegration() const
bool Preferences::systemTrayEnabled() const
{
return value("Preferences/General/SystrayEnabled", true);
}
void Preferences::setSystrayIntegration(const bool enabled)
void Preferences::setSystemTrayEnabled(const bool enabled)
{
setValue("Preferences/General/SystrayEnabled", enabled);
}

View File

@@ -315,8 +315,8 @@ public:
bool confirmRemoveAllTags() const;
void setConfirmRemoveAllTags(bool enabled);
#ifndef Q_OS_MACOS
bool systrayIntegration() const;
void setSystrayIntegration(bool enabled);
bool systemTrayEnabled() const;
void setSystemTrayEnabled(bool enabled);
bool minimizeToTrayNotified() const;
void setMinimizeToTrayNotified(bool b);
bool minimizeToTray() const;