diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-15 20:14:45 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-15 20:14:45 +0100 |
| commit | 417dbff2de57ff3c62685d0ab4f47454d543ed8f (patch) | |
| tree | 0b4f05d611db87510b1d356bc4965d8a5f4a7dbc | |
| parent | ff3f24ff9e0e6e0785fdb29cef0d58f232abfc1e (diff) | |
New slot styles for context menus actions.
| -rw-r--r-- | src/downloadlistview.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/downloadlistview.cpp b/src/downloadlistview.cpp index 5e49f107..7f9516ee 100644 --- a/src/downloadlistview.cpp +++ b/src/downloadlistview.cpp @@ -266,17 +266,17 @@ void DownloadListView::onCustomContextMenu(const QPoint &point) // display download-specific actions
}
- menu.addAction(tr("Delete Installed Downloads..."), this, SLOT(issueDeleteCompleted()));
- menu.addAction(tr("Delete Uninstalled Downloads..."), this, SLOT(issueDeleteUninstalled()));
- menu.addAction(tr("Delete All Downloads..."), this, SLOT(issueDeleteAll()));
+ menu.addAction(tr("Delete Installed Downloads..."), [=] { issueDeleteCompleted(); });
+ menu.addAction(tr("Delete Uninstalled Downloads..."), [=] { issueDeleteUninstalled(); });
+ menu.addAction(tr("Delete All Downloads..."), [=] { issueDeleteAll(); });
menu.addSeparator();
if (!hidden) {
- menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
- menu.addAction(tr("Hide Uninstalled..."), this, SLOT(issueRemoveFromViewUninstalled()));
- menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
+ menu.addAction(tr("Hide Installed..."), [=] { issueRemoveFromViewCompleted(); });
+ menu.addAction(tr("Hide Uninstalled..."), [=] { issueRemoveFromViewUninstalled(); });
+ menu.addAction(tr("Hide All..."), [=] { issueRemoveFromViewAll(); });
} else {
- menu.addAction(tr("Un-Hide All..."), this, SLOT(issueRestoreToViewAll()));
+ menu.addAction(tr("Un-Hide All..."), [=] { issueRestoreToViewAll(); } );
}
menu.exec(viewport()->mapToGlobal(point));
|
