From 342f785afd8ac90e230576d4b9544e84bd9038e2 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sun, 15 Feb 2026 20:06:04 +0530 Subject: [PATCH 1/9] refactor: s/ProposalList/Proposals/g --- src/qt/governancelist.h | 2 +- src/qt/proposalmodel.cpp | 2 +- src/qt/proposalmodel.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qt/governancelist.h b/src/qt/governancelist.h index ae1eb0d6d878..b4df139a987e 100644 --- a/src/qt/governancelist.h +++ b/src/qt/governancelist.h @@ -60,7 +60,7 @@ class GovernanceList : public QWidget struct CalcProposalList { int m_abs_vote_req{0}; interfaces::GOV::GovernanceInfo m_gov_info; - ProposalList m_proposals; + Proposals m_proposals; Uint256HashMap m_votable_masternodes; Uint256HashSet m_fundable_hashes; }; diff --git a/src/qt/proposalmodel.cpp b/src/qt/proposalmodel.cpp index 0257bf2846f7..e1ab6667af67 100644 --- a/src/qt/proposalmodel.cpp +++ b/src/qt/proposalmodel.cpp @@ -381,7 +381,7 @@ void ProposalModel::remove(int row) endRemoveRows(); } -void ProposalModel::reconcile(ProposalList&& proposals, std::unordered_set&& fundable_hashes) +void ProposalModel::reconcile(Proposals&& proposals, std::unordered_set&& fundable_hashes) { m_fundable_hashes = std::move(fundable_hashes); diff --git a/src/qt/proposalmodel.h b/src/qt/proposalmodel.h index d91d419f90c5..d7b989f5c46b 100644 --- a/src/qt/proposalmodel.h +++ b/src/qt/proposalmodel.h @@ -92,7 +92,7 @@ class Proposal std::optional getFundedHeight() const { return m_funded_height; } }; -using ProposalList = std::vector>; +using Proposals = std::vector>; class ProposalModel : public QAbstractTableModel { @@ -101,7 +101,7 @@ class ProposalModel : public QAbstractTableModel private: BitcoinUnit m_display_unit{BitcoinUnit::DASH}; int nAbsVoteReq{0}; - ProposalList m_data; + Proposals m_data; QIcon m_icon_failing; QIcon m_icon_lapsed; QIcon m_icon_passing; @@ -132,7 +132,7 @@ class ProposalModel : public QAbstractTableModel void append(std::unique_ptr&& proposal); void remove(int row); - void reconcile(ProposalList&& proposals, Uint256HashSet&& fundable_hashes); + void reconcile(Proposals&& proposals, Uint256HashSet&& fundable_hashes); void refreshIcons(); void setDisplayUnit(const BitcoinUnit& display_unit); void setVotingParams(int nAbsVoteReq); From 7827ae18d4a474b1cbcb890228981f4edb47bff5 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Tue, 17 Feb 2026 20:17:06 +0530 Subject: [PATCH 2/9] move-only: src/qt/governancelist.{cpp,h} -> src/qt/proposallist.{cpp,h} --- src/Makefile.qt.include | 12 +- src/qt/bitcoingui.cpp | 31 ++--- .../{governancelist.ui => proposallist.ui} | 4 +- .../{governancelist.cpp => proposallist.cpp} | 127 +++++++++--------- src/qt/{governancelist.h => proposallist.h} | 20 +-- src/qt/res/css/dark.css | 4 +- src/qt/res/css/light.css | 4 +- src/qt/walletframe.cpp | 13 +- src/qt/walletframe.h | 4 +- src/qt/walletview.cpp | 12 +- src/qt/walletview.h | 5 +- test/util/data/non-backported.txt | 2 +- 12 files changed, 120 insertions(+), 118 deletions(-) rename src/qt/forms/{governancelist.ui => proposallist.ui} (98%) rename src/qt/{governancelist.cpp => proposallist.cpp} (87%) rename src/qt/{governancelist.h => proposallist.h} (88%) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 095cf7ce2353..978dc53bde9b 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -23,7 +23,6 @@ QT_FORMS_UI = \ qt/forms/debugwindow.ui \ qt/forms/descriptiondialog.ui \ qt/forms/editaddressdialog.ui \ - qt/forms/governancelist.ui \ qt/forms/helpmessagedialog.ui \ qt/forms/intro.ui \ qt/forms/masternodelist.ui \ @@ -33,6 +32,7 @@ QT_FORMS_UI = \ qt/forms/optionsdialog.ui \ qt/forms/overviewpage.ui \ qt/forms/proposalcreate.ui \ + qt/forms/proposallist.ui \ qt/forms/proposalresume.ui \ qt/forms/psbtoperationsdialog.ui \ qt/forms/qrdialog.ui \ @@ -60,7 +60,6 @@ QT_MOC_CPP = \ qt/moc_csvmodelwriter.cpp \ qt/moc_descriptiondialog.cpp \ qt/moc_editaddressdialog.cpp \ - qt/moc_governancelist.cpp \ qt/moc_guiutil.cpp \ qt/moc_initexecutor.cpp \ qt/moc_intro.cpp \ @@ -78,8 +77,9 @@ QT_MOC_CPP = \ qt/moc_paymentserver.cpp \ qt/moc_peertablemodel.cpp \ qt/moc_peertablesortproxy.cpp \ - qt/moc_proposalmodel.cpp \ qt/moc_proposalcreate.cpp \ + qt/moc_proposallist.cpp \ + qt/moc_proposalmodel.cpp \ qt/moc_proposalresume.cpp \ qt/moc_psbtoperationsdialog.cpp \ qt/moc_qrdialog.cpp \ @@ -140,10 +140,9 @@ BITCOIN_QT_H = \ qt/csvmodelwriter.h \ qt/descriptiondialog.h \ qt/editaddressdialog.h \ - qt/governancelist.h \ qt/guiconstants.h \ - qt/guiutil.h \ qt/guiutil_font.h \ + qt/guiutil.h \ qt/initexecutor.h \ qt/intro.h \ qt/macdockiconhandler.h \ @@ -163,6 +162,7 @@ BITCOIN_QT_H = \ qt/peertablemodel.h \ qt/peertablesortproxy.h \ qt/proposalcreate.h \ + qt/proposallist.h \ qt/proposalmodel.h \ qt/proposalresume.h \ qt/psbtoperationsdialog.h \ @@ -277,7 +277,6 @@ BITCOIN_QT_WALLET_CPP = \ qt/createwalletdialog.cpp \ qt/descriptiondialog.cpp \ qt/editaddressdialog.cpp \ - qt/governancelist.cpp \ qt/masternodelist.cpp \ qt/masternodemodel.cpp \ qt/mnemonicverificationdialog.cpp \ @@ -285,6 +284,7 @@ BITCOIN_QT_WALLET_CPP = \ qt/overviewpage.cpp \ qt/paymentserver.cpp \ qt/proposalcreate.cpp \ + qt/proposallist.cpp \ qt/proposalmodel.cpp \ qt/proposalresume.cpp \ qt/psbtoperationsdialog.cpp \ diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 256aec68f65d..518ba44f2df6 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -5,18 +5,31 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include #include -#include #include +#include +#include #include #include #include #include #include #include +#include #include #include @@ -31,20 +44,6 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include #include @@ -72,6 +71,8 @@ #include #include +#include + namespace { // Total governance clock frames. Frame 0 is reserved for the superblock // maturity window; frames 1 through GOV_CYCLE_FRAME_COUNT-1 are used for the diff --git a/src/qt/forms/governancelist.ui b/src/qt/forms/proposallist.ui similarity index 98% rename from src/qt/forms/governancelist.ui rename to src/qt/forms/proposallist.ui index 73e4803509e0..67ee680f0a5b 100644 --- a/src/qt/forms/governancelist.ui +++ b/src/qt/forms/proposallist.ui @@ -1,7 +1,7 @@ - GovernanceList - + ProposalList + 0 diff --git a/src/qt/governancelist.cpp b/src/qt/proposallist.cpp similarity index 87% rename from src/qt/governancelist.cpp rename to src/qt/proposallist.cpp index 4fb7f2047105..36700237633e 100644 --- a/src/qt/governancelist.cpp +++ b/src/qt/proposallist.cpp @@ -2,28 +2,27 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include +#include +#include #include #include #include #include +#include +#include +#include