3535#include < qt/macdockiconhandler.h>
3636#endif
3737#ifdef BITCOIN_QT_WIN_TASKBAR
38- #include < QWinTaskbarButton>
39- #include < QWinTaskbarProgress>
38+ #include < qt/wintaskbarprogress.h>
4039#endif
4140
4241#include < chain.h>
@@ -232,7 +231,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
232231 m_app_nap_inhibitor = new CAppNapInhibitor;
233232#endif
234233#ifdef BITCOIN_QT_WIN_TASKBAR
235- m_taskbar_button = new QWinTaskbarButton (this );
234+ m_taskbar_progress = new WinTaskbarProgress (this );
235+ m_taskbar_progress->setWindow (this );
236236#endif
237237
238238 GUIUtil::handleCloseWindowShortcut (this );
@@ -1235,11 +1235,6 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
12351235
12361236 tooltip = tr (" Processed %n block(s) of transaction history." , " " , count);
12371237
1238- #ifdef BITCOIN_QT_WIN_TASKBAR
1239- m_taskbar_button->setWindow (windowHandle ());
1240- QWinTaskbarProgress* taskbar_progress = m_taskbar_button->progress ();
1241- #endif
1242-
12431238 // Set icon state: spinning if catching up, tick otherwise
12441239 if (secs < MAX_BLOCK_TIME_GAP) {
12451240 tooltip = tr (" Up to date" ) + QString (" .<br>" ) + tooltip;
@@ -1256,7 +1251,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
12561251 progressBarLabel->setVisible (false );
12571252 progressBar->setVisible (false );
12581253#ifdef BITCOIN_QT_WIN_TASKBAR
1259- taskbar_progress ->setVisible (false );
1254+ m_taskbar_progress ->setVisible (false );
12601255#endif
12611256 }
12621257 else
@@ -1273,8 +1268,8 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
12731268 progressBar->setValue (nVerificationProgress * 1000000000.0 + 0.5 );
12741269 progressBar->setVisible (true );
12751270#ifdef BITCOIN_QT_WIN_TASKBAR
1276- taskbar_progress ->setValue (qRound (nVerificationProgress * 100.0 ));
1277- taskbar_progress ->setVisible (true );
1271+ m_taskbar_progress ->setValue (qRound (nVerificationProgress * 100.0 ));
1272+ m_taskbar_progress ->setVisible (true );
12781273#endif
12791274
12801275 tooltip = tr (" Catching up…" ) + QString (" <br>" ) + tooltip;
0 commit comments