Fix includes
[quassel.git] / src / qtui / statusnotifieritemdbus.cpp
index e359c45..893b24d 100644 (file)
@@ -4,9 +4,9 @@
  *   Quasselfied 2010 by Manuel Nickschas <sputnick@quassel-irc.org>       *
  *                                                                         *
  *   This file is free software; you can redistribute it and/or modify     *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
+ *   it under the terms of the GNU Library General Public License (LGPL)   *
+ *   as published by the Free Software Foundation; either version 2 of the *
+ *   License, or (at your option) any later version.                       *
  *                                                                         *
  *   This program is distributed in the hope that it will be useful,       *
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
@@ -162,7 +162,6 @@ StatusNotifierItemDBus::StatusNotifierItemDBus(StatusNotifierItem *parent)
    new StatusNotifierItemAdaptor(this);
    //qDebug() << "service is" << m_service;
    registerService();
-   m_dbus.registerObject("/StatusNotifierItem", this);
 }
 
 StatusNotifierItemDBus::~StatusNotifierItemDBus()
@@ -181,6 +180,7 @@ void StatusNotifierItemDBus::registerService()
 {
     //qDebug() << "registering to" << m_service;
     m_dbus.registerService(m_service);
+    m_dbus.registerObject("/StatusNotifierItem", this);
 }
 
 // FIXME: see above
@@ -188,6 +188,7 @@ void StatusNotifierItemDBus::unregisterService()
 {
     //qDebug() << "unregistering from" << m_service;
     if(m_dbus.isConnected()) {
+        m_dbus.unregisterObject("/StatusNotifierItem");
         m_dbus.unregisterService(m_service);
     }
 }