X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=1727514493ee072ad48d29ec06e4496d2fcbd3e1;hb=ed5b2ff32158ae72c011eb1228f373cec05cbfeb;hp=80e24a601d10d305f54b1ee7eeeb413a3425ff7a;hpb=fcacaaf16551524c7ebb6114254d005274cc3d63;p=quassel.git diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 80e24a60..17275144 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -127,16 +127,16 @@ ChatScene::ChatScene(QAbstractItemModel *model, QString idString, qreal width, C connect(&webPreview.timer, &QTimer::timeout, this, &ChatScene::webPreviewNextStep); #endif _showWebPreview = defaultSettings.showWebPreview(); - defaultSettings.notify("ShowWebPreview", this, SLOT(showWebPreviewChanged())); + defaultSettings.notify("ShowWebPreview", this, &ChatScene::showWebPreviewChanged); _showSenderBrackets = defaultSettings.showSenderBrackets(); - defaultSettings.notify("ShowSenderBrackets", this, SLOT(showSenderBracketsChanged())); + defaultSettings.notify("ShowSenderBrackets", this, &ChatScene::showSenderBracketsChanged); _useCustomTimestampFormat = defaultSettings.useCustomTimestampFormat(); - defaultSettings.notify("UseCustomTimestampFormat", this, SLOT(useCustomTimestampFormatChanged())); + defaultSettings.notify("UseCustomTimestampFormat", this, &ChatScene::useCustomTimestampFormatChanged); _timestampFormatString = defaultSettings.timestampFormatString(); - defaultSettings.notify("TimestampFormat", this, SLOT(timestampFormatStringChanged())); + defaultSettings.notify("TimestampFormat", this, &ChatScene::timestampFormatStringChanged); updateTimestampHasBrackets(); _clickTimer.setInterval(QApplication::doubleClickInterval()); @@ -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()); }