Changeset View
Changeset View
Standalone View
Standalone View
src/knotificationmanager.cpp
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Line(s) | 306 | if (notifyActions.isEmpty() || notifyActions == QLatin1String("None")) { | |||
---|---|---|---|---|---|
307 | // this will cause KNotification closing itself fast | 307 | // this will cause KNotification closing itself fast | ||
308 | n->ref(); | 308 | n->ref(); | ||
309 | n->deref(); | 309 | n->deref(); | ||
310 | return -1; | 310 | return -1; | ||
311 | } | 311 | } | ||
312 | 312 | | |||
313 | d->notifications.insert(d->notifyIdCounter, n); | 313 | d->notifications.insert(d->notifyIdCounter, n); | ||
314 | 314 | | |||
315 | // TODO KF6 d-pointer KNotifyConfig and add this there | ||||
316 | if (n->urgency() == KNotification::DefaultUrgency) { | ||||
317 | const QString urgency = notifyConfig.readEntry(QStringLiteral("Urgency")); | ||||
318 | if (urgency == QLatin1String("Low")) { | ||||
319 | n->setUrgency(KNotification::LowUrgency); | ||||
320 | } else if (urgency == QLatin1String("Normal")) { | ||||
321 | n->setUrgency(KNotification::NormalUrgency); | ||||
322 | } else if (urgency == QLatin1String("Critical")) { | ||||
323 | n->setUrgency(KNotification::CriticalUrgency); | ||||
324 | } | ||||
325 | } | ||||
326 | | ||||
315 | const auto actionsList = notifyActions.split(QLatin1Char('|')); | 327 | const auto actionsList = notifyActions.split(QLatin1Char('|')); | ||
316 | for (const QString &action : actionsList) { | 328 | for (const QString &action : actionsList) { | ||
317 | KNotificationPlugin *notifyPlugin = pluginForAction(action); | 329 | KNotificationPlugin *notifyPlugin = pluginForAction(action); | ||
318 | 330 | | |||
319 | if (!notifyPlugin) { | 331 | if (!notifyPlugin) { | ||
320 | qCDebug(LOG_KNOTIFICATIONS) << "No plugin for action" << action; | 332 | qCDebug(LOG_KNOTIFICATIONS) << "No plugin for action" << action; | ||
321 | continue; | 333 | continue; | ||
322 | } | 334 | } | ||
Show All 32 Lines |