Commit bdffb9e2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use KCursorSaver (from guiaddons) when possible

parent 604f4b89
Pipeline #28098 failed with stage
in 39 minutes and 32 seconds
......@@ -63,6 +63,7 @@ find_package(KF5IconThemes ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Parts ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Prison ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Holidays ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5GuiAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(MAILCOMMON_LIB_VERSION "5.15.41")
set(GRAVATAR_LIB_VERSION "5.14.80")
......
......@@ -8,7 +8,7 @@ set(kmail_antispamplugin_SRCS
kcoreaddons_add_plugin(kmail_antispamplugin JSON kmail_antispamplugin.json SOURCES
${kmail_antispamplugin_SRCS} INSTALL_NAMESPACE kmail/mainview)
target_link_libraries(kmail_antispamplugin
KF5::PimCommonAkonadi KF5::Completion KF5::MailCommon KF5::XmlGui KF5::Libkdepim KF5::I18n
KF5::PimCommonAkonadi KF5::Completion KF5::MailCommon KF5::XmlGui KF5::Libkdepim KF5::I18n KF5::GuiAddons
)
......
......@@ -5,7 +5,7 @@ macro(add_kmail_antispamplugin_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_antispamplugin-${_name})
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::AkonadiWidgets KF5::MailCommon KF5::Libkdepim KF5::I18n)
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::AkonadiWidgets KF5::MailCommon KF5::Libkdepim KF5::I18n KF5::GuiAddons)
endmacro ()
add_kmail_antispamplugin_unittest(antispamplugininterfacetest.cpp "../antispamplugininterface.cpp;../../common/antispamwizard.cpp")
......@@ -9,7 +9,7 @@ kcoreaddons_add_plugin(kmail_antivirusplugin JSON kmail_antivirusplugin.json SOU
${kmail_antivirusplugin_SRCS} INSTALL_NAMESPACE kmail/mainview)
target_link_libraries(kmail_antivirusplugin
KF5::PimCommonAkonadi KF5::Completion KF5::MailCommon KF5::AkonadiWidgets KF5::XmlGui KF5::Libkdepim KF5::I18n
KF5::PimCommonAkonadi KF5::Completion KF5::MailCommon KF5::AkonadiWidgets KF5::XmlGui KF5::Libkdepim KF5::I18n KF5::GuiAddons
)
if(BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -5,7 +5,7 @@ macro(add_kmail_antivirusplugin_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(kmail_antivirusplugin-${_name})
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::AkonadiWidgets KF5::MailCommon KF5::Libkdepim KF5::I18n)
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::AkonadiWidgets KF5::MailCommon KF5::Libkdepim KF5::I18n KF5::GuiAddons)
endmacro ()
add_kmail_antivirusplugin_unittest(antivirusplugininterfacetest.cpp "../antivirusplugininterface.cpp;../../common/antispamwizard.cpp")
......@@ -28,9 +28,14 @@
*/
#include "antispamwizard.h"
#include <kguiaddons_version.h>
#if KGUIADDONS_VERSION < QT_VERSION_CHECK(5, 73, 0)
#ifndef QT_NO_CURSOR
#include <Libkdepim/KCursorSaver>
#endif
#else
#include <KCursorSaver>
#endif
#include <MailCommon/FolderRequester>
#include <MailCommon/FolderTreeWidget>
#include <MailCommon/FolderTreeView>
......@@ -64,6 +69,8 @@
#include <QPushButton>
#include <KConfigGroup>
#include <QVector>
#include <QEventLoop>
#include <QApplication>
#include <MailCommon/ResourceReadConfigFile>
using namespace KMail;
using namespace MailCommon;
......@@ -511,8 +518,12 @@ void AntiSpamWizard::checkVirusRulesSelections()
void AntiSpamWizard::checkToolAvailability()
{
// this can take some time to find the tools
#if KGUIADDONS_VERSION < QT_VERSION_CHECK(5, 73, 0)
#ifndef QT_NO_CURSOR
KPIM::KCursorSaver busy(KPIM::KBusyPtr::busy());
const KPIM::KCursorSaver busy(KPIM::KBusyPtr::busy());
#endif
#else
KCursorSaver saver(Qt::WaitCursor);
#endif
bool found = false;
QVector<SpamToolConfig>::ConstIterator end(mToolList.constEnd());
......
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