Skip to content

Commit

Permalink
Fix DEBUG_NOTIFICATIONS
Browse files Browse the repository at this point in the history
Used as #define
  • Loading branch information
pvuorela committed Nov 28, 2017
1 parent fa4d9da commit 141f554
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/notifications/notificationmanager.cpp
Expand Up @@ -625,7 +625,9 @@ void NotificationManager::publish(const LipstickNotification *notification, uint
}

// Add the notification, its actions and its hints to the database
execSQL("INSERT INTO notifications VALUES (?, ?, ?, ?, ?, ?, ?)", QVariantList() << id << notification->appName() << notification->appIcon() << notification->summary() << notification->body() << notification->expireTimeout() << notification->disambiguatedAppName());
execSQL("INSERT INTO notifications VALUES (?, ?, ?, ?, ?, ?, ?)",
QVariantList() << id << notification->appName() << notification->appIcon() << notification->summary()
<< notification->body() << notification->expireTimeout() << notification->disambiguatedAppName());
foreach (const QString &action, notification->actions()) {
execSQL("INSERT INTO actions VALUES (?, ?)", QVariantList() << id << action);
}
Expand All @@ -635,7 +637,9 @@ void NotificationManager::publish(const LipstickNotification *notification, uint
execSQL("INSERT INTO hints VALUES (?, ?, ?)", QVariantList() << id << hit.key() << hit.value());
}

NOTIFICATIONS_DEBUG("PUBLISH:" << notification->appName() << notification->appIcon() << notification->summary() << notification->body() << notification->actions() << notification->hints() << notification->expireTimeout() << "->" << id);
NOTIFICATIONS_DEBUG("PUBLISH:" << notification->appName() << notification->appIcon() << notification->summary()
<< notification->body() << notification->actions() << notification->hints()
<< notification->expireTimeout() << "->" << id);
m_modifiedIds.insert(id);
if (!m_modificationTimer.isActive()) {
m_modificationTimer.start();
Expand Down Expand Up @@ -987,7 +991,7 @@ void NotificationManager::fetchData(bool update)
foreach (LipstickNotification *n, m_notifications) {
connect(n, SIGNAL(actionInvoked(QString)), this, SLOT(invokeAction(QString)), Qt::QueuedConnection);
connect(n, SIGNAL(removeRequested()), this, SLOT(removeNotificationIfUserRemovable()), Qt::QueuedConnection);
#if DEBUG_NOTIFICATIONS
#ifdef DEBUG_NOTIFICATIONS
const uint id = n->id();
NOTIFICATIONS_DEBUG("RESTORED:" << n->appName() << n->appIcon() << n->summary() << n->body() << actions[id] << hints[id] << n->expireTimeout() << "->" << id);
#endif
Expand Down

0 comments on commit 141f554

Please sign in to comment.