Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 8: [PATCH 08/17] chore(roots): integrate v31 identity and maintenance tooling

src/qt/bitcoingui.cpp

Before: src/qt/bitcoingui.cpp · After: src/qt/bitcoingui.cpp

File metadata
index 7a34ed8254aeb2a5a1ddac132613577e56358bfa..2c063d0acb5fccbab68cd324a17217da2d8d836d 100644

Download original patch · Release notes

Diff rows 1–48 of 48. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/qt/bitcoingui.cpp CHANGED
@@ -5,6 +5,9 @@
5
5
  #include <bitcoin-build-config.h> // IWYU pragma: keep
6
6
 
7
7
  #include <qt/bitcoingui.h>
8
+ #ifdef BITCOIN_QT_WIN_TASKBAR
9
+ #include <qt/wintaskbarprogress.h>
10
+ #endif
8
11
 
9
12
  #include <qt/bitcoinunits.h>
10
13
  #include <qt/clientmodel.h>
@@ -230,6 +233,10 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
230
233
  m_app_nap_inhibitor = new CAppNapInhibitor;
231
234
  #endif
232
235
 
236
+ #ifdef BITCOIN_QT_WIN_TASKBAR
237
+ m_taskbar_progress = new WinTaskbarProgress(this);
238
+ QApplication::instance()->installNativeEventFilter(m_taskbar_progress);
239
+ #endif
233
240
  GUIUtil::handleCloseWindowShortcut(this);
234
241
  }
235
242
 
@@ -247,6 +254,9 @@ BitcoinGUI::~BitcoinGUI()
247
254
  MacDockIconHandler::cleanup();
248
255
  #endif
249
256
 
257
+ #ifdef BITCOIN_QT_WIN_TASKBAR
258
+ QApplication::instance()->removeNativeEventFilter(m_taskbar_progress);
259
+ #endif
250
260
  delete rpcConsole;
251
261
  }
252
262
 
@@ -1213,6 +1223,9 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
1213
1223
 
1214
1224
  progressBarLabel->setVisible(false);
1215
1225
  progressBar->setVisible(false);
1226
+ #ifdef BITCOIN_QT_WIN_TASKBAR
1227
+ m_taskbar_progress->setVisible(false);
1228
+ #endif
1216
1229
  }
1217
1230
  else
1218
1231
  {
@@ -1223,6 +1236,11 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
1223
1236
  progressBar->setMaximum(1000000000);
1224
1237
  progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
1225
1238
  progressBar->setVisible(true);
1239
+ #ifdef BITCOIN_QT_WIN_TASKBAR
1240
+ m_taskbar_progress->setWindow(this);
1241
+ m_taskbar_progress->setValue(qRound(nVerificationProgress * 100.0));
1242
+ m_taskbar_progress->setVisible(true);
1243
+ #endif
1226
1244
 
1227
1245
  tooltip = tr("Catching up…") + QString("<br>") + tooltip;
1228
1246
  if(count != prevBlocks)