diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -83,7 +83,6 @@ set(kded_powerdevil_SRCS powerdevil_debug.cpp kdedpowerdevil.cpp - powerdevilbackendloader.cpp powerdevilfdoconnector.cpp ) diff --git a/daemon/kdedpowerdevil.cpp b/daemon/kdedpowerdevil.cpp --- a/daemon/kdedpowerdevil.cpp +++ b/daemon/kdedpowerdevil.cpp @@ -23,10 +23,11 @@ #include "powermanagementadaptor.h" #include "powermanagementpolicyagentadaptor.h" -#include "powerdevilbackendloader.h" #include "powerdevilcore.h" #include "powerdevil_debug.h" +#include "backends/upower/powerdevilupowerbackend.h" + #include #include #include @@ -78,7 +79,7 @@ connect(m_core, SIGNAL(coreReady()), this, SLOT(onCoreReady())); // Before doing anything, let's set up our backend - PowerDevil::BackendInterface *interface = PowerDevil::BackendLoader::loadBackend(m_core); + PowerDevil::BackendInterface *interface = new PowerDevilUPowerBackend(m_core); if (!interface) { // Ouch diff --git a/daemon/powerdevilbackendloader.h b/daemon/powerdevilbackendloader.h deleted file mode 100644 --- a/daemon/powerdevilbackendloader.h +++ /dev/null @@ -1,36 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 by Dario Freddi * - * * - * This program 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. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -#ifndef POWERDEVIL_BACKENDLOADER_H -#define POWERDEVIL_BACKENDLOADER_H - -class QObject; -namespace PowerDevil { - -class BackendInterface; - - -namespace BackendLoader -{ - BackendInterface *loadBackend(QObject *parent); -} - -} - -#endif // POWERDEVIL_POWERDEVILBACKENDLOADER_H diff --git a/daemon/powerdevilbackendloader.cpp b/daemon/powerdevilbackendloader.cpp deleted file mode 100644 --- a/daemon/powerdevilbackendloader.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 by Dario Freddi * - * * - * This program 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. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - - -#include -#include "powerdevilbackendloader.h" -#include "powerdevil_debug.h" - -#include "backends/upower/powerdevilupowerbackend.h" - -namespace PowerDevil { -namespace BackendLoader { - -BackendInterface *loadBackend(QObject *parent) -{ - return new PowerDevilUPowerBackend(parent); -} - -} -} -