Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/qt/governancelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ const Proposal* ProposalModel::getProposalAt(const QModelIndex& index) const

GovernanceList::GovernanceList(QWidget* parent) :
QWidget(parent),
ui(new Ui::GovernanceList),
clientModel(nullptr),
ui(std::make_unique<Ui::GovernanceList>()),
proposalModel(new ProposalModel(this)),
proposalModelProxy(new QSortFilterProxyModel(this)),
proposalContextMenu(new QMenu(this)),
Expand Down Expand Up @@ -321,10 +320,7 @@ GovernanceList::GovernanceList(QWidget* parent) :
GUIUtil::updateFonts();
}

GovernanceList::~GovernanceList()
{
delete ui;
}
GovernanceList::~GovernanceList() = default;

void GovernanceList::setClientModel(ClientModel* model)
{
Expand Down
6 changes: 3 additions & 3 deletions src/qt/governancelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Proposal : public QObject
float paymentAmount() const;
QString url() const;
bool isActive() const;
QString votingStatus(const int nAbsVoteReq) const;
QString votingStatus(int nAbsVoteReq) const;
int GetAbsoluteYesCount() const;

void openUrl() const;
Expand Down Expand Up @@ -96,9 +96,9 @@ class GovernanceList : public QWidget
void setClientModel(ClientModel* clientModel);

private:
ClientModel* clientModel;
ClientModel* clientModel{nullptr};

Ui::GovernanceList* ui;
std::unique_ptr<Ui::GovernanceList> ui;
ProposalModel* proposalModel;
QSortFilterProxyModel* proposalModelProxy;

Expand Down