Fix logging

This commit is contained in:
Hannah von Reth 2015-10-05 16:22:19 +02:00
parent c9ff3f1f6f
commit ccbe90d202
1 changed files with 2 additions and 4 deletions

View File

@ -94,7 +94,7 @@ void SnoreNotifier::slotNotify(Snore::Notification notification)
} }
} }
m_queue.append(notification); m_queue.append(notification);
snoreDebug(SNORE_WARNING) << "queing" << m_queue.size(); snoreDebug(SNORE_DEBUG) << "queing" << m_queue.size();
if (!m_timer->isActive()) { if (!m_timer->isActive()) {
m_timer->start(); m_timer->start();
} }
@ -109,14 +109,12 @@ void SnoreNotifier::slotCloseNotification(Snore::Notification notification)
void SnoreNotifier::slotQueueTimeout() void SnoreNotifier::slotQueueTimeout()
{ {
snoreDebug(SNORE_WARNING) << "queue" << m_queue.size();
if (m_queue.isEmpty()) { if (m_queue.isEmpty()) {
// snoreDebug(SNORE_DEBUG) << "queue is empty"; snoreDebug(SNORE_DEBUG) << "queue is empty";
m_timer->stop(); m_timer->stop();
} else { } else {
for (NotifyWidget *w : m_widgets) { for (NotifyWidget *w : m_widgets) {
if (!m_queue.isEmpty() && w->acquire(m_queue.first().timeout())) { if (!m_queue.isEmpty() && w->acquire(m_queue.first().timeout())) {
snoreDebug(SNORE_WARNING) << "aquired " << w->id();
Notification notification = m_queue.takeFirst(); Notification notification = m_queue.takeFirst();
notification.hints().setPrivateValue(this, "id", w->id()); notification.hints().setPrivateValue(this, "id", w->id());
w->display(notification); w->display(notification);