From fa733c1c8e02bed82d4d93ec5ffe45123341f7cb Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Mon, 20 Apr 2015 16:50:15 +0200 Subject: [PATCH] add check --- src/libsnore/notification/notification.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libsnore/notification/notification.cpp b/src/libsnore/notification/notification.cpp index 0d11973..e5a3e57 100644 --- a/src/libsnore/notification/notification.cpp +++ b/src/libsnore/notification/notification.cpp @@ -151,6 +151,11 @@ bool Notification::isValid() const void Notification::addActiveIn(const QObject *o) { + bool contains = d->m_activeIn.contains(o); + Q_ASSERT_X(contains,Q_FUNC_INFO,"already active"); + if(contains) { + snoreDebug(SNORE_WARNING) << o << "already active in" << id(); + } d->m_activeIn.insert(o); SnoreCorePrivate::instance()->m_activeNotifications[id()] = *this; snoreDebug(SNORE_INFO) << d->m_activeIn.size() << o << qobject_cast(o);