fix tray bug
This commit is contained in:
parent
d6641a7a6e
commit
9f46e710a9
2 changed files with 3 additions and 1 deletions
|
@ -125,6 +125,8 @@ void MainWindow::setupTrayIcon() {
|
|||
}
|
||||
|
||||
void MainWindow::cleanTrayIcon() {
|
||||
if (m_trayIcon == nullptr)
|
||||
return;
|
||||
m_trayIcon->hide();
|
||||
m_trayIconMenu->deleteLater();
|
||||
m_trayIcon->deleteLater();
|
||||
|
|
|
@ -30,7 +30,7 @@ private:
|
|||
QWebEngineProfile *prepareProfile();
|
||||
DiscordPage *m_discordPage;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
QSystemTrayIcon *m_trayIcon;
|
||||
QSystemTrayIcon *m_trayIcon = nullptr;
|
||||
QMenu *m_trayIconMenu;
|
||||
QSettings *m_settings;
|
||||
bool m_wasMaximized;
|
||||
|
|
Loading…
Reference in a new issue