fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kded / kdedadaptor.cpp
blobfe149a357d5254136b5f62f551910b930dd5b320
1 /* This file is part of the KDE libraries
2 * Copyright (C) 1999 David Faure <faure@kde.org>
3 * Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 **/
21 #include "kdedadaptor.h"
22 #include "kded.h"
23 #include <kglobal.h>
24 #include <kconfig.h>
25 #include <QCoreApplication>
27 KdedAdaptor::KdedAdaptor(QObject *parent)
28 : QDBusAbstractAdaptor(parent)
32 bool KdedAdaptor::isModuleAutoloaded(const QString &module)
34 return Kded::self()->isModuleAutoloaded(module);
37 bool KdedAdaptor::isModuleLoadedOnDemand(const QString &module)
39 return Kded::self()->isModuleLoadedOnDemand(module);
42 bool KdedAdaptor::loadModule(const QString &module)
44 return Kded::self()->loadModule(module, false) != 0;
47 bool KdedAdaptor::unloadModule(const QString &module)
49 return Kded::self()->unloadModule(module);
52 void KdedAdaptor::registerWindowId(qlonglong windowId, const QDBusMessage &msg)
54 Kded::self()->registerWindowId(windowId, msg.service());
57 void KdedAdaptor::setModuleAutoloading(const QString &module, bool autoload)
59 return Kded::self()->setModuleAutoloading(module, autoload);
61 void KdedAdaptor::unregisterWindowId(qlonglong windowId, const QDBusMessage &msg)
63 Kded::self()->unregisterWindowId(windowId, msg.service());
66 QStringList KdedAdaptor::loadedModules()
68 return Kded::self()->loadedModules();
71 void KdedAdaptor::reconfigure()
73 KGlobal::config()->reparseConfiguration();
74 Kded::self()->initModules();
75 Kded::self()->loadSecondPhase();
78 void KdedAdaptor::loadSecondPhase()
80 Kded::self()->loadSecondPhase();
83 void KdedAdaptor::quit()
85 QCoreApplication::instance()->quit();
88 #include "kdedadaptor.moc"