X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatmonitorview.cpp;h=07facb59ae072ffd793c31d3dec1db1d0f010225;hp=71c975b9bccf704e948b0967244ed06aea593b81;hb=f9efdde7f3a6004af8f834c409cfa6ae1d877692;hpb=fcacaaf16551524c7ebb6114254d005274cc3d63 diff --git a/src/qtui/chatmonitorview.cpp b/src/qtui/chatmonitorview.cpp index 71c975b9..07facb59 100644 --- a/src/qtui/chatmonitorview.cpp +++ b/src/qtui/chatmonitorview.cpp @@ -24,6 +24,7 @@ #include #include +#include "action.h" #include "buffermodel.h" #include "chatmonitorfilter.h" #include "chatlinemodel.h" @@ -54,26 +55,29 @@ void ChatMonitorView::addActionsToMenu(QMenu *menu, const QPointF &pos) { ChatView::addActionsToMenu(menu, pos); menu->addSeparator(); - QAction *showOwnNicksAction = menu->addAction(tr("Show Own Messages"), _filter, SLOT(setShowOwnMessages(bool))); + auto showOwnNicksAction = new Action(tr("Show Own Messages"), menu, _filter, &ChatMonitorFilter::setShowOwnMessages); showOwnNicksAction->setCheckable(true); showOwnNicksAction->setChecked(_filter->showOwnMessages()); + menu->addAction(showOwnNicksAction); if (scene()->columnByScenePos(pos) == ChatLineModel::SenderColumn) { menu->addSeparator(); - QAction *showNetworkAction = menu->addAction(tr("Show Network Name"), this, SLOT(showFieldsChanged(bool))); + auto showNetworkAction = new Action(tr("Show Network Name"), menu, this, &ChatMonitorView::showFieldsChanged); showNetworkAction->setCheckable(true); showNetworkAction->setChecked(_filter->showFields() & ChatMonitorFilter::NetworkField); showNetworkAction->setData(ChatMonitorFilter::NetworkField); + menu->addAction(showNetworkAction); - QAction *showBufferAction = menu->addAction(tr("Show Buffer Name"), this, SLOT(showFieldsChanged(bool))); + auto showBufferAction = new Action(tr("Show Buffer Name"), menu, this, &ChatMonitorView::showFieldsChanged); showBufferAction->setCheckable(true); showBufferAction->setChecked(_filter->showFields() & ChatMonitorFilter::BufferField); showBufferAction->setData(ChatMonitorFilter::BufferField); + menu->addAction(showBufferAction); } menu->addSeparator(); - menu->addAction(icon::get("configure"), tr("Configure..."), this, SLOT(showSettingsPage())); + menu->addAction(new Action(icon::get("configure"), tr("Configure..."), menu, this, &ChatMonitorView::showSettingsPage)); } @@ -124,5 +128,5 @@ void ChatMonitorView::showSettingsPage() void ChatMonitorView::coreConnectionStateChanged(bool connected) { if (connected) - connect(Client::ignoreListManager(), SIGNAL(ignoreListChanged()), _filter, SLOT(invalidateFilter())); + connect(Client::ignoreListManager(), &ClientIgnoreListManager::ignoreListChanged, _filter, &ChatMonitorFilter::invalidateFilter); }