mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Simplify tray icon related code
This commit is contained in:
@@ -82,7 +82,6 @@ public:
|
||||
QWidget *currentTabWidget() const;
|
||||
TransferListWidget *transferListWidget() const;
|
||||
PropertiesWidget *propertiesWidget() const;
|
||||
QMenu *trayIconMenu();
|
||||
|
||||
// ExecutionLog properties
|
||||
bool isExecutionLogEnabled() const;
|
||||
@@ -132,7 +131,7 @@ private slots:
|
||||
void focusSearchFilter();
|
||||
void reloadSessionStats();
|
||||
void reloadTorrentStats(const QVector<BitTorrent::Torrent *> &torrents);
|
||||
void loadPreferences(bool configureSession = true);
|
||||
void loadPreferences();
|
||||
void addTorrentFailed(const QString &error) const;
|
||||
void torrentNew(BitTorrent::Torrent *const torrent) const;
|
||||
void finishedTorrent(BitTorrent::Torrent *const torrent) const;
|
||||
@@ -189,16 +188,14 @@ private slots:
|
||||
void on_actionCloseWindow_triggered();
|
||||
#else
|
||||
void toggleVisibility(const QSystemTrayIcon::ActivationReason reason = QSystemTrayIcon::Trigger);
|
||||
void createSystrayDelayed();
|
||||
void updateTrayIconMenu();
|
||||
#endif
|
||||
|
||||
private:
|
||||
void createTrayIconMenu();
|
||||
#ifdef Q_OS_MACOS
|
||||
void setupDockClickHandler();
|
||||
#else
|
||||
void createTrayIcon();
|
||||
QIcon getSystrayIcon() const;
|
||||
void createTrayIcon(int retries);
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
void installPython();
|
||||
@@ -227,11 +224,12 @@ private:
|
||||
QPointer<StatsDialog> m_statsDlg;
|
||||
QPointer<TorrentCreatorDialog> m_createTorrentDlg;
|
||||
QPointer<DownloadFromURLDialog> m_downloadFromURLDialog;
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
QPointer<QSystemTrayIcon> m_systrayIcon;
|
||||
QPointer<QTimer> m_systrayCreator;
|
||||
#endif
|
||||
QPointer<QMenu> m_trayIconMenu;
|
||||
|
||||
TransferListWidget *m_transferListWidget;
|
||||
TransferListFiltersWidget *m_transferListFiltersWidget;
|
||||
PropertiesWidget *m_propertiesWidget;
|
||||
|
||||
Reference in New Issue
Block a user