Commit f3efb958 authored by Sandro Knauß's avatar Sandro Knauß
Browse files

Remove parts of MimeTreeParser add add it as dependency.

parent 74f19995
......@@ -37,37 +37,6 @@ install(FILES
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
# Disabled libotp for 16.04, because it is not ready for release yet.
# ecm_setup_version(${MESSAGELIB_LIB_VERSION} VARIABLE_PREFIX MESSAGEVIEWER
# VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/otp_version.h"
# PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5OtpConfigVersion.cmake"
# SOVERSION 5
# )
#
# set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Otp")
#
# ecm_configure_package_config_file(
# "${CMAKE_CURRENT_SOURCE_DIR}/KF5OtpConfig.cmake.in"
# "${CMAKE_CURRENT_BINARY_DIR}/KF5OtpConfig.cmake"
# INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
# )
#
# install(FILES
# "${CMAKE_CURRENT_BINARY_DIR}/KF5OtpConfig.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/KF5OtpConfigVersion.cmake"
# DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
# COMPONENT Devel
# )
#
# install(EXPORT KF5OtpTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5OtpTargets.cmake NAMESPACE KF5::)
#
# install(FILES
# ${CMAKE_CURRENT_BINARY_DIR}/otp_version.h
# DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
# )
add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -2,6 +2,7 @@
find_dependency(KF5PimCommon "@PIMCOMMON_LIB_VERSION@")
find_dependency(KF5MessageCore "@MESSAGELIB_LIB_VERSION@")
find_dependency(KF5MimeTreeParser "@MESSAGELIB_LIB_VERSION@")
find_dependency(KF5Akonadi "@KDEPIMLIBS_LIB_VERSION@")
find_dependency(KF5Mime "@KMIME_LIB_VERSION@")
find_dependency(KF5Contacts "@KCONTACTS_LIB_VERSION@")
......
......@@ -8,7 +8,7 @@ add_definitions(-DKMAIL_UNITTESTS=YES)
# convenience macro to add qtest unit tests
macro(add_messageviewer_unittest _source)
get_filename_component(_name ${_source} NAME_WE)
ecm_add_test(${_source} util.cpp setupenv.cpp testcsshelper.cpp ../src/viewer/cryptohelper.cpp
ecm_add_test(${_source} util.cpp setupenv.cpp testcsshelper.cpp
TEST_NAME ${_name}
NAME_PREFIX "messageviewer-"
LINK_LIBRARIES KF5::MessageViewer KF5::Libkleo KF5::QGpgme Qt5::Test Qt5::WebKitWidgets KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore
......@@ -24,34 +24,7 @@ macro(add_messageviewer_class_unittest _source _additionalSource)
)
endmacro ()
macro(add_messageviewer_crypto_unittest _source)
set(_test ${_source} util.cpp)
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} setupenv.cpp testcsshelper.cpp )
ecm_mark_as_test(messageviewer-${_name})
target_link_libraries( ${_name}
KF5::MessageViewer
KF5::Libkleo
KF5::QGpgme
Qt5::Test
Qt5::WebKitWidgets
KF5::KIOCore
KF5::Mime
KF5::AkonadiCore
KF5::AkonadiNotes
KF5::CalendarCore
)
add_gpg_crypto_test(${_name} messageviewer-${_name})
endmacro ()
add_messageviewer_crypto_unittest( objecttreeparsertest.cpp )
add_messageviewer_crypto_unittest( rendertest.cpp )
add_messageviewer_crypto_unittest( unencryptedmessagetest.cpp )
add_messageviewer_crypto_unittest( attachmenttest.cpp )
add_messageviewer_unittest( csshelpertest.cpp )
add_messageviewer_unittest( cryptohelpertest.cpp )
add_messageviewer_unittest( messagedisplayformatattributetest.cpp )
add_messageviewer_unittest( nodehelpertest.cpp )
add_messageviewer_class_unittest(zoomactionmenutest.cpp "../src/widgets/zoomactionmenu.cpp")
# convenience macro to add qtest unit tests
......@@ -69,12 +42,6 @@ endmacro ()
add_messageviewer_mailsourceviewbrowserwidget_unittest( mailsourceviewtextbrowserwidgettest.cpp )
########### viewertest_gui ###############
ecm_add_test(converthtmltoplaintexttest.cpp ../src/viewer/converthtmltoplaintext.cpp
TEST_NAME converthtmltoplaintexttest
NAME_PREFIX "messageviewer-"
LINK_LIBRARIES Qt5::Test Grantlee5::TextDocument
)
set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
......
......@@ -140,34 +140,20 @@ set(libmessageviewer_otp_extra_SRCS
)
set(libmessageviewer_viewer_SRCS
viewer/attachmentstrategy.cpp
viewer/bodypartformatter.cpp
viewer/bodypartformatterbasefactory.cpp
viewer/bodypartformatterfactory.cpp
viewer/bodypartformatterfactorysingleton.cpp
viewer/cryptohelper.cpp
viewer/csshelper.cpp
viewer/csshelperbase.cpp
viewer/editorwatcher.cpp
viewer/mimeparttree/mimetreemodel.cpp
viewer/nodehelper.cpp
viewer/objecttreeemptysource.cpp
viewer/objecttreeparser.cpp
viewer/objecttreeviewersource.cpp
viewer/messagepart.cpp
viewer/partnodebodypart.cpp
viewer/pluginloaderbase.cpp
viewer/viewer.cpp
viewer/viewer_p.cpp
viewer//webview/webviewaccesskey.cpp
viewer/webview/webviewaccesskey.cpp
viewer/messagedisplayformatattribute.cpp
viewer/urlhandlermanager.cpp
viewer/mimeparttree/mimeparttreeview.cpp
viewer/converthtmltoplaintext.cpp
viewer/memento/cryptobodypartmemento.cpp
viewer/memento/decryptverifybodypartmemento.cpp
viewer/memento/verifydetachedbodypartmemento.cpp
viewer/memento/verifyopaquebodypartmemento.cpp
viewer/mimeparttree/mimetreemodel.cpp
)
set(libmessageviewer_widgets_SRCS
......@@ -229,10 +215,8 @@ set(libmessageviewer_findbar_SRCS
)
set(libmessageviewer_utils_SRCS
utils/iconnamecache.cpp
utils/markmessagereadhandler.cpp
utils/messageviewerutil.cpp
utils/mimetype.cpp
)
if (QTWEBENGINE_EXPERIMENTAL_OPTION)
......@@ -243,8 +227,6 @@ endif()
set(libmessageviewer_htmlwriter_SRCS
htmlwriter/filehtmlwriter.cpp
htmlwriter/queuehtmlwriter.cpp
htmlwriter/teehtmlwriter.cpp
htmlwriter/webkitparthtmlwriter.cpp
${libmessageviewer_htmlwriter_webengine_SRCS}
......@@ -261,7 +243,6 @@ set(libmessageviewer_job_SRCS
job/createnotejob.cpp
job/attachmenteditjob.cpp
job/modifymessagedisplayformatjob.cpp
job/kleojobexecutor.cpp
)
set(libmessageviewer_viewerplugins_SRCS
......@@ -286,7 +267,6 @@ set(libmessageviewer_SRCS
${libmessageviewer_job_SRCS}
${libmessageviewer_viewerplugins_SRCS}
settings/messageviewersettings.cpp
interfaces/bodypartformatter.cpp
${_mailwebview_cpp}
${libmessageviewer_mailviewer_SRCS}
)
......@@ -321,6 +301,7 @@ target_link_libraries(KF5MessageViewer
KF5::AkonadiMime
KF5::Contacts
KF5::Libkleo
KF5::MimeTreeParser
PRIVATE
KF5::ItemViews
${libmessageviewer_web_LIB}
......@@ -424,31 +405,15 @@ ecm_generate_headers(MessageViewer_Camelcaseviewer_HEADERS
HEADER_NAMES
Viewer
CSSHelper
PartMetaData
ObjectTreeParser
ObjectTreeEmptySource
AttachmentStrategy
NodeHelper
EditorWatcher
Stl_Util
CSSHelperBase
MessagePart
Enums
BodyPartFormatterBaseFactory
BodyPartFormatterFactory
REQUIRED_HEADERS MessageViewer_viewer_HEADERS
PREFIX MessageViewer
RELATIVE viewer
)
ecm_generate_headers(MessageViewer_Camelcasemain_HEADERS
HEADER_NAMES
ObjectTreeSourceIf
REQUIRED_HEADERS MessageViewer_main_HEADERS
PREFIX MessageViewer
)
ecm_generate_headers(MessageViewer_Camelcasewidgets_HEADERS
HEADER_NAMES
InvitationSettings
......@@ -464,8 +429,6 @@ ecm_generate_headers(MessageViewer_Camelcaseutils_HEADERS
HEADER_NAMES
MessageViewerUtil
MarkMessageReadHandler
IconNameCache
MimeType
REQUIRED_HEADERS MessageViewer_utils_HEADERS
PREFIX MessageViewer
RELATIVE utils
......@@ -500,10 +463,7 @@ ecm_generate_headers(MessageViewer_Camelcaseantispam_HEADERS
ecm_generate_headers(MessageViewer_Camelcaseinterfaces_HEADERS
HEADER_NAMES
BodyPartFormatter
BodyPart
BodyPartURLHandler
HtmlWriter
URLHandler
REQUIRED_HEADERS MessageViewer_interfaces_HEADERS
PREFIX MessageViewer
......@@ -541,7 +501,6 @@ ecm_generate_headers(MessageViewer_Camelcaseheader_HEADERS
ecm_generate_headers(MessageViewer_Camelcasehtmlwriter_HEADERS
HEADER_NAMES
WebKitPartHtmlWriter
FileHtmlWriter
REQUIRED_HEADERS MessageViewer_htmlwriter_HEADERS
PREFIX MessageViewer
RELATIVE htmlwriter
......@@ -589,7 +548,7 @@ ecm_generate_headers(MessageViewer_Camelcaseviewerjob_HEADERS
ecm_generate_pri_file(BASE_NAME MessageViewer
LIB_NAME KF5MessageViewer
DEPS "PimCommon MessageCore AkonadiCore AkonadiMime Contacts Libkleo" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer
DEPS "PimCommon MessageCore AkonadiCore AkonadiMime Contacts Libkleo MimeTreeParser" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer
)
......@@ -609,7 +568,6 @@ install(FILES
${MessageViewer_Camelcaseinterfaces_HEADERS}
${MessageViewer_Camelcaseviewer_HEADERS}
${MessageViewer_Camelcasewidgets_HEADERS}
${MessageViewer_Camelcasemain_HEADERS}
${MessageViewer_Camelcaseviewerjob_HEADERS}
${MessageViewer_Camelcaseantispam_HEADERS}
${MessageViewer_Camelfindbar_HEADERS}
......@@ -637,7 +595,6 @@ install(FILES
${MessageViewer_interfaces_HEADERS}
${MessageViewer_HEADERS}
${MessageViewer_viewer_HEADERS}
${MessageViewer_main_HEADERS}
${MessageViewer_widgets_HEADERS}
${MessageViewer_viewerjob_HEADERS}
${MessageViewer_antispam_HEADERS}
......@@ -659,42 +616,3 @@ install(FILES header/data/messageviewer_header_themes.knsrc DESTINATION ${KDE_IN
install(FILES notify/messageviewer.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
install(FILES scamdetection/data/longurlServices.json DESTINATION ${KDE_INSTALL_DATADIR}/messageviewer )
# Disabled libotp for 16.04, because it is not ready for release yet.
# Project(Otp)
#
# set(libotp_SRCS
# ${libmessageviewer_otp_SRCS}
# ${libmessageviewer_otp_extra_SRCS}
# )
# ecm_qt_declare_logging_category(libotp_SRCS HEADER messageviewer_debug.h IDENTIFIER MESSAGEVIEWER_LOG CATEGORY_NAME log_messageviewer)
#
# add_library(KF5Otp
# ${libotp_SRCS}
# )
# generate_export_header(KF5Otp BASE_NAME otp)
# add_library(KF5::Otp ALIAS KF5Otp)
#
# target_link_libraries(KF5Otp
# PUBLIC
# KF5::MessageCore #NodeHelper, StringUtils, Settings
# KF5::PimCommon #AttachmentTemporaryFile handling
# KF5::Libkleo
# PRIVATE
# KF5::Mime
# KF5::IconThemes
# ${libmessageviewer_web_LIB}
# Grantlee5::TextDocument
# )
#
# install(TARGETS
# KF5Otp
# EXPORT KF5OtpTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
# )
#
# set_target_properties(KF5Otp PROPERTIES
# VERSION ${MESSAGEVIEWER_VERSION_STRING}
# SOVERSION ${MESSAGEVIEWER_SOVERSION}
# EXPORT_NAME Otp
# )
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