Commit 64b824ff authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated method

parent 863ea8c1
Pipeline #41228 canceled with stage
in 6 minutes and 21 seconds
......@@ -125,7 +125,7 @@ add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054C00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054D00)
add_subdirectory(src)
......
......@@ -8,6 +8,8 @@
#include "newalarmaction.h"
#include <kwidgetsaddons_version.h>
#include "functions.h"
#include "templatemenuaction.h"
#include "resources/datamodel.h"
......@@ -73,7 +75,11 @@ NewAlarmAction::NewAlarmAction(bool templates, const QString& label, QObject* pa
connect(DataModel::allTemplateListModel(), &EventListModel::haveEventsStatus, this, &NewAlarmAction::slotCalendarStatusChanged);
slotCalendarStatusChanged(); // initialise action states
}
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
setPopupMode(QToolButton::InstantPopup);
#else
setDelayed(false);
#endif
connect(menu(), &QMenu::aboutToShow, this, &NewAlarmAction::slotInitMenu);
connect(menu(), &QMenu::triggered, this, &NewAlarmAction::slotSelected);
}
......
......@@ -12,6 +12,7 @@
#include "resourcescalendar.h"
#include "kalarm_debug.h"
#include <kwidgetsaddons_version.h>
#include <KAlarmCal/KAEvent>
#include <QMenu>
......@@ -20,7 +21,11 @@
TemplateMenuAction::TemplateMenuAction(const QIcon& icon, const QString& label, QObject* parent)
: KActionMenu(icon, label, parent)
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
setPopupMode(QToolButton::InstantPopup);
#else
setDelayed(false);
#endif
connect(menu(), &QMenu::aboutToShow, this, &TemplateMenuAction::slotInitMenu);
connect(menu(), &QMenu::triggered, this, &TemplateMenuAction::slotSelected);
}
......
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