X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=67d14253e39b483760f9f82f57fbf64e2708676a;hp=80e24a601d10d305f54b1ee7eeeb413a3425ff7a;hb=f9efdde7f3a6004af8f834c409cfa6ae1d877692;hpb=fcacaaf16551524c7ebb6114254d005274cc3d63 diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 80e24a60..67d14253 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -828,8 +828,7 @@ void ChatScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) // If we have text selected, insert the Copy Selection as first item if (isPosOverSelection(pos)) { QAction *sep = menu.insertSeparator(menu.actions().first()); - QAction *act = new Action(icon::get("edit-copy"), tr("Copy Selection"), &menu, this, - SLOT(selectionToClipboard()), QKeySequence::Copy); + QAction *act = new Action(icon::get("edit-copy"), tr("Copy Selection"), &menu, this, [this]() { selectionToClipboard(); }, QKeySequence::Copy); menu.insertAction(sep, act); QString searchSelectionText = selection(); @@ -837,7 +836,7 @@ void ChatScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) searchSelectionText = searchSelectionText.left(_webSearchSelectionTextMaxVisible).append(QString::fromUtf8("…")); searchSelectionText = tr("Search '%1'").arg(searchSelectionText); - QAction *webSearchAction = new Action(icon::get("edit-find"), searchSelectionText, &menu, this, SLOT(webSearchOnSelection())); + QAction *webSearchAction = new Action(icon::get("edit-find"), searchSelectionText, &menu, this, &ChatScene::webSearchOnSelection); menu.insertAction(sep, webSearchAction); } @@ -847,7 +846,7 @@ void ChatScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) // show column reset action if columns have been resized in this session or there is at least one very narrow column if ((_firstColHandlePos != _defaultFirstColHandlePos) || (_secondColHandlePos != _defaultSecondColHandlePos) || (_firstColHandlePos <= 10) || (_secondColHandlePos - _firstColHandlePos <= 10)) - menu.addAction(new Action(tr("Reset Column Widths"), &menu, this, SLOT(resetColumnWidths()), 0)); + menu.addAction(new Action(tr("Reset Column Widths"), &menu, this, &ChatScene::resetColumnWidths)); menu.exec(event->screenPos()); }