Commit 4627bed7 authored by Nicolás Alvarez's avatar Nicolás Alvarez
Browse files

Initial import from the monolithic kdepim.

This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://community.kde.org/Frameworks/GitOldHistory

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, kdepim master branch, at commit
d0009536f24e8c7f4cc32a70936f5c25194e9a6f
parents
cmake_minimum_required(VERSION 2.8.12)
project(MailImporter)
if(${CMAKE_SOURCE_DIR} STREQUAL ${MailImporter_SOURCE_DIR})
# ECM setup
find_package(ECM 5.16.0 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(KF5_VERSION "5.16.0")
set(KDEPIMLIBS_LIB_VERSION "5.1.42")
set(KDEPIM_LIB_VERSION "5.1.42")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
find_package(KF5Akonadi ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools Xml)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Libkdepim ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiContact ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX MAILIMPORTER
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mailimporter_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterConfigVersion.cmake"
SOVERSION 5
)
########### Targets ###########
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailImporter")
ecm_configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailImporterConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5MailImporterTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5MailImporterTargets.cmake NAMESPACE KF5::)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailimporter_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
else()
ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX MAILIMPORTER
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mailimporter_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterConfigVersion.cmake"
SOVERSION 5
)
endif()
add_definitions(-DTRANSLATION_DOMAIN=\"libmailimporter\")
add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/KF5MailImporterTargets.cmake")
macro(add_mailimporter_unittest _source)
ecm_add_test(${_source}
NAME_PREFIX "mailimporter-"
LINK_LIBRARIES KF5::MailImporter KF5::AkonadiCore Qt5::Test Qt5::Core Qt5::Gui
)
endmacro ()
add_mailimporter_unittest(filterthunderbirdtest.cpp)
add_mailimporter_unittest(filtericedovetest.cpp)
add_mailimporter_unittest(filterclawsmailtest.cpp)
add_mailimporter_unittest(filtersylpheedtest.cpp)
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 "filterclawsmailtest.h"
#include <qtest.h>
FilterClawsMailTest::FilterClawsMailTest(QObject *parent)
: QObject(parent)
{
}
FilterClawsMailTest::~FilterClawsMailTest()
{
}
QTEST_MAIN(FilterClawsMailTest)
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 FILTERCLAWSMAILTEST_H
#define FILTERCLAWSMAILTEST_H
#include <QObject>
class FilterClawsMailTest : public QObject
{
Q_OBJECT
public:
explicit FilterClawsMailTest(QObject *parent = Q_NULLPTR);
~FilterClawsMailTest();
};
#endif // FILTERCLAWSMAILTEST_H
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 "filtericedovetest.h"
#include "mailimporter/filtericedove.h"
#include <qtest.h>
class FilterIcecoveAbstract : public MailImporter::FilterIcedove
{
public:
FilterIcecoveAbstract()
{
}
QString settingsPath()
{
return MailImporter::FilterIcedove::settingsPath();
}
};
FilterIcedoveTest::FilterIcedoveTest(QObject *parent)
: QObject(parent)
{
}
FilterIcedoveTest::~FilterIcedoveTest()
{
}
void FilterIcedoveTest::shouldHaveDefaultSettingsPath()
{
FilterIcecoveAbstract filter;
QCOMPARE(filter.settingsPath(), MailImporter::FilterIcedove::defaultSettingsPath());
}
QTEST_MAIN(FilterIcedoveTest)
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 FILTERICEDOVETEST_H
#define FILTERICEDOVETEST_H
#include <QObject>
class FilterIcedoveTest : public QObject
{
Q_OBJECT
public:
explicit FilterIcedoveTest(QObject *parent = Q_NULLPTR);
~FilterIcedoveTest();
private Q_SLOTS:
void shouldHaveDefaultSettingsPath();
};
#endif // FILTERICEDOVETEST_H
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 "filtersylpheedtest.h"
#include <qtest.h>
FilterSylpheedTest::FilterSylpheedTest(QObject *parent)
: QObject(parent)
{
}
FilterSylpheedTest::~FilterSylpheedTest()
{
}
QTEST_MAIN(FilterSylpheedTest)
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 FILTERSYLPHEEDTEST_H
#define FILTERSYLPHEEDTEST_H
#include <QObject>
class FilterSylpheedTest : public QObject
{
Q_OBJECT
public:
explicit FilterSylpheedTest(QObject *parent = Q_NULLPTR);
~FilterSylpheedTest();
};
#endif // FILTERSYLPHEEDTEST_H
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 "filterthunderbirdtest.h"
#include "mailimporter/filterthunderbird.h"
#include <qtest.h>
class FilterThunderBirdAbstract : public MailImporter::FilterThunderbird
{
public:
FilterThunderBirdAbstract()
{
}
QString settingsPath()
{
return MailImporter::FilterThunderbird::settingsPath();
}
};
FilterThunderBirdTest::FilterThunderBirdTest(QObject *parent)
: QObject(parent)
{
}
FilterThunderBirdTest::~FilterThunderBirdTest()
{
}
void FilterThunderBirdTest::shouldHaveDefaultSettingsPath()
{
FilterThunderBirdAbstract filter;
QCOMPARE(filter.settingsPath(), MailImporter::FilterThunderbird::defaultSettingsPath());
}
QTEST_MAIN(FilterThunderBirdTest)
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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 FILTERTHUNDERBIRDTEST_H
#define FILTERTHUNDERBIRDTEST_H
#include <QObject>
class FilterThunderBirdTest : public QObject
{
Q_OBJECT
public:
explicit FilterThunderBirdTest(QObject *parent = Q_NULLPTR);
~FilterThunderBirdTest();
private Q_SLOTS:
void shouldHaveDefaultSettingsPath();
};
#endif // FILTERTHUNDERBIRDTEST_H
This diff is collapsed.
These files came from mbx2mbox by David Coppit (david@coppit.org, http://coppit.org/)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment