Commit c89303ae authored by Laurent Montel's avatar Laurent Montel 😁

Move in own directory

parent 5d23a6aa
......@@ -3,45 +3,11 @@
configure_file(importwizard-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/importwizard-version.h @ONLY)
add_subdirectory(icons)
add_subdirectory(kconf_update)
set(libimportwizard_abstract_SRCS
abstract/abstractimporter.cpp
abstract/abstractsettings.cpp
abstract/abstractaddressbook.cpp
abstract/abstractcalendar.cpp
abstract/abstractbase.cpp
abstract/abstractdisplayinfo.cpp
)
set(libimportwizard_utils_SRCS
autodetect/importwizardutil.cpp
)
ecm_qt_declare_logging_category(libimportwizard_abstract_SRCS HEADER libimportwizard_debug.h IDENTIFIER LIBIMPORTWIZARD_LOG CATEGORY_NAME org.kde.pim.importwizard.lib)
add_subdirectory(libimportwizard)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-kontact-import-wizard.png")
ecm_add_app_icon(importwizard_SRCS ICONS ${ICONS_SRCS})
add_library(libimportwizard ${libimportwizard_abstract_SRCS} ${libimportwizard_utils_SRCS})
generate_export_header(libimportwizard BASE_NAME libimportwizard)
target_link_libraries(libimportwizard
PUBLIC
KF5::MailTransport
PRIVATE
KF5::Archive
KF5::PimCommon
KF5::MailCommon
KF5::I18n
)
set_target_properties(libimportwizard
PROPERTIES OUTPUT_NAME importwizard VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}
)
set(importwizard_SRCS
main.cpp
importwizard.cpp
......@@ -116,7 +82,5 @@ target_link_libraries(importwizard
install(TARGETS importwizard ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS data/org.kde.importwizard.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(TARGETS libimportwizard ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK})
add_subdirectory(manual/pics)
add_subdirectory(plugins/)
......@@ -20,7 +20,7 @@
#define SELECTCOMPONENTPAGE_H
#include <QWidget>
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
namespace Ui {
class SelectComponentPage;
......
......@@ -19,7 +19,7 @@
#include "importmailpluginmanager.h"
#include "importwizard_debug.h"
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
#include <KPluginMetaData>
#include <KPluginLoader>
......
......@@ -19,7 +19,7 @@
#ifndef IMPORTWIZARD_H
#define IMPORTWIZARD_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
#include "libimportwizard_export.h"
#include <KAssistantDialog>
......
......@@ -20,7 +20,7 @@
#ifndef IMPORTWIZARDDISPLAYINFO_H
#define IMPORTWIZARDDISPLAYINFO_H
#include "abstract/abstractdisplayinfo.h"
#include "abstractdisplayinfo.h"
#include <QObject>
class ImportWizard;
......
set(libimportwizard_abstract_SRCS
abstractimporter.cpp
abstractsettings.cpp
abstractaddressbook.cpp
abstractcalendar.cpp
abstractbase.cpp
abstractdisplayinfo.cpp
)
set(libimportwizard_utils_SRCS
importwizardutil.cpp
)
ecm_qt_declare_logging_category(libimportwizard_abstract_SRCS HEADER libimportwizard_debug.h IDENTIFIER LIBIMPORTWIZARD_LOG CATEGORY_NAME org.kde.pim.importwizard.lib)
add_library(libimportwizard ${libimportwizard_abstract_SRCS} ${libimportwizard_utils_SRCS})
generate_export_header(libimportwizard BASE_NAME libimportwizard)
target_link_libraries(libimportwizard
PUBLIC
KF5::MailTransport
PRIVATE
KF5::Archive
KF5::PimCommon
KF5::MailCommon
KF5::I18n
)
set_target_properties(libimportwizard
PROPERTIES OUTPUT_NAME importwizard VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}
)
install(TARGETS libimportwizard ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK})
......@@ -16,8 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "abstract/abstractaddressbook.h"
#include "importwizard.h"
#include "abstractaddressbook.h"
#include "importaddressbookpage.h"
#include "abstractdisplayinfo.h"
......
......@@ -19,7 +19,7 @@
#include "abstractcalendar.h"
#include "importcalendarpage.h"
#include "abstract/abstractdisplayinfo.h"
#include "abstractdisplayinfo.h"
#include <KSharedConfig>
#include <KConfigGroup>
using namespace LibImportWizard;
......
......@@ -22,7 +22,7 @@
#include "importfilterpage.h"
#include "importsettingpage.h"
#include "importcalendarpage.h"
#include "abstract/abstractdisplayinfo.h"
#include "abstractdisplayinfo.h"
#include "mailimporter/filterinfo.h"
#include "MailCommon/FilterManager"
......
......@@ -16,8 +16,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "abstract/abstractsettings.h"
#include "abstract/abstractdisplayinfo.h"
#include "abstractsettings.h"
#include "abstractdisplayinfo.h"
#include "importsettingpage.h"
#include <KIdentityManagement/kidentitymanagement/identitymanager.h>
......
/*
Copyright (c) 2017 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef _HELPER_H
#define _HELPER_H
#include <qglobal.h>
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
template<typename ... Args>
struct QNonConstOverload
{
template<typename R, typename T>
Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args ...)) const Q_DECL_NOTHROW->decltype(ptr)
{
return ptr;
}
template<typename R, typename T>
static Q_DECL_CONSTEXPR auto of(R (T::*ptr)(Args ...)) Q_DECL_NOTHROW->decltype(ptr)
{
return ptr;
}
};
template<typename ... Args>
struct QConstOverload
{
template<typename R, typename T>
Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args ...) const) const Q_DECL_NOTHROW->decltype(ptr)
{
return ptr;
}
template<typename R, typename T>
static Q_DECL_CONSTEXPR auto of(R (T::*ptr)(Args ...) const) Q_DECL_NOTHROW->decltype(ptr)
{
return ptr;
}
};
template<typename ... Args>
struct QOverload : QConstOverload<Args ...>, QNonConstOverload<Args ...>
{
using QConstOverload<Args ...>::of;
using QConstOverload<Args ...>::operator();
using QNonConstOverload<Args ...>::of;
using QNonConstOverload<Args ...>::operator();
template<typename R>
Q_DECL_CONSTEXPR auto operator()(R (*ptr)(Args ...)) const Q_DECL_NOTHROW->decltype(ptr)
{
return ptr;
}
template<typename R>
static Q_DECL_CONSTEXPR auto of(R (*ptr)(Args ...)) Q_DECL_NOTHROW->decltype(ptr)
{
return ptr;
}
};
namespace QtPrivate {
template<typename T> struct QAddConst {
typedef const T Type;
};
}
// this adds const to non-const objects (like std::as_const)
template<typename T>
Q_DECL_CONSTEXPR typename QtPrivate::QAddConst<T>::Type &qAsConst(T &t) Q_DECL_NOTHROW {
return t;
}
// prevent rvalue arguments:
template<typename T>
void qAsConst(const T &&) Q_DECL_EQ_DELETE;
#endif
#endif
......@@ -20,7 +20,7 @@
#ifndef BalsaAddressBook_H
#define BalsaAddressBook_H
#include "abstract/abstractaddressbook.h"
#include "abstractaddressbook.h"
class KConfigGroup;
......
......@@ -24,7 +24,7 @@
#include "mailimporter/filterinfo.h"
#include "MailCommon/FilterImporterBalsa"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
......
......@@ -19,7 +19,7 @@
#ifndef BalsaImportData_H
#define BalsaImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class BalsaImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -20,7 +20,7 @@
#ifndef BalsaSettings_H
#define BalsaSettings_H
#include "abstract/abstractsettings.h"
#include "abstractsettings.h"
class KConfigGroup;
......
......@@ -24,7 +24,7 @@
#include "MailCommon/FilterImporterClawsMail"
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include <kpluginfactory.h>
#include <KLocalizedString>
......
......@@ -19,7 +19,7 @@
#ifndef ClawsMailImportData_H
#define ClawsMailImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class ClawsMailImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -19,7 +19,7 @@
#ifndef Evolutionv1ImportData_H
#define Evolutionv1ImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class Evolutionv1ImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -19,7 +19,7 @@
#ifndef Evolutionv2ImportData_H
#define Evolutionv2ImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class Evolutionv2ImportData : public LibImportWizard::AbstractImporter
{
public:
......
......@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
#include "evolutionaddressbook.h"
#include "abstract/abstractdisplayinfo.h"
#include "importwizard.h"
#include "abstractdisplayinfo.h"
#include "evolutionv3plugin_debug.h"
#include <QProcess>
#include <KMessageBox>
......
......@@ -20,7 +20,7 @@
#ifndef EVOLUTIONADDRESSBOOK_H
#define EVOLUTIONADDRESSBOOK_H
#include "abstract/abstractaddressbook.h"
#include "abstractaddressbook.h"
class EvolutionAddressBook : public LibImportWizard::AbstractAddressBook
{
......
......@@ -20,7 +20,7 @@
#ifndef EVOLUTIONCALENDAR_H
#define EVOLUTIONCALENDAR_H
#include "abstract/abstractcalendar.h"
#include "abstractcalendar.h"
class QDomElement;
......
......@@ -20,7 +20,7 @@
#ifndef EVOLUTIONSETTINGS_H
#define EVOLUTIONSETTINGS_H
#include "abstract/abstractsettings.h"
#include "abstractsettings.h"
#include <KIdentityManagement/kidentitymanagement/signature.h>
#include <QString>
......
......@@ -26,7 +26,7 @@
#include "importfilterinfogui.h"
#include "MailCommon/FilterImporterExporter"
#include <kpluginfactory.h>
#include "importwizard.h"
#include <KLocalizedString>
......
......@@ -19,7 +19,7 @@
#ifndef Evolutionv3ImportData_H
#define Evolutionv3ImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class Evolutionv3ImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -20,7 +20,7 @@
#ifndef GearyAddressBook_H
#define GearyAddressBook_H
#include "abstract/abstractaddressbook.h"
#include "abstractaddressbook.h"
#include <QHash>
class GearyAddressBook : public LibImportWizard::AbstractAddressBook
......
......@@ -23,7 +23,7 @@
#include "mailimporter/filterinfo.h"
#include "mailimporter/othermailerutil.h"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include "gearyplugin_debug.h"
#include <kpluginfactory.h>
#include <QDir>
......
......@@ -19,7 +19,7 @@
#ifndef GearyImportData_H
#define GearyImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class GearyImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -25,7 +25,6 @@
#include <KIdentityManagement/kidentitymanagement/identity.h>
#include <KIdentityManagement/kidentitymanagement/signature.h>
#include "importwizard_debug.h"
#include <QSettings>
......
......@@ -20,7 +20,7 @@
#ifndef GearySettings_H
#define GearySettings_H
#include "abstract/abstractsettings.h"
#include "abstractsettings.h"
class QSettings;
......
......@@ -19,14 +19,14 @@
#include "icedoveimportdata.h"
#include "importfilterinfogui.h"
#include "abstract/abstractdisplayinfo.h"
#include "abstractdisplayinfo.h"
#include "../thunderbird/thunderbirdsettings.h"
#include "../thunderbird/thunderbirdaddressbook.h"
#include "mailimporter/filtericedove.h"
#include "mailimporter/filterinfo.h"
#include "MailCommon/FilterImporterExporter"
#include "importwizard.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
......
......@@ -19,7 +19,7 @@
#ifndef IcedoveImportData_H
#define IcedoveImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class IcedoveImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -21,7 +21,7 @@
#include "mailimporter/filtermailapp.h"
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
......
......@@ -19,7 +19,7 @@
#ifndef MailAppImportData_H
#define MailAppImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class MailAppImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -21,7 +21,7 @@
#include "mailimporter/filteroe.h"
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
......
......@@ -19,7 +19,7 @@
#ifndef OeImportData_H
#define OeImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class OeImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -20,7 +20,7 @@
#ifndef OPERAADDRESSBOOK_H
#define OPERAADDRESSBOOK_H
#include "abstract/abstractaddressbook.h"
#include "abstractaddressbook.h"
class OperaAddressBook : public LibImportWizard::AbstractAddressBook
{
......
......@@ -23,7 +23,7 @@
#include "mailimporter/filteropera.h"
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
......
......@@ -20,7 +20,7 @@
#ifndef OperaImportData_H
#define OperaImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class OperaImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -20,7 +20,7 @@
#ifndef OPERASETTINGS_H
#define OPERASETTINGS_H
#include "abstract/abstractsettings.h"
#include "abstractsettings.h"
class KConfigGroup;
......
......@@ -22,7 +22,7 @@
#include "mailimporter/filterpmail.h"
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "importwizard.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
......
......@@ -20,7 +20,7 @@
#ifndef PMailImportData_H
#define PMailImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class PMailImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -20,7 +20,7 @@
#ifndef PMailSettings_H
#define PMailSettings_H
#include "abstract/abstractsettings.h"
#include "abstractsettings.h"
class KConfigGroup;
......
......@@ -20,7 +20,7 @@
#ifndef SYLPHEEDADDRESSBOOK_H
#define SYLPHEEDADDRESSBOOK_H
#include "abstract/abstractaddressbook.h"
#include "abstractaddressbook.h"
#include <QHash>
#include <QDir>
class QString;
......
......@@ -22,7 +22,7 @@
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "MailCommon/FilterImporterExporter"
#include "importwizard.h"
#include "sylpheedsettings.h"
#include "sylpheedaddressbook.h"
......
......@@ -19,7 +19,7 @@
#ifndef SylpheedImportData_H
#define SylpheedImportData_H
#include "abstract/abstractimporter.h"
#include "abstractimporter.h"
class SylpheedImportData : public LibImportWizard::AbstractImporter
{
......
......@@ -20,7 +20,7 @@
#ifndef SYLPHEEDSETTINGS_H
#define SYLPHEEDSETTINGS_H
#include "abstract/abstractsettings.h"
#include "abstractsettings.h"
#include <QString>
class KConfigGroup;
......