Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/notificationfilterproxymodel.cpp
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Line(s) | 132 | { | |||
---|---|---|---|---|---|
173 | 173 | | |||
174 | if (!m_whitelistedNotifyRcNames.isEmpty()) { | 174 | if (!m_whitelistedNotifyRcNames.isEmpty()) { | ||
175 | const QString notifyRcName = sourceIdx.data(Notifications::NotifyRcNameRole).toString(); | 175 | const QString notifyRcName = sourceIdx.data(Notifications::NotifyRcNameRole).toString(); | ||
176 | if (!notifyRcName.isEmpty() && m_whitelistedNotifyRcNames.contains(notifyRcName)) { | 176 | if (!notifyRcName.isEmpty() && m_whitelistedNotifyRcNames.contains(notifyRcName)) { | ||
177 | return true; | 177 | return true; | ||
178 | } | 178 | } | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | const bool userActionFeedback = sourceIdx.data(Notifications::UserActionFeedbackRole).toBool(); | ||||
182 | if (userActionFeedback) { | ||||
183 | return true; | ||||
184 | } | ||||
185 | | ||||
181 | bool ok; | 186 | bool ok; | ||
182 | const auto urgency = static_cast<Notifications::Urgency>(sourceIdx.data(Notifications::UrgencyRole).toInt(&ok)); | 187 | const auto urgency = static_cast<Notifications::Urgency>(sourceIdx.data(Notifications::UrgencyRole).toInt(&ok)); | ||
183 | if (ok) { | 188 | if (ok) { | ||
184 | if (!m_urgencies.testFlag(urgency)) { | 189 | if (!m_urgencies.testFlag(urgency)) { | ||
185 | return false; | 190 | return false; | ||
186 | } | 191 | } | ||
187 | } | 192 | } | ||
188 | 193 | | |||
189 | return true; | 194 | return true; | ||
190 | } | 195 | } |