Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions panels/notification/server/dbusadaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ uint DbusAdaptor::Notify(const QString &appName, uint replacesId, const QString
int expireTimeout)
{
uint id = manager()->Notify(appName, replacesId, appIcon, summary, body, actions, hints, expireTimeout);
if (id == std::numeric_limits<uint>::max()) {
if (id == 0) {
QDBusError error(QDBusError::InternalError, "Notify failed.");
QDBusMessage reply = QDBusMessage::createError(error);

return QDBusConnection::sessionBus().send(reply);
QDBusConnection::sessionBus().send(reply);
}

return id;
Expand Down Expand Up @@ -72,11 +72,11 @@ uint DDENotificationDbusAdaptor::Notify(const QString &appName, uint replacesId,
int expireTimeout)
{
uint id = manager()->Notify(appName, replacesId, appIcon, summary, body, actions, hints, expireTimeout);
if (id == std::numeric_limits<uint>::max()) {
if (id == 0) {
QDBusError error(QDBusError::InternalError, "Notify failed.");
QDBusMessage reply = QDBusMessage::createError(error);

return QDBusConnection::sessionBus().send(reply);
QDBusConnection::sessionBus().send(reply);
}

return id;
Expand Down
3 changes: 2 additions & 1 deletion panels/notification/server/notificationmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ uint NotificationManager::Notify(const QString &appName, uint replacesId, const
if (entity.processedType() != NotifyEntity::None) {
qint64 id = m_persistence->addEntity(entity);
if (id == -1) {
return std::numeric_limits<uint>::max();
qWarning(notifyLog) << "Failed on saving DB, bubbleId:" << entity.bubbleId() << ", appName" << appName;
return 0;
}

entity.setId(id);
Expand Down
Loading