From a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Mar 2017 12:41:55 +0100 Subject: Removed unnecessary default implementations --- examples/davresource/CMakeLists.txt | 2 +- examples/davresource/davresource.cpp | 4 +-- examples/davresource/facade.cpp | 44 -------------------------- examples/davresource/facade.h | 36 --------------------- examples/dummyresource/CMakeLists.txt | 2 +- examples/dummyresource/facade.cpp | 51 ------------------------------ examples/dummyresource/facade.h | 44 -------------------------- examples/dummyresource/resourcefactory.cpp | 8 +++-- examples/imapresource/CMakeLists.txt | 2 +- examples/imapresource/facade.cpp | 44 -------------------------- examples/imapresource/facade.h | 36 --------------------- examples/imapresource/imapresource.cpp | 4 +-- 12 files changed, 12 insertions(+), 265 deletions(-) delete mode 100644 examples/davresource/facade.cpp delete mode 100644 examples/davresource/facade.h delete mode 100644 examples/dummyresource/facade.cpp delete mode 100644 examples/dummyresource/facade.h delete mode 100644 examples/imapresource/facade.cpp delete mode 100644 examples/imapresource/facade.h (limited to 'examples') diff --git a/examples/davresource/CMakeLists.txt b/examples/davresource/CMakeLists.txt index f8cbdb4..9f134c2 100644 --- a/examples/davresource/CMakeLists.txt +++ b/examples/davresource/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) find_package(KPimKDAV REQUIRED) -add_library(${PROJECT_NAME} SHARED facade.cpp davresource.cpp domainadaptor.cpp) +add_library(${PROJECT_NAME} SHARED davresource.cpp domainadaptor.cpp) qt5_use_modules(${PROJECT_NAME} Core Network) target_link_libraries(${PROJECT_NAME} sink KPim::KDAV) diff --git a/examples/davresource/davresource.cpp b/examples/davresource/davresource.cpp index f110eb0..d116397 100644 --- a/examples/davresource/davresource.cpp +++ b/examples/davresource/davresource.cpp @@ -271,8 +271,8 @@ Sink::Resource *DavResourceFactory::createResource(const ResourceContext &contex void DavResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory) { - factory.registerFacade(name); - factory.registerFacade(name); + factory.registerFacade>(name); + factory.registerFacade>(name); } void DavResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) diff --git a/examples/davresource/facade.cpp b/examples/davresource/facade.cpp deleted file mode 100644 index 8ee1b01..0000000 --- a/examples/davresource/facade.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * 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 "facade.h" - -#include -#include - -#include "query.h" - -DavResourceContactFacade::DavResourceContactFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DavResourceContactFacade::~DavResourceContactFacade() -{ -} - - -DavResourceAddressbookFacade::DavResourceAddressbookFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DavResourceAddressbookFacade::~DavResourceAddressbookFacade() -{ -} diff --git a/examples/davresource/facade.h b/examples/davresource/facade.h deleted file mode 100644 index d520891..0000000 --- a/examples/davresource/facade.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * 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. - */ - -#pragma once - -#include "common/facade.h" - -class DavResourceContactFacade : public Sink::GenericFacade -{ -public: - DavResourceContactFacade(const Sink::ResourceContext &context); - virtual ~DavResourceContactFacade(); -}; - -class DavResourceAddressbookFacade : public Sink::GenericFacade -{ -public: - DavResourceAddressbookFacade(const Sink::ResourceContext &context); - virtual ~DavResourceAddressbookFacade(); -}; diff --git a/examples/dummyresource/CMakeLists.txt b/examples/dummyresource/CMakeLists.txt index 6400f0c..2bbaa47 100644 --- a/examples/dummyresource/CMakeLists.txt +++ b/examples/dummyresource/CMakeLists.txt @@ -4,7 +4,7 @@ add_definitions(-DQT_PLUGIN) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -add_library(${PROJECT_NAME} SHARED facade.cpp resourcefactory.cpp domainadaptor.cpp dummystore.cpp) +add_library(${PROJECT_NAME} SHARED resourcefactory.cpp domainadaptor.cpp dummystore.cpp) generate_flatbuffers(${PROJECT_NAME} dummycalendar) qt5_use_modules(${PROJECT_NAME} Core Network) target_link_libraries(${PROJECT_NAME} sink) diff --git a/examples/dummyresource/facade.cpp b/examples/dummyresource/facade.cpp deleted file mode 100644 index 4343eba..0000000 --- a/examples/dummyresource/facade.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * 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 "facade.h" - -#include "domainadaptor.h" - -DummyResourceFacade::DummyResourceFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DummyResourceFacade::~DummyResourceFacade() -{ -} - - -DummyResourceMailFacade::DummyResourceMailFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DummyResourceMailFacade::~DummyResourceMailFacade() -{ -} - - -DummyResourceFolderFacade::DummyResourceFolderFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DummyResourceFolderFacade::~DummyResourceFolderFacade() -{ -} diff --git a/examples/dummyresource/facade.h b/examples/dummyresource/facade.h deleted file mode 100644 index 1bb45fd..0000000 --- a/examples/dummyresource/facade.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * 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. - */ - -#pragma once - -#include "common/facade.h" -#include "common/domain/event.h" - -class DummyResourceFacade : public Sink::GenericFacade -{ -public: - DummyResourceFacade(const Sink::ResourceContext &context); - virtual ~DummyResourceFacade(); -}; - -class DummyResourceMailFacade : public Sink::GenericFacade -{ -public: - DummyResourceMailFacade(const Sink::ResourceContext &context); - virtual ~DummyResourceMailFacade(); -}; - -class DummyResourceFolderFacade : public Sink::GenericFacade -{ -public: - DummyResourceFolderFacade(const Sink::ResourceContext &context); - virtual ~DummyResourceFolderFacade(); -}; diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index e915710..cf20633 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -46,6 +46,8 @@ SINK_DEBUG_AREA("dummyresource") +using namespace Sink; + class DummySynchronizer : public Sink::Synchronizer { public: @@ -194,9 +196,9 @@ Sink::Resource *DummyResourceFactory::createResource(const Sink::ResourceContext void DummyResourceFactory::registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory) { - factory.registerFacade(resourceName); - factory.registerFacade(resourceName); - factory.registerFacade(resourceName); + factory.registerFacade>(resourceName); + factory.registerFacade>(resourceName); + factory.registerFacade>(resourceName); } void DummyResourceFactory::registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry ®istry) diff --git a/examples/imapresource/CMakeLists.txt b/examples/imapresource/CMakeLists.txt index 15a720d..61680cd 100644 --- a/examples/imapresource/CMakeLists.txt +++ b/examples/imapresource/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(KIMAP2 0.0.1 REQUIRED) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -add_library(${PROJECT_NAME} SHARED facade.cpp imapresource.cpp domainadaptor.cpp imapserverproxy.cpp) +add_library(${PROJECT_NAME} SHARED imapresource.cpp domainadaptor.cpp imapserverproxy.cpp) qt5_use_modules(${PROJECT_NAME} Core Network) target_link_libraries(${PROJECT_NAME} sink KF5::Mime KIMAP2) diff --git a/examples/imapresource/facade.cpp b/examples/imapresource/facade.cpp deleted file mode 100644 index 2829bb1..0000000 --- a/examples/imapresource/facade.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * 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 "facade.h" - -#include -#include - -#include "domainadaptor.h" -#include "queryrunner.h" - -ImapResourceMailFacade::ImapResourceMailFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -ImapResourceMailFacade::~ImapResourceMailFacade() -{ -} - -ImapResourceFolderFacade::ImapResourceFolderFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -ImapResourceFolderFacade::~ImapResourceFolderFacade() -{ -} diff --git a/examples/imapresource/facade.h b/examples/imapresource/facade.h deleted file mode 100644 index 1d24856..0000000 --- a/examples/imapresource/facade.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * 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. - */ - -#pragma once - -#include "common/facade.h" - -class ImapResourceMailFacade : public Sink::GenericFacade -{ -public: - ImapResourceMailFacade(const Sink::ResourceContext &context); - virtual ~ImapResourceMailFacade(); -}; - -class ImapResourceFolderFacade : public Sink::GenericFacade -{ -public: - ImapResourceFolderFacade(const Sink::ResourceContext &context); - virtual ~ImapResourceFolderFacade(); -}; diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index ba0251c..4f6f748 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp @@ -949,8 +949,8 @@ Sink::Resource *ImapResourceFactory::createResource(const ResourceContext &conte void ImapResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory) { - factory.registerFacade(name); - factory.registerFacade(name); + factory.registerFacade>(name); + factory.registerFacade>(name); } void ImapResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) -- cgit v1.2.3