X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsnorenotificationbackend.cpp;h=21bcee6dee3adee2a701131f6bc44d02ec33f86e;hb=924ed0da8578d43bf21c9155b9bf439108e74988;hp=ef1f47d1e83e3d03ed6cdb23d358636e7bf20e48;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c;p=quassel.git diff --git a/src/qtui/snorenotificationbackend.cpp b/src/qtui/snorenotificationbackend.cpp index ef1f47d1..21bcee6d 100644 --- a/src/qtui/snorenotificationbackend.cpp +++ b/src/qtui/snorenotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2011-2016 by Hannah von Reth * + * Copyright (C) 2011-2018 by Hannah von Reth * * vonreth@kde.org * * * * This program is free software; you can redistribute it and/or modify * @@ -124,9 +124,13 @@ void SnoreNotificationBackend::setTraybackend(const QVariant &b) } #endif if (b.toBool()) { - Snore::SnoreCore::instance().registerApplication(m_application); + if (!Snore::SnoreCore::instance().aplications().contains(m_application.name())) { + Snore::SnoreCore::instance().registerApplication(m_application); + } } else { - Snore::SnoreCore::instance().deregisterApplication(m_application); + if (Snore::SnoreCore::instance().aplications().contains(m_application.name())) { + Snore::SnoreCore::instance().deregisterApplication(m_application); + } } }