Skip to content

Commit c1c9a95

Browse files
committed
Merge #10454: Fix broken q4 test build
620444b Fix broken q4 test build (Russell Yanofsky) Tree-SHA512: 3247458541e5586e5a2cfc0abda3c54f140c676603ea5a3bdc0d11aae335d0221bbc818fc5fa458242fd4bacd326fca1013fc0320d5c91b672b8ca9684fb7bf8
2 parents f94b7d5 + 620444b commit c1c9a95

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/qt/test/wallettests.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ QModelIndex FindTx(const QAbstractItemModel& model, const uint256& txid)
9090
return {};
9191
}
9292

93+
//! Request context menu (call method that is public in qt5, but protected in qt4).
94+
void RequestContextMenu(QWidget* widget)
95+
{
96+
class Qt4Hack : public QWidget
97+
{
98+
public:
99+
using QWidget::customContextMenuRequested;
100+
};
101+
static_cast<Qt4Hack*>(widget)->customContextMenuRequested({});
102+
}
103+
93104
//! Invoke bumpfee on txid and check results.
94105
void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, std::string expectError, bool cancel)
95106
{
@@ -102,7 +113,7 @@ void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, st
102113
QAction* action = view.findChild<QAction*>("bumpFeeAction");
103114
table->selectionModel()->select(index, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
104115
action->setEnabled(expectDisabled);
105-
table->customContextMenuRequested({});
116+
RequestContextMenu(table);
106117
QCOMPARE(action->isEnabled(), !expectDisabled);
107118

108119
action->setEnabled(true);

0 commit comments

Comments
 (0)