X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatmonitorfilter.cpp;h=1229fd4e4e6035a4d2d8416e3a1f5e9a8bc635f3;hp=c1dcf13837d6f7010b7d37a5985009b224368404;hb=2c8434f74c68194d56f2084f637419123e61d18b;hpb=03f61d2ab68356bd74f6f014651c823e79678cbd diff --git a/src/qtui/chatmonitorfilter.cpp b/src/qtui/chatmonitorfilter.cpp index c1dcf138..1229fd4e 100644 --- a/src/qtui/chatmonitorfilter.cpp +++ b/src/qtui/chatmonitorfilter.cpp @@ -31,8 +31,7 @@ ChatMonitorFilter::ChatMonitorFilter(MessageModel *model, QObject *parent) { // Global configuration ChatViewSettings defaultSettings; - _showSenderBrackets = defaultSettings.showSenderBrackets(); - defaultSettings.notify("ShowSenderBrackets", this, SLOT(showSenderBracketsSettingChanged(const QVariant &))); + defaultSettings.initAndNotify("ShowSenderBrackets", this, &ChatMonitorFilter::showSenderBracketsSettingChanged); // NOTE: Whenever changing defaults here, also update ChatMonitorSettingsPage::loadSettings() // and ChatMonitorSettingsPage::defaults() to match @@ -41,8 +40,8 @@ ChatMonitorFilter::ChatMonitorFilter(MessageModel *model, QObject *parent) ChatViewSettings viewSettings(ChatMonitorFilter::idString()); _showFields = viewSettings.value("ShowFields", AllFields).toInt(); _showOwnMessages = viewSettings.value("ShowOwnMsgs", true).toBool(); - viewSettings.notify("ShowFields", this, SLOT(showFieldsSettingChanged(const QVariant &))); - viewSettings.notify("ShowOwnMsgs", this, SLOT(showOwnMessagesSettingChanged(const QVariant &))); + viewSettings.notify("ShowFields", this, &ChatMonitorFilter::showFieldsSettingChanged); + viewSettings.notify("ShowOwnMsgs", this, &ChatMonitorFilter::showOwnMessagesSettingChanged); // ChatMonitorSettingsPage QString showHighlightsSettingsId = "ShowHighlights"; @@ -53,21 +52,20 @@ ChatMonitorFilter::ChatMonitorFilter(MessageModel *model, QObject *parent) QString alwaysOwnSettingsId = "AlwaysOwn"; _showHighlights = viewSettings.value(showHighlightsSettingsId, false).toBool(); - _operationMode = - viewSettings.value(operationModeSettingsId, ChatViewSettings::InvalidMode).toInt(); + _operationMode = viewSettings.value(operationModeSettingsId, ChatViewSettings::InvalidMode).toInt(); // read configured list of buffers to monitor/ignore foreach(QVariant v, viewSettings.value(buffersSettingsId, QVariant()).toList()) - _bufferIds << v.value(); + _bufferIds << v.value(); _showBacklog = viewSettings.value(showBacklogSettingsId, true).toBool(); _includeRead = viewSettings.value(includeReadSettingsId, false).toBool(); _alwaysOwn = viewSettings.value(alwaysOwnSettingsId, false).toBool(); - viewSettings.notify(showHighlightsSettingsId, this, SLOT(showHighlightsSettingChanged(const QVariant &))); - viewSettings.notify(operationModeSettingsId, this, SLOT(operationModeSettingChanged(const QVariant &))); - viewSettings.notify(buffersSettingsId, this, SLOT(buffersSettingChanged(const QVariant &))); - viewSettings.notify(showBacklogSettingsId, this, SLOT(showBacklogSettingChanged(const QVariant &))); - viewSettings.notify(includeReadSettingsId, this, SLOT(includeReadSettingChanged(const QVariant &))); - viewSettings.notify(alwaysOwnSettingsId, this, SLOT(alwaysOwnSettingChanged(const QVariant &))); + viewSettings.notify(showHighlightsSettingsId, this, &ChatMonitorFilter::showHighlightsSettingChanged); + viewSettings.notify(operationModeSettingsId, this, &ChatMonitorFilter::operationModeSettingChanged); + viewSettings.notify(buffersSettingsId, this, &ChatMonitorFilter::buffersSettingChanged); + viewSettings.notify(showBacklogSettingsId, this, &ChatMonitorFilter::showBacklogSettingChanged); + viewSettings.notify(includeReadSettingsId, this, &ChatMonitorFilter::includeReadSettingChanged); + viewSettings.notify(alwaysOwnSettingsId, this, &ChatMonitorFilter::alwaysOwnSettingChanged); }