Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
04d5e8a5
Commit
04d5e8a5
authored
Aug 05, 2020
by
Laurent Montel
😁
Browse files
Prepare autotests
parent
0eef3771
Pipeline
#29697
failed with stage
in 8 minutes and 4 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kaddressbook/importexportplugins/windows-contacts/CMakeLists.txt
View file @
04d5e8a5
set
(
kaddressbook_importexport_windowscontact_debugfile_SRCS
)
ecm_qt_declare_logging_category
(
kaddressbook_importexport_windowscontact_debugfile_SRCS HEADER importexportwindowscontactplugin_debug.h IDENTIFIER IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG CATEGORY_NAME org.kde.pim.importexportwindowscontactplugin
DESCRIPTION
"kdepim-addons (Import/Export Windows Contact plugin)"
EXPORT KDEPIMADDONS
)
set
(
kaddressbook_importexport_windowscontact_SRCS
${
kaddressbook_importexport_windowscontact_debugfile_SRCS
}
windowscontactimportexportplugin.cpp
windowscontactimportexportplugininterface.cpp
importwindowcontact.cpp
)
ecm_qt_declare_logging_category
(
kaddressbook_importexport_windowscontact_SRCS HEADER importexportwindowscontactplugin_debug.h IDENTIFIER IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG CATEGORY_NAME org.kde.pim.importexportwindowscontactplugin
DESCRIPTION
"kdepim-addons (Import/Export Windows Contact plugin)"
EXPORT KDEPIMADDONS
)
kcoreaddons_add_plugin
(
kaddressbook_importexportwindowscontactplugin JSON kaddressbook_importexportwindowscontactplugin.json SOURCES
${
kaddressbook_importexport_windowscontact_SRCS
}
INSTALL_NAMESPACE kaddressbook/importexportplugin
)
...
...
@@ -23,3 +25,6 @@ target_link_libraries(kaddressbook_importexportwindowscontactplugin KF5::Kaddres
KF5::AkonadiCore
kaddressbookimportexportlibprivate
)
if
(
BUILD_TESTING
)
add_subdirectory
(
autotests
)
endif
()
kaddressbook/importexportplugins/windows-contacts/autotests/CMakeLists.txt
0 → 100644
View file @
04d5e8a5
ecm_qt_declare_logging_category
(
kaddressbook_importexport_windowscontact_debugfile_autotest_SRCS HEADER importexportwindowscontactplugin_debug.h IDENTIFIER IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG CATEGORY_NAME org.kde.pim.importexportwindowscontactplugin
DESCRIPTION
"kdepim-addons (Import/Export Windows Contact plugin)"
EXPORT KDEPIMADDONS
)
macro
(
add_windowscontact_unittest _source _additional
)
set
(
_test
${
_source
}
${
_additional
}
${
kaddressbook_importexport_windowscontact_debugfile_autotest_SRCS
}
)
get_filename_component
(
_name
${
_source
}
NAME_WE
)
add_executable
(
${
_name
}
${
_test
}
)
add_test
(
NAME
${
_name
}
COMMAND
${
_name
}
)
ecm_mark_as_test
(
${
_name
}
)
target_link_libraries
(
${
_name
}
Qt5::Widgets Qt5::Test KF5::I18n KF5::WidgetsAddons Qt5::Xml
)
endmacro
()
add_windowscontact_unittest
(
importwindowcontacttest.cpp
"../importwindowcontact.cpp"
)
kaddressbook/importexportplugins/windows-contacts/autotests/importwindowcontacttest.cpp
0 → 100644
View file @
04d5e8a5
/*
Copyright (C) 2020 Laurent Montel <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 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "importwindowcontacttest.h"
#include "../importwindowcontact.h"
#include <QTest>
QTEST_MAIN
(
ImportWindowContactTest
)
ImportWindowContactTest
::
ImportWindowContactTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
kaddressbook/importexportplugins/windows-contacts/autotests/importwindowcontacttest.h
0 → 100644
View file @
04d5e8a5
/*
Copyright (C) 2020 Laurent Montel <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 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef IMPORTWINDOWCONTACTTEST_H
#define IMPORTWINDOWCONTACTTEST_H
#include <QObject>
class
ImportWindowContactTest
:
public
QObject
{
Q_OBJECT
public:
explicit
ImportWindowContactTest
(
QObject
*
parent
=
nullptr
);
~
ImportWindowContactTest
()
=
default
;
};
#endif // IMPORTWINDOWCONTACTTEST_H
kaddressbook/importexportplugins/windows-contacts/windowscontactimportexportplugininterface.cpp
View file @
04d5e8a5
...
...
@@ -116,6 +116,7 @@ bool WindowsContactImportExportPluginInterface::canImportFileType(const QUrl &ur
void
WindowsContactImportExportPluginInterface
::
importFile
(
const
QUrl
&
url
)
{
Q_UNUSED
(
url
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment