Commit efe45a7a authored by Volker Krause's avatar Volker Krause

Adapt to the KCalCore API changes

Also, adapt to the KDELibs4Support removal in many places.
parent 4947d595
......@@ -45,6 +45,7 @@ target_link_libraries(coisceim_widget
KF5::AkonadiContact
KF5::CalendarCore
KF5::MessageViewer KF5::CalendarSupport KF5::AkonadiWidgets
KF5::Parts
)
set_target_properties(coisceim_widget
......
......@@ -28,7 +28,8 @@
#include <KMessageBox>
#include <KLocalizedString>
#include <KConfig>
#include <KSharedConfigPtr>
#include <KConfigGroup>
#include <KSharedConfig>
#include <AkonadiCore/Monitor>
#include <KSharedConfig>
......
......@@ -35,8 +35,6 @@
#include <KMime/Message>
#include "klocale.h"
using namespace Akonadi;
NoteViewer::NoteViewer(QWidget *parent, Qt::WindowFlags f)
......
......@@ -14,6 +14,7 @@ add_library(korg_hebrew MODULE ${korg_hebrew_PART_SRCS})
target_link_libraries(korg_hebrew
KF5::EventViews
KF5::KDELibs4Support
)
install(TARGETS
......
......@@ -30,6 +30,8 @@ target_link_libraries(messageviewer_bodypartformatter_text_calendar
KF5::MessageViewer
KF5::IncidenceEditor
KF5::PimTextEdit
KF5::KIOWidgets
Qt5::DBus
)
install(TARGETS messageviewer_bodypartformatter_text_calendar DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
......@@ -144,9 +144,9 @@ static bool occurredAlready(const Incidence::Ptr &incidence)
return !nextDate.isValid();
} else {
const KDateTime incidenceDate = incidence->dateTime(Incidence::RoleDisplayEnd);
const QDateTime incidenceDate = incidence->dateTime(Incidence::RoleDisplayEnd);
if (incidenceDate.isValid()) {
return incidence->allDay() ? (incidenceDate.date() < today) : (incidenceDate < KDateTime::currentLocalDateTime());
return incidence->allDay() ? (incidenceDate.date() < today) : (incidenceDate < QDateTime::currentDateTime());
}
}
......@@ -729,7 +729,7 @@ public:
bool cancelPastInvites(const Incidence::Ptr incidence, const QString &path) const
{
QString warnStr;
KDateTime now = KDateTime::currentLocalDateTime();
QDateTime now = QDateTime::currentDateTime();
QDate today = now.date();
Incidence::IncidenceType type = Incidence::TypeUnknown;
const bool occurred = occurredAlready(incidence);
......
......@@ -14,6 +14,8 @@ target_link_libraries(messageviewer_bodypartformatter_application_mstnef
KF5::Tnef
KF5::MessageCore
KF5::MessageViewer
KF5::IconThemes
KF5::I18n
)
install(TARGETS messageviewer_bodypartformatter_application_mstnef DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
......@@ -7,7 +7,7 @@ macro(add_messageviewer_header_unittest _source _additional)
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(messageviewer-header-${_name})
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme)
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme KF5::XmlGui KF5::I18n)
endmacro ()
......@@ -18,7 +18,7 @@ macro(add_messageviewer_header_class_unittest _source )
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(messageviewer-header-${_name})
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme)
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme KF5::XmlGui)
endmacro ()
......
......@@ -12,7 +12,7 @@ macro(add_messageviewer_viewerplugin_unittest _source _additional _jsonfile)
ecm_add_test(${_test}
TEST_NAME ${_name}
NAME_PREFIX "messageviewerplugins-"
LINK_LIBRARIES KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme KF5::IncidenceEditor KF5::AkonadiWidgets
LINK_LIBRARIES KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme KF5::IncidenceEditor KF5::AkonadiWidgets KF5::XmlGui
)
endmacro ()
......
......@@ -345,8 +345,8 @@ KCalCore::Event::Ptr EventEdit::createEventItem()
}
KCalCore::Event::Ptr event(new KCalCore::Event);
event->setSummary(mEventEdit->text());
event->setDtStart(KDateTime(mStartDateTimeEdit->dateTime()));
event->setDtEnd(KDateTime(mEndDateTimeEdit->dateTime()));
event->setDtStart(mStartDateTimeEdit->dateTime());
event->setDtEnd(mEndDateTimeEdit->dateTime());
event->addAttachment(attachment);
return event;
}
......
......@@ -28,6 +28,8 @@ target_link_libraries(pimevents
KF5::CalendarCore
KF5::CalendarEvents
KF5::EventViews # for reading KOrganizer calendar colors
KF5::ConfigCore
KF5::KIOCore
)
......@@ -46,6 +48,7 @@ target_link_libraries(pimcalendarsplugin
Qt5::Qml
KF5::AkonadiCore
KF5::CalendarCore
KF5::ConfigCore
)
install(TARGETS pimcalendarsplugin
......
......@@ -17,6 +17,7 @@ macro(add_plasma_pimeventsplugin_test _source _additional)
KF5::CalendarCore
KF5::CalendarEvents
KF5::EventViews
KF5::ConfigCore
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/..
......
......@@ -21,8 +21,6 @@
#include "pimdatasource.h"
#include "pimeventsplugin_debug.h"
#include <KCalCore/Utils>
BaseEventDataVisitor::BaseEventDataVisitor(PimDataSource *dataSource, const QDate &start, const QDate &end)
: mDataSource(dataSource)
, mStart(start)
......@@ -186,8 +184,8 @@ CalendarEvents::EventData EventDataVisitor::incidenceData(const KCalCore::Incide
data.setIsAllDay(incidence->allDay());
data.setIsMinor(false);
data.setUid(generateUid(incidence));
data.setStartDateTime(incidence->dtStart().toLocalZone().dateTime());
data.setEndDateTime(incidence->dateTime(KCalCore::Incidence::RoleEnd).toLocalZone().dateTime());
data.setStartDateTime(incidence->dtStart().toLocalTime());
data.setEndDateTime(incidence->dateTime(KCalCore::Incidence::RoleEnd).toLocalTime());
data.setEventColor(mDataSource->calendarColorForIncidence(incidence));
return data;
}
......
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