diff options
author | Jarol Rodriguez <jarolrod@tutanota.com> | 2021-09-23 03:17:47 -0400 |
---|---|---|
committer | Jarol Rodriguez <jarolrod@tutanota.com> | 2021-09-23 03:17:47 -0400 |
commit | 9980f4aa5eaf3c0f62cf699d6a9c4677a1ea3365 (patch) | |
tree | f4e617bfe6595a44343dad21c538d367a8bfa0f9 /src/qt/transactionview.cpp | |
parent | 971cad475f38011cf33a66671f1d5e570fd8df33 (diff) |
qt, refactor: simplify third-party tx url action through overload
Simplify the creation, addition, and slot/signal connection of
a third part tx url context menu action by using an overloaded
addAction function.
Diffstat (limited to 'src/qt/transactionview.cpp')
-rw-r--r-- | src/qt/transactionview.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 2f16e6edb4..02c0153389 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -228,11 +228,9 @@ void TransactionView::setModel(WalletModel *_model) QString host = QUrl(url, QUrl::StrictMode).host(); if (!host.isEmpty()) { - QAction *thirdPartyTxUrlAction = new QAction(host, this); // use host as menu item label if (i == 0) contextMenu->addSeparator(); - contextMenu->addAction(thirdPartyTxUrlAction); - connect(thirdPartyTxUrlAction, &QAction::triggered, [this, url] { openThirdPartyTxUrl(url); }); + contextMenu->addAction(host, [this, url] { openThirdPartyTxUrl(url); }); } } } |