Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115454
D9097.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D9097.diff
View Options
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -32,7 +32,6 @@
public:
explicit CCoinControlWidgetItem(QTreeWidget *parent, int type = Type)
: QTreeWidgetItem(parent, type) {}
- explicit CCoinControlWidgetItem(int type = Type) : QTreeWidgetItem(type) {}
explicit CCoinControlWidgetItem(QTreeWidgetItem *parent, int type = Type)
: QTreeWidgetItem(parent, type) {}
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -673,9 +673,7 @@
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
for (const auto &coins : model->wallet().listCoins()) {
- CCoinControlWidgetItem *itemWalletAddress =
- new CCoinControlWidgetItem();
- itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
+ CCoinControlWidgetItem *itemWalletAddress{nullptr};
QString sWalletAddress = QString::fromStdString(
EncodeCashAddr(coins.first, model->getChainParams()));
QString sWalletLabel =
@@ -686,7 +684,7 @@
if (treeMode) {
// wallet address
- ui->treeWidget->addTopLevelItem(itemWalletAddress);
+ itemWalletAddress = new CCoinControlWidgetItem(ui->treeWidget);
itemWalletAddress->setFlags(flgTristate);
itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:07 (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187508
Default Alt Text
D9097.diff (1 KB)
Attached To
D9097: gui: Fix itemWalletAddress leak when not tree mode
Event Timeline
Log In to Comment