From daf96f7efec0538e161eab8e906a291015842e1e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Mar 2017 14:12:14 +0100 Subject: Default domain adaptor --- examples/davresource/CMakeLists.txt | 2 +- examples/davresource/davresource.cpp | 4 ++-- examples/davresource/domainadaptor.cpp | 35 ------------------------------- examples/davresource/domainadaptor.h | 38 ---------------------------------- 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 examples/davresource/domainadaptor.cpp delete mode 100644 examples/davresource/domainadaptor.h (limited to 'examples/davresource') diff --git a/examples/davresource/CMakeLists.txt b/examples/davresource/CMakeLists.txt index 9f134c2..28829d5 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 davresource.cpp domainadaptor.cpp) +add_library(${PROJECT_NAME} SHARED davresource.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 d116397..d7254b4 100644 --- a/examples/davresource/davresource.cpp +++ b/examples/davresource/davresource.cpp @@ -277,8 +277,8 @@ void DavResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFac void DavResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) { - registry.registerFactory(name); - registry.registerFactory(name); + registry.registerFactory>(name); + registry.registerFactory>(name); } void DavResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier) diff --git a/examples/davresource/domainadaptor.cpp b/examples/davresource/domainadaptor.cpp deleted file mode 100644 index 861a10e..0000000 --- a/examples/davresource/domainadaptor.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2015 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 "domainadaptor.h" - -using namespace flatbuffers; - -ContactAdaptorFactory::ContactAdaptorFactory() - : DomainTypeAdaptorFactory() -{ - -} - -AddressbookAdaptorFactory::AddressbookAdaptorFactory() - : DomainTypeAdaptorFactory() -{ - -} - diff --git a/examples/davresource/domainadaptor.h b/examples/davresource/domainadaptor.h deleted file mode 100644 index 7e3c723..0000000 --- a/examples/davresource/domainadaptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2015 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 -#include "contact_generated.h" -#include "folder_generated.h" -#include "dummy_generated.h" - -class ContactAdaptorFactory : public DomainTypeAdaptorFactory -{ -public: - ContactAdaptorFactory(); - virtual ~ContactAdaptorFactory() {}; -}; - -class AddressbookAdaptorFactory : public DomainTypeAdaptorFactory -{ -public: - AddressbookAdaptorFactory(); - virtual ~AddressbookAdaptorFactory() {}; -}; -- cgit v1.2.3