Commit 1cae64be authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: increase to qt5.15, cmake 3.16.0, use Qt:: vs Qt5:: for helping to port to qt6

parent 90a7b698
Pipeline #56861 skipped
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(PIM_VERSION "5.17.40")
project(kdepim-addons VERSION ${PIM_VERSION})
......@@ -25,7 +25,7 @@ set(KDEPIMADDONS_VERSION "${KDEPIMADDONS_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
set(KDEPIMADDONS_LIB_VERSION "${KDEPIMADDONS_VERSION_NUMBER}")
set(KDEPIMADDONS_LIB_SOVERSION "5")
set(QT_REQUIRED_VERSION "5.14.0")
set(QT_REQUIRED_VERSION "5.15.0")
include(ECMInstallIcons)
......@@ -146,7 +146,7 @@ endif()
find_package(Gpgmepp 1.13.1 CONFIG)
set_package_properties(Gpgmepp PROPERTIES DESCRIPTION "GpgME library" URL "https://www.gnupg.org" TYPE REQUIRED)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055100)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055200)
option(KDEPIM_RUN_AKONADI_TEST "Enable autotest based on Akonadi." TRUE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
......@@ -169,16 +169,14 @@ if(discount_FOUND)
endif()
endif()
option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" FALSE)
option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF)
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT false)
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT OFF)
if (USE_UNITY_CMAKE_SUPPORT)
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
message(STATUS "CMAKE version is less than 3.16.0 . We can't use cmake unify build support")
else()
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT true)
endif()
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT ON)
add_definitions(-DCOMPILE_WITH_UNITY_CMAKE_SUPPORT)
endif()
add_subdirectory(plugins)
add_subdirectory(korganizer)
add_subdirectory(kmail)
......
......@@ -10,7 +10,7 @@ macro(add_windowscontact_unittest _source _additional)
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 KF5::Contacts)
target_link_libraries( ${_name} Qt::Widgets Qt5::Test KF5::I18n KF5::WidgetsAddons Qt5::Xml KF5::Contacts)
endmacro ()
if (NOT WIN32)
add_windowscontact_unittest(importwindowcontacttest.cpp "../importwindowcontact.cpp")
......
......@@ -6,7 +6,7 @@ set(gravatarupdatedialog_gui_SRCS ${kaddressbook_checkgravatarplugin_test_SRCS}
add_executable(gravatarupdatedialog_gui ${gravatarupdatedialog_gui_SRCS})
ecm_mark_as_test(gravatarupdatedialog_gui)
target_link_libraries(gravatarupdatedialog_gui
Qt5::Gui
Qt::Gui
KF5::PimCommon
KF5::Gravatar
KF5::I18n
......
......@@ -34,7 +34,7 @@ endif()
target_link_libraries(kaddressbookmergelibprivate
PRIVATE
Qt5::Network
Qt::Network
KF5::I18n
KF5::Contacts
KF5::AkonadiContact
......
......@@ -13,7 +13,7 @@ macro( kaddressbook_merge _source _additional _additionallib)
add_executable( ${_name} ${_test} )
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kaddressbookmerge-${_name})
target_link_libraries( ${_name} kaddressbookmergelibprivate Qt5::Test KF5::AkonadiCore KF5::Contacts ${_additionallib})
target_link_libraries( ${_name} kaddressbookmergelibprivate Qt::Test KF5::AkonadiCore KF5::Contacts ${_additionallib})
endmacro()
kaddressbook_merge(mergecontactstest.cpp "../job/mergecontacts.cpp;../kaddressbookmergelibprivate_debug.cpp" "")
......@@ -44,5 +44,5 @@ set( kaddressbook_merge_mergecontactloseinformationwarning_source mergecontactlo
add_executable( mergecontactloseinformationwarningtest ${kaddressbook_merge_mergecontactloseinformationwarning_source})
add_test(NAME mergecontactloseinformationwarningtest COMMAND mergecontactloseinformationwarningtest)
ecm_mark_as_test(mergecontactloseinformationwarningtest)
target_link_libraries( mergecontactloseinformationwarningtest Qt5::Test Qt5::Gui kaddressbookmergelibprivate KF5::WidgetsAddons KF5::I18n)
target_link_libraries( mergecontactloseinformationwarningtest Qt::Test Qt5::Gui kaddressbookmergelibprivate KF5::WidgetsAddons KF5::I18n)
......@@ -1135,11 +1135,7 @@ void MergeContactsTest::checkNeedManualSelectionWithBirthday()
Addressee addressA;
Akonadi::Item itemA;
QDate date = QDate::fromString(nameItemA, QStringLiteral("yyyyMMdd"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QDateTime dt(date);
#else
QDateTime dt(date.startOfDay());
#endif
addressA.setBirthday(dt);
itemA.setPayload<Addressee>(addressA);
lst << itemA;
......@@ -1147,11 +1143,7 @@ void MergeContactsTest::checkNeedManualSelectionWithBirthday()
Addressee addressB;
Akonadi::Item itemB;
date = QDate::fromString(nameItemB, QStringLiteral("yyyyMMdd"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
dt = QDateTime(date);
#else
dt = QDateTime(date.startOfDay());
#endif
addressB.setBirthday(dt);
itemB.setPayload<Addressee>(addressB);
......@@ -1160,11 +1152,7 @@ void MergeContactsTest::checkNeedManualSelectionWithBirthday()
Addressee addressC;
Akonadi::Item itemC;
date = QDate::fromString(nameItemC, QStringLiteral("yyyyMMdd"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
dt = QDateTime(date);
#else
dt = QDateTime(date.startOfDay());
#endif
addressC.setBirthday(dt);
itemC.setPayload<Addressee>(addressC);
lst << itemC;
......
......@@ -9,7 +9,7 @@ macro(add_kmail_converttext_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_converttext-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::MessageComposer KF5::I18n Qt5::WebEngineWidgets discount::Lib KF5::SyntaxHighlighting kmailmarkdown)
target_link_libraries( ${_name} Qt::Test KF5::XmlGui KF5::MessageComposer KF5::I18n Qt5::WebEngineWidgets discount::Lib KF5::SyntaxHighlighting kmailmarkdown)
endmacro ()
add_kmail_converttext_unittest(markdowninterfacetest.cpp "../plugin/markdowninterface.cpp")
......
......@@ -23,7 +23,7 @@ generate_export_header(kmailmarkdown BASE_NAME libkmailmarkdown)
target_link_libraries(kmailmarkdown
KF5::MessageComposer
KF5::I18n
Qt5::WebEngineWidgets
Qt::WebEngineWidgets
discount::Lib
KF5::SyntaxHighlighting
)
......
set(markdown_gui_SRCS main.cpp markdowndemowidget.cpp markdown_gui.qrc)
add_executable(markdown_gui ${markdown_gui_SRCS})
target_link_libraries(markdown_gui
KF5::MessageComposer KF5::I18n KF5::XmlGui Qt5::WebEngineWidgets discount::Lib KF5::SyntaxHighlighting kmailmarkdown
KF5::MessageComposer KF5::I18n KF5::XmlGui Qt::WebEngineWidgets discount::Lib KF5::SyntaxHighlighting kmailmarkdown
)
......@@ -5,7 +5,7 @@ macro(add_kmail_externalcomposer_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_editorinitplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::KIOWidgets)
target_link_libraries( ${_name} Qt::Test KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::KIOWidgets)
endmacro ()
add_kmail_externalcomposer_unittest(externalcomposerconfigurewidgettest.cpp "../externalcomposerconfigurewidget.cpp")
......
......@@ -5,7 +5,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::MessageComposer KF5::I18n)
target_link_libraries( ${_name} Qt::Test KF5::XmlGui KF5::MessageComposer KF5::I18n)
endmacro ()
add_kmail_editorplugin_unittest(autocorrectionplugineditortest.cpp "../autocorrectionplugineditor.cpp;../autocorrectionplugineditorinterface.cpp")
......
......@@ -8,7 +8,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::MessageComposer KF5::I18n)
target_link_libraries( ${_name} Qt::Test KF5::XmlGui KF5::MessageComposer KF5::I18n)
endmacro ()
add_kmail_editorplugin_unittest(changecaseplugineditortest.cpp "../changecaseplugineditor.cpp;../changecaseplugineditorinterface.cpp")
......
......@@ -5,7 +5,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::MessageComposer KF5::I18n KF5::AkonadiContact)
target_link_libraries( ${_name} Qt::Test KF5::XmlGui KF5::MessageComposer KF5::I18n KF5::AkonadiContact)
endmacro ()
add_kmail_editorplugin_unittest(insertemailplugineditortest.cpp
......
......@@ -13,7 +13,7 @@ endif()
target_link_libraries(shorturlpluginprivate
PRIVATE
Qt5::Network KF5::I18n KF5::CoreAddons Qt5::Gui
Qt::Network KF5::I18n KF5::CoreAddons Qt5::Gui
)
set_target_properties(shorturlpluginprivate
......
......@@ -8,7 +8,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::MessageComposer KF5::I18n shorturlpluginprivate)
target_link_libraries( ${_name} Qt::Test KF5::XmlGui KF5::MessageComposer KF5::I18n shorturlpluginprivate)
endmacro ()
......
......@@ -12,6 +12,6 @@ kcoreaddons_add_plugin(pimcommon_isgdshorturlengineplugin JSON pimcommon_isgdsho
${pimcommon_isgdshorturlengineplugin_SRCS} INSTALL_NAMESPACE pimcommon/shorturlengine)
target_link_libraries(pimcommon_isgdshorturlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
KF5::Service KF5::I18n Qt::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
......@@ -35,11 +35,7 @@ void IsgdShortUrlEngineInterface::generateShortUrl()
request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json"));
QNetworkReply *reply = mNetworkAccessManager->get(request);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, &IsgdShortUrlEngineInterface::slotErrorFound);
#else
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &IsgdShortUrlEngineInterface::slotErrorFound);
#endif
}
void IsgdShortUrlEngineInterface::slotSslErrors(QNetworkReply *reply, const QList<QSslError> &error)
......
......@@ -8,6 +8,6 @@ kcoreaddons_add_plugin(pimcommon_tinyurlengineplugin JSON pimcommon_tinyurlengin
target_link_libraries(pimcommon_tinyurlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
KF5::Service KF5::I18n Qt::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
......@@ -29,11 +29,7 @@ void TinyUrlEngineInterface::generateShortUrl()
{
const QString requestUrl = QStringLiteral("https://tinyurl.com/api-create.php?url=%1").arg(mOriginalUrl);
QNetworkReply *reply = mNetworkAccessManager->get(QNetworkRequest(QUrl(requestUrl)));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, &TinyUrlEngineInterface::slotErrorFound);
#else
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &TinyUrlEngineInterface::slotErrorFound);
#endif
}
void TinyUrlEngineInterface::slotShortUrlFinished(QNetworkReply *reply)
......
......@@ -7,6 +7,6 @@ kcoreaddons_add_plugin(pimcommon_triopabshorturlengineplugin JSON pimcommon_trio
${pimcommon_triopabshorturlengineplugin_SRCS} INSTALL_NAMESPACE pimcommon/shorturlengine)
target_link_libraries(pimcommon_triopabshorturlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
KF5::Service KF5::I18n Qt::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
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