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/maildirresource/CMakeLists.txt | 2 +- examples/maildirresource/domainadaptor.cpp | 35 ------------------------- examples/maildirresource/domainadaptor.h | 38 ---------------------------- examples/maildirresource/maildirresource.cpp | 4 +-- 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 examples/maildirresource/domainadaptor.cpp delete mode 100644 examples/maildirresource/domainadaptor.h (limited to 'examples/maildirresource') diff --git a/examples/maildirresource/CMakeLists.txt b/examples/maildirresource/CMakeLists.txt index b96c50f..a8f0359 100644 --- a/examples/maildirresource/CMakeLists.txt +++ b/examples/maildirresource/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) find_package(KF5 COMPONENTS REQUIRED Mime) -add_library(${PROJECT_NAME} SHARED facade.cpp maildirresource.cpp domainadaptor.cpp libmaildir/maildir.cpp libmaildir/keycache.cpp) +add_library(${PROJECT_NAME} SHARED facade.cpp maildirresource.cpp libmaildir/maildir.cpp libmaildir/keycache.cpp) qt5_use_modules(${PROJECT_NAME} Core Network) target_link_libraries(${PROJECT_NAME} sink KF5::Mime) diff --git a/examples/maildirresource/domainadaptor.cpp b/examples/maildirresource/domainadaptor.cpp deleted file mode 100644 index 71b2354..0000000 --- a/examples/maildirresource/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; - -MaildirMailAdaptorFactory::MaildirMailAdaptorFactory() - : DomainTypeAdaptorFactory() -{ - -} - -MaildirFolderAdaptorFactory::MaildirFolderAdaptorFactory() - : DomainTypeAdaptorFactory() -{ - -} - diff --git a/examples/maildirresource/domainadaptor.h b/examples/maildirresource/domainadaptor.h deleted file mode 100644 index 700d2e5..0000000 --- a/examples/maildirresource/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 MaildirMailAdaptorFactory : public DomainTypeAdaptorFactory -{ -public: - MaildirMailAdaptorFactory(); - virtual ~MaildirMailAdaptorFactory() {}; -}; - -class MaildirFolderAdaptorFactory : public DomainTypeAdaptorFactory -{ -public: - MaildirFolderAdaptorFactory(); - virtual ~MaildirFolderAdaptorFactory() {}; -}; diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index f80b799..a2a2f05 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp @@ -596,8 +596,8 @@ void MaildirResourceFactory::registerFacades(const QByteArray &name, Sink::Facad void MaildirResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) { - registry.registerFactory(name); - registry.registerFactory(name); + registry.registerFactory>(name); + registry.registerFactory>(name); } void MaildirResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier) -- cgit v1.2.3