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/imapresource/CMakeLists.txt | 2 +- examples/imapresource/domainadaptor.cpp | 35 ------------------------------ examples/imapresource/domainadaptor.h | 38 --------------------------------- examples/imapresource/imapresource.cpp | 4 ++-- 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 examples/imapresource/domainadaptor.cpp delete mode 100644 examples/imapresource/domainadaptor.h (limited to 'examples/imapresource') diff --git a/examples/imapresource/CMakeLists.txt b/examples/imapresource/CMakeLists.txt index 61680cd..46a8b08 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 imapresource.cpp domainadaptor.cpp imapserverproxy.cpp) +add_library(${PROJECT_NAME} SHARED imapresource.cpp imapserverproxy.cpp) qt5_use_modules(${PROJECT_NAME} Core Network) target_link_libraries(${PROJECT_NAME} sink KF5::Mime KIMAP2) diff --git a/examples/imapresource/domainadaptor.cpp b/examples/imapresource/domainadaptor.cpp deleted file mode 100644 index 4e74ad2..0000000 --- a/examples/imapresource/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; - -ImapMailAdaptorFactory::ImapMailAdaptorFactory() - : DomainTypeAdaptorFactory() -{ - -} - -ImapFolderAdaptorFactory::ImapFolderAdaptorFactory() - : DomainTypeAdaptorFactory() -{ - -} - diff --git a/examples/imapresource/domainadaptor.h b/examples/imapresource/domainadaptor.h deleted file mode 100644 index 06a513c..0000000 --- a/examples/imapresource/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 "mail_generated.h" -#include "folder_generated.h" -#include "dummy_generated.h" - -class ImapMailAdaptorFactory : public DomainTypeAdaptorFactory -{ -public: - ImapMailAdaptorFactory(); - virtual ~ImapMailAdaptorFactory() {}; -}; - -class ImapFolderAdaptorFactory : public DomainTypeAdaptorFactory -{ -public: - ImapFolderAdaptorFactory(); - virtual ~ImapFolderAdaptorFactory() {}; -}; diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 4f6f748..535a35c 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp @@ -955,8 +955,8 @@ void ImapResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFa void ImapResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) { - registry.registerFactory(name); - registry.registerFactory(name); + registry.registerFactory>(name); + registry.registerFactory>(name); } void ImapResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier) -- cgit v1.2.3