Commit 961d1d54 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile against last qt5.15 without deprecated method. Constructor

is deprecated
parent 720004ab
......@@ -854,18 +854,18 @@ void CalendarView::edit_paste()
endDT = agendaView->selectionEnd();
useEndTime = !agendaView->selectedIsSingleCell();
if (agendaView->selectedIsAllDay()) {
finalDateTime = QDateTime(date);
finalDateTime = QDateTime(date.startOfDay());
} else {
finalDateTime = QDateTime(date, agendaView->selectionStart().time());
}
} else if (curView == monthView && monthView->selectionStart().isValid()) {
finalDateTime = QDateTime(monthView->selectionStart().date());
finalDateTime = QDateTime(monthView->selectionStart().date().startOfDay());
pasteFlags = KCalUtils::DndFactory::FlagPasteAtOriginalTime;
} else if (!mDateNavigator->selectedDates().isEmpty() && curView->supportsDateNavigation()) {
// default to the selected date from the navigator
const KCalendarCore::DateList dates = mDateNavigator->selectedDates();
if (!dates.isEmpty()) {
finalDateTime = QDateTime(dates.first());
finalDateTime = QDateTime(dates.first().startOfDay());
pasteFlags = KCalUtils::DndFactory::FlagPasteAtOriginalTime;
}
}
......@@ -1141,7 +1141,7 @@ void CalendarView::newJournal(const QString &text, const QDate &date)
= IncidenceEditorNG::IncidenceDefaults::minimalIncidenceDefaults();
KCalendarCore::Journal::Ptr journal(new KCalendarCore::Journal);
defaults.setStartDateTime(QDateTime(date));
defaults.setStartDateTime(QDateTime(date.startOfDay()));
defaults.setDefaults(journal);
journal->setSummary(text);
......
......@@ -119,7 +119,7 @@ SummaryEventInfo::List SummaryEventInfo::eventsForRange(const QDate &start, cons
|| (start >= eventStart.date() && end <= eventEnd.date())) {
events << event;
if (eventStart.date() < start) {
sDateTimeByUid()->insert(event->instanceIdentifier(), QDateTime(start));
sDateTimeByUid()->insert(event->instanceIdentifier(), QDateTime(start.startOfDay()));
} else {
sDateTimeByUid()->insert(event->instanceIdentifier(), eventStart);
}
......
......@@ -266,7 +266,7 @@ void KOViewManager::updateView()
void KOViewManager::updateView(const QDate &start, const QDate &end, const QDate &preferredMonth)
{
if (mCurrentView && mCurrentView != mTodoView) {
mCurrentView->setDateRange(QDateTime(start), QDateTime(end), preferredMonth);
mCurrentView->setDateRange(QDateTime(start.startOfDay()), QDateTime(end.startOfDay()), preferredMonth);
} else if (mTodoView) {
mTodoView->updateView();
}
......
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