aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-10-25 01:14:32 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-11-15 19:12:19 +0200
commit03edb52eee5a87af16161c23bdc6cde91a2e5b8b (patch)
treeca9835434c7f239cf1fa62ff93fc100165d1b4b2 /src/qt/bitcoingui.cpp
parent17174f8328c44ae84479e8365c122ad8502bd7da (diff)
downloadbitcoin-03edb52eee5a87af16161c23bdc6cde91a2e5b8b.tar.xz
qt: Remove redundant BitcoinGUI::setTrayIconVisible
The removed BitcoinGUI::setTrayIconVisible just duplicates QSystemTrayIcon::setVisible.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f902c989ea..c9a260fc5f 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -615,10 +615,10 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
OptionsModel* optionsModel = _clientModel->getOptionsModel();
if (optionsModel && trayIcon) {
// be aware of the tray icon disable state change reported by the OptionsModel object.
- connect(optionsModel, &OptionsModel::showTrayIconChanged, this, &BitcoinGUI::setTrayIconVisible);
+ connect(optionsModel, &OptionsModel::showTrayIconChanged, trayIcon, &QSystemTrayIcon::setVisible);
// initialize the disable state of the tray icon with the current value in the model.
- setTrayIconVisible(optionsModel->getShowTrayIcon());
+ trayIcon->setVisible(optionsModel->getShowTrayIcon());
}
} else {
// Disable possibility to show main window via action
@@ -1387,13 +1387,6 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress)
}
}
-void BitcoinGUI::setTrayIconVisible(bool show_tray_con)
-{
- if (trayIcon) {
- trayIcon->setVisible(show_tray_con);
- }
-}
-
void BitcoinGUI::showModalOverlay()
{
if (modalOverlay && (progressBar->isVisible() || modalOverlay->isLayerVisible()))