aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-05-31 10:38:19 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-05-31 10:38:30 +0200
commitc1c9a95379d364ea8ca5d3d0789e8afb1a99bb8b (patch)
tree938dae72bd47fd6240dae18987f84c4ef0026d1a /src
parentf94b7d5bfa911ea7125920589723ee63a3eec9f0 (diff)
parent620444bd591355b7aeeed9d023d19cc665367b35 (diff)
Merge #10454: Fix broken q4 test build
620444bd5 Fix broken q4 test build (Russell Yanofsky) Tree-SHA512: 3247458541e5586e5a2cfc0abda3c54f140c676603ea5a3bdc0d11aae335d0221bbc818fc5fa458242fd4bacd326fca1013fc0320d5c91b672b8ca9684fb7bf8
Diffstat (limited to 'src')
-rw-r--r--src/qt/test/wallettests.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
index 32362ccdfc..0e12a9d53e 100644
--- a/src/qt/test/wallettests.cpp
+++ b/src/qt/test/wallettests.cpp
@@ -90,6 +90,17 @@ QModelIndex FindTx(const QAbstractItemModel& model, const uint256& txid)
return {};
}
+//! Request context menu (call method that is public in qt5, but protected in qt4).
+void RequestContextMenu(QWidget* widget)
+{
+ class Qt4Hack : public QWidget
+ {
+ public:
+ using QWidget::customContextMenuRequested;
+ };
+ static_cast<Qt4Hack*>(widget)->customContextMenuRequested({});
+}
+
//! Invoke bumpfee on txid and check results.
void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, std::string expectError, bool cancel)
{
@@ -102,7 +113,7 @@ void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, st
QAction* action = view.findChild<QAction*>("bumpFeeAction");
table->selectionModel()->select(index, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
action->setEnabled(expectDisabled);
- table->customContextMenuRequested({});
+ RequestContextMenu(table);
QCOMPARE(action->isEnabled(), !expectDisabled);
action->setEnabled(true);