diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory(daemon) +add_subdirectory(kded) add_subdirectory(lib) add_subdirectory(declarative) add_subdirectory(kcm) diff --git a/src/daemon/CMakeLists.txt b/src/kded/CMakeLists.txt rename from src/daemon/CMakeLists.txt rename to src/kded/CMakeLists.txt --- a/src/daemon/CMakeLists.txt +++ b/src/kded/CMakeLists.txt @@ -2,7 +2,7 @@ kcoreaddons_add_plugin( kded_accounts - SOURCES daemon.cpp + SOURCES kded_accounts.cpp JSON kded_accounts.json INSTALL_NAMESPACE "kf5/kded" ) diff --git a/src/daemon/daemon.h b/src/kded/kded_accounts.h rename from src/daemon/daemon.h rename to src/kded/kded_accounts.h --- a/src/daemon/daemon.h +++ b/src/kded/kded_accounts.h @@ -19,26 +19,20 @@ #ifndef ACCOUNTS_DAEMON_H #define ACCOUNTS_DAEMON_H -#include +#include #include -namespace Accounts { - class Manager; -} - -class KJob; -class AkonadiServices; class KAccountsDPlugin; -class AccountsDaemon : public KDEDModule +class KDEDAccounts : public KDEDModule { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.Accounts") public: - AccountsDaemon(QObject *parent, const QList&); - virtual ~AccountsDaemon(); + KDEDAccounts(QObject *parent, const QList&); + virtual ~KDEDAccounts(); public Q_SLOTS: void startDaemon(); @@ -52,4 +46,4 @@ QList m_plugins; }; -#endif /*KSCREN_DAEMON_H*/ +#endif /*ACCOUNTS_DAEMON_H*/ diff --git a/src/daemon/daemon.cpp b/src/kded/kded_accounts.cpp rename from src/daemon/daemon.cpp rename to src/kded/kded_accounts.cpp --- a/src/daemon/daemon.cpp +++ b/src/kded/kded_accounts.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * *************************************************************************************/ -#include "daemon.h" +#include "kded_accounts.h" #include "src/lib/kaccountsdplugin.h" #include @@ -33,15 +33,15 @@ #include #include -K_PLUGIN_FACTORY_WITH_JSON(AccountsDaemonFactory, "kded_accounts.json", registerPlugin();) +K_PLUGIN_CLASS_WITH_JSON(KDEDAccounts, "kded_accounts.json") -AccountsDaemon::AccountsDaemon(QObject *parent, const QList&) +KDEDAccounts::KDEDAccounts(QObject *parent, const QList&) : KDEDModule(parent) { QMetaObject::invokeMethod(this, "startDaemon", Qt::QueuedConnection); - connect(KAccounts::accountsManager(), &Accounts::Manager::accountCreated, this, &AccountsDaemon::accountCreated); - connect(KAccounts::accountsManager(), &Accounts::Manager::accountRemoved, this, &AccountsDaemon::accountRemoved); + connect(KAccounts::accountsManager(), &Accounts::Manager::accountCreated, this, &KDEDAccounts::accountCreated); + connect(KAccounts::accountsManager(), &Accounts::Manager::accountRemoved, this, &KDEDAccounts::accountRemoved); const QVector data = KPluginLoader::findPlugins(QStringLiteral("kaccounts/daemonplugins")); for (const KPluginMetaData& metadata : data) { @@ -69,21 +69,21 @@ } } -AccountsDaemon::~AccountsDaemon() +KDEDAccounts::~KDEDAccounts() { qDeleteAll(m_plugins); } -void AccountsDaemon::startDaemon() +void KDEDAccounts::startDaemon() { qDebug(); const Accounts::AccountIdList accList = KAccounts::accountsManager()->accountList(); for (const Accounts::AccountId &id : accList) { monitorAccount(id); } } -void AccountsDaemon::monitorAccount(const Accounts::AccountId id) +void KDEDAccounts::monitorAccount(const Accounts::AccountId id) { qDebug() << id; Accounts::Account *acc = KAccounts::accountsManager()->account(id); @@ -93,10 +93,10 @@ } acc->selectService(); - connect(acc, &Accounts::Account::enabledChanged, this, &AccountsDaemon::enabledChanged); + connect(acc, &Accounts::Account::enabledChanged, this, &KDEDAccounts::enabledChanged); } -void AccountsDaemon::accountCreated(const Accounts::AccountId id) +void KDEDAccounts::accountCreated(const Accounts::AccountId id) { qDebug() << id; monitorAccount(id); @@ -109,16 +109,16 @@ } } -void AccountsDaemon::accountRemoved(const Accounts::AccountId id) +void KDEDAccounts::accountRemoved(const Accounts::AccountId id) { qDebug() << id; for (KAccountsDPlugin *plugin : qAsConst(m_plugins)) { plugin->onAccountRemoved(id); } } -void AccountsDaemon::enabledChanged(const QString &serviceName, bool enabled) +void KDEDAccounts::enabledChanged(const QString &serviceName, bool enabled) { qDebug(); if (serviceName.isEmpty()) { @@ -140,4 +140,4 @@ } } -#include "daemon.moc" +#include "kded_accounts.moc" diff --git a/src/daemon/kded_accounts.json b/src/kded/kded_accounts.json rename from src/daemon/kded_accounts.json rename to src/kded/kded_accounts.json diff --git a/src/daemon/kio-webdav/CMakeLists.txt b/src/kded/kio-webdav/CMakeLists.txt rename from src/daemon/kio-webdav/CMakeLists.txt rename to src/kded/kio-webdav/CMakeLists.txt diff --git a/src/daemon/kio-webdav/createkioservice.h b/src/kded/kio-webdav/createkioservice.h rename from src/daemon/kio-webdav/createkioservice.h rename to src/kded/kio-webdav/createkioservice.h diff --git a/src/daemon/kio-webdav/createkioservice.cpp b/src/kded/kio-webdav/createkioservice.cpp rename from src/daemon/kio-webdav/createkioservice.cpp rename to src/kded/kio-webdav/createkioservice.cpp diff --git a/src/daemon/kio-webdav/createnetattachjob.h b/src/kded/kio-webdav/createnetattachjob.h rename from src/daemon/kio-webdav/createnetattachjob.h rename to src/kded/kio-webdav/createnetattachjob.h diff --git a/src/daemon/kio-webdav/createnetattachjob.cpp b/src/kded/kio-webdav/createnetattachjob.cpp rename from src/daemon/kio-webdav/createnetattachjob.cpp rename to src/kded/kio-webdav/createnetattachjob.cpp diff --git a/src/daemon/kio-webdav/kioservices.h b/src/kded/kio-webdav/kioservices.h rename from src/daemon/kio-webdav/kioservices.h rename to src/kded/kio-webdav/kioservices.h diff --git a/src/daemon/kio-webdav/kioservices.cpp b/src/kded/kio-webdav/kioservices.cpp rename from src/daemon/kio-webdav/kioservices.cpp rename to src/kded/kio-webdav/kioservices.cpp diff --git a/src/daemon/kio-webdav/removekioservice.h b/src/kded/kio-webdav/removekioservice.h rename from src/daemon/kio-webdav/removekioservice.h rename to src/kded/kio-webdav/removekioservice.h diff --git a/src/daemon/kio-webdav/removekioservice.cpp b/src/kded/kio-webdav/removekioservice.cpp rename from src/daemon/kio-webdav/removekioservice.cpp rename to src/kded/kio-webdav/removekioservice.cpp diff --git a/src/daemon/kio-webdav/removenetattachjob.h b/src/kded/kio-webdav/removenetattachjob.h rename from src/daemon/kio-webdav/removenetattachjob.h rename to src/kded/kio-webdav/removenetattachjob.h diff --git a/src/daemon/kio-webdav/removenetattachjob.cpp b/src/kded/kio-webdav/removenetattachjob.cpp rename from src/daemon/kio-webdav/removenetattachjob.cpp rename to src/kded/kio-webdav/removenetattachjob.cpp diff --git a/src/daemon/kio-webdav/tests/CMakeLists.txt b/src/kded/kio-webdav/tests/CMakeLists.txt rename from src/daemon/kio-webdav/tests/CMakeLists.txt rename to src/kded/kio-webdav/tests/CMakeLists.txt diff --git a/src/daemon/kio-webdav/tests/testnetattachjobs.cpp b/src/kded/kio-webdav/tests/testnetattachjobs.cpp rename from src/daemon/kio-webdav/tests/testnetattachjobs.cpp rename to src/kded/kio-webdav/tests/testnetattachjobs.cpp