Commit 9caf5ef7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated method

parent 387938df
Pipeline #41227 canceled with stage
in 16 minutes and 30 seconds
......@@ -104,7 +104,7 @@ set_package_properties(KF5AkonadiSearch PROPERTIES DESCRIPTION "The Akonadi Sear
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054C00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054D00)
if(BUILD_TESTING)
add_definitions(-DBUILD_TESTING)
endif()
......
......@@ -9,6 +9,7 @@
*/
#include "attachmentcontrollerbase.h"
#include <kwidgetsaddons_version.h>
#include <MessageComposer/AttachmentModel>
#include "MessageComposer/AttachmentJob"
......@@ -463,8 +464,12 @@ void AttachmentControllerBase::createActions()
d->attachmentMenu = new KActionMenu(QIcon::fromTheme(QStringLiteral("mail-attachment")), i18n("Attach"), this);
connect(d->attachmentMenu, &QAction::triggered, this, &AttachmentControllerBase::showAddAttachmentFileDialog);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
d->attachmentMenu->setPopupMode(QToolButton::DelayedPopup);
#else
d->attachmentMenu->setDelayed(true);
#endif
d->addAttachmentFileAction = new QAction(QIcon::fromTheme(QStringLiteral("mail-attachment")), i18n("&Attach File..."), this);
d->addAttachmentFileAction->setIconText(i18n("Attach"));
......
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