Skip to content

Commit 03edb52

Browse files
committed
qt: Remove redundant BitcoinGUI::setTrayIconVisible
The removed BitcoinGUI::setTrayIconVisible just duplicates QSystemTrayIcon::setVisible.
1 parent 17174f8 commit 03edb52

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/qt/bitcoingui.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,10 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
615615
OptionsModel* optionsModel = _clientModel->getOptionsModel();
616616
if (optionsModel && trayIcon) {
617617
// be aware of the tray icon disable state change reported by the OptionsModel object.
618-
connect(optionsModel, &OptionsModel::showTrayIconChanged, this, &BitcoinGUI::setTrayIconVisible);
618+
connect(optionsModel, &OptionsModel::showTrayIconChanged, trayIcon, &QSystemTrayIcon::setVisible);
619619

620620
// initialize the disable state of the tray icon with the current value in the model.
621-
setTrayIconVisible(optionsModel->getShowTrayIcon());
621+
trayIcon->setVisible(optionsModel->getShowTrayIcon());
622622
}
623623
} else {
624624
// Disable possibility to show main window via action
@@ -1387,13 +1387,6 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress)
13871387
}
13881388
}
13891389

1390-
void BitcoinGUI::setTrayIconVisible(bool show_tray_con)
1391-
{
1392-
if (trayIcon) {
1393-
trayIcon->setVisible(show_tray_con);
1394-
}
1395-
}
1396-
13971390
void BitcoinGUI::showModalOverlay()
13981391
{
13991392
if (modalOverlay && (progressBar->isVisible() || modalOverlay->isLayerVisible()))

src/qt/bitcoingui.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,6 @@ public Q_SLOTS:
317317
/** Show progress dialog e.g. for verifychain */
318318
void showProgress(const QString &title, int nProgress);
319319

320-
/** When showTrayIcon setting is changed in OptionsModel show or hide the icon accordingly. */
321-
void setTrayIconVisible(bool);
322-
323320
void showModalOverlay();
324321
};
325322

0 commit comments

Comments
 (0)