ui.operationMode->addItem(tr("Opt Out"), ChatViewSettings::OptOut);
// connect slots
- connect(ui.operationMode, SIGNAL(currentIndexChanged(int)), SLOT(switchOperationMode(int)));
- connect(ui.showHighlights, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
- connect(ui.showOwnMessages, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
- connect(ui.alwaysOwn, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
- connect(ui.showBacklog, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
- connect(ui.includeRead, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
+ connect(ui.operationMode, selectOverload<int>(&QComboBox::currentIndexChanged), this, &ChatMonitorSettingsPage::switchOperationMode);
+ connect(ui.showHighlights, &QAbstractButton::toggled, this, &ChatMonitorSettingsPage::widgetHasChanged);
+ connect(ui.showOwnMessages, &QAbstractButton::toggled, this, &ChatMonitorSettingsPage::widgetHasChanged);
+ connect(ui.alwaysOwn, &QAbstractButton::toggled, this, &ChatMonitorSettingsPage::widgetHasChanged);
+ connect(ui.showBacklog, &QAbstractButton::toggled, this, &ChatMonitorSettingsPage::widgetHasChanged);
+ connect(ui.includeRead, &QAbstractButton::toggled, this, &ChatMonitorSettingsPage::widgetHasChanged);
}
This can probably be removed whenever BufferViewConfig::bulkAdd or something
like that is available.
*/
- qobject_cast<BufferViewFilter *>(outView->model())->setConfig(0);
- qobject_cast<BufferViewFilter *>(inView->model())->setConfig(0);
+ qobject_cast<BufferViewFilter *>(outView->model())->setConfig(nullptr);
+ qobject_cast<BufferViewFilter *>(inView->model())->setConfig(nullptr);
// actually move the ids
foreach(QList<BufferId> list, selectedBuffers) {
*/
void ChatMonitorSettingsPage::switchOperationMode(int idx)
{
- ChatViewSettings::OperationMode mode = (ChatViewSettings::OperationMode)(idx + 1);
+ auto mode = (ChatViewSettings::OperationMode)(idx + 1);
if (mode == ChatViewSettings::OptIn) {
ui.labelActiveBuffers->setText(tr("Show:"));
}