Commit 7131c4aa authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to displayName() moving to akonadi-calendar

parent 7973a373
Pipeline #173467 passed with stage
in 4 minutes and 37 seconds
......@@ -37,7 +37,7 @@ set(EVENTVIEW_LIB_VERSION ${PIM_VERSION})
set(CALENDARUTILS_LIB_VERSION "5.20.40")
set(AKONADI_LIB_VERSION "5.20.40")
set(QT_REQUIRED_VERSION "5.15.2")
set(AKONADICALENDAR_LIB_VERSION "5.20.42")
set(AKONADICALENDAR_LIB_VERSION "5.20.43")
set(KMIME_LIB_VERSION "5.20.40")
set(LIBKDEPIM_LIB_VERSION "5.20.40")
set(CALENDARSUPPORT_LIB_VERSION "5.20.40")
......
......@@ -8,7 +8,9 @@
#include "agendaview.h"
#include "calendarview_debug.h"
#include "helper.h"
#include <CalendarSupport/Utils>
#include <Akonadi/CalendarUtils>
#include <QSharedPointer>
using namespace EventViews;
......@@ -169,7 +171,7 @@ Akonadi::Item AkonadiViewCalendar::item(const KCalendarCore::Incidence::Ptr &inc
QString AkonadiViewCalendar::displayName(const KCalendarCore::Incidence::Ptr &incidence) const
{
return CalendarSupport::displayName(mCalendar.data(), item(incidence).parentCollection());
return Akonadi::CalendarUtils::displayName(mCalendar.data(), item(incidence).parentCollection());
}
QColor AkonadiViewCalendar::resourceColor(const KCalendarCore::Incidence::Ptr &incidence) const
......
......@@ -414,7 +414,7 @@ void ListViewPrivate::addIncidence(const Akonadi::ETMCalendar::Ptr &calendar, co
// set tooltips
for (int col = 0; col < Dummy_EOF_Column; ++col) {
item->setToolTip(col, IncidenceFormatter::toolTipStr(CalendarSupport::displayName(calendar.data(), aitem.parentCollection()), incidence));
item->setToolTip(col, IncidenceFormatter::toolTipStr(Akonadi::CalendarUtils::displayName(calendar.data(), aitem.parentCollection()), incidence));
}
ListItemVisitor v(item, mStartDate);
......
......@@ -484,7 +484,10 @@ QString IncidenceMonthItem::text(bool end) const
QString IncidenceMonthItem::toolTipText(const QDate &date) const
{
return KCalUtils::IncidenceFormatter::toolTipStr(CalendarSupport::displayName(mCalendar.data(), akonadiItem().parentCollection()), mIncidence, date, true);
return KCalUtils::IncidenceFormatter::toolTipStr(Akonadi::CalendarUtils::displayName(mCalendar.data(), akonadiItem().parentCollection()),
mIncidence,
date,
true);
}
QVector<QPixmap> IncidenceMonthItem::icons() const
......
......@@ -14,11 +14,11 @@
#include "configdialoginterface.h"
#include "prefs.h"
#include <Akonadi/CalendarUtils>
#include <Akonadi/ETMViewStateSaver>
#include <Akonadi/EntityTreeModel>
#include <CalendarSupport/CollectionSelection>
#include <CalendarSupport/Utils>
#include <KCheckableProxyModel>
#include <KLocalizedString>
......@@ -474,7 +474,7 @@ AgendaView *MultiAgendaViewPrivate::createView(const QString &title)
void MultiAgendaViewPrivate::addView(const Akonadi::Collection &collection)
{
AgendaView *av = createView(CalendarSupport::displayName(q->calendar().data(), collection));
AgendaView *av = createView(Akonadi::CalendarUtils::displayName(q->calendar().data(), collection));
av->setCollectionId(collection.id());
}
......
......@@ -12,8 +12,6 @@
#include <KGantt/KGanttGlobal>
#include <CalendarSupport/Utils>
#include <KCalUtils/IncidenceFormatter>
using namespace KCalendarCore;
......@@ -139,7 +137,7 @@ void TimelineSubItem::updateToolTip()
mToolTipNeedsUpdate = false;
setData(IncidenceFormatter::toolTipStr(CalendarSupport::displayName(mCalendar.data(), mIncidence.parentCollection()),
setData(IncidenceFormatter::toolTipStr(Akonadi::CalendarUtils::displayName(mCalendar.data(), mIncidence.parentCollection()),
Akonadi::CalendarUtils::incidence(mIncidence),
originalStart().date(),
true),
......
......@@ -18,10 +18,10 @@
#include <KGantt/KGanttItemDelegate>
#include <KGantt/KGanttStyleOptionGanttItem>
#include <Akonadi/CalendarUtils>
#include <Akonadi/ETMCalendar>
#include <Akonadi/IncidenceChanger>
#include <CalendarSupport/CollectionSelection>
#include <CalendarSupport/Utils>
#include "calendarview_debug.h"
......@@ -310,12 +310,12 @@ void TimelineView::showDates(const QDate &start, const QDate &end, const QDate &
for (const Akonadi::Collection &collection : collections) {
if (collection.contentMimeTypes().contains(Event::eventMimeType())) {
auto item = new TimelineItem(calendar(), index++, static_cast<QStandardItemModel *>(d->mGantt->model()), d->mGantt);
d->mLeftView->addTopLevelItem(new QTreeWidgetItem(QStringList() << CalendarSupport::displayName(calendar().data(), collection)));
d->mLeftView->addTopLevelItem(new QTreeWidgetItem(QStringList() << Akonadi::CalendarUtils::displayName(calendar().data(), collection)));
const QColor resourceColor = EventViews::resourceColor(collection, preferences());
if (resourceColor.isValid()) {
item->setColor(resourceColor);
}
qCDebug(CALENDARVIEW_LOG) << "Created item " << item << " (" << CalendarSupport::displayName(calendar().data(), collection) << ") "
qCDebug(CALENDARVIEW_LOG) << "Created item " << item << " (" << Akonadi::CalendarUtils::displayName(calendar().data(), collection) << ") "
<< "with index " << index - 1 << " from collection " << collection.id();
d->mCalendarItemMap.insert(collection.id(), item);
}
......
......@@ -147,7 +147,7 @@ QVariant TodoModel::data(const QModelIndex &index, int role) const
case DescriptionRole:
return todo->description();
case CalendarRole:
return CalendarSupport::displayName(d->m_calendar.data(), item.parentCollection());
return Akonadi::CalendarUtils::displayName(d->m_calendar.data(), item.parentCollection());
default:
break; // column based model handling
}
......@@ -186,7 +186,7 @@ QVariant TodoModel::data(const QModelIndex &index, int role) const
case DescriptionColumn:
return QVariant(todo->description());
case CalendarColumn:
return QVariant(CalendarSupport::displayName(d->m_calendar.data(), item.parentCollection()));
return QVariant(Akonadi::CalendarUtils::displayName(d->m_calendar.data(), item.parentCollection()));
}
return {};
}
......@@ -212,7 +212,7 @@ QVariant TodoModel::data(const QModelIndex &index, int role) const
case DescriptionColumn:
return QVariant(todo->description());
case CalendarColumn:
return QVariant(CalendarSupport::displayName(d->m_calendar.data(), item.parentCollection()));
return QVariant(Akonadi::CalendarUtils::displayName(d->m_calendar.data(), item.parentCollection()));
}
return {};
}
......@@ -220,8 +220,10 @@ QVariant TodoModel::data(const QModelIndex &index, int role) const
// set the tooltip for every item
if (role == Qt::ToolTipRole) {
if (d->m_preferences->enableToolTips()) {
return QVariant(
KCalUtils::IncidenceFormatter::toolTipStr(CalendarSupport::displayName(d->m_calendar.data(), item.parentCollection()), todo, QDate(), true));
return QVariant(KCalUtils::IncidenceFormatter::toolTipStr(Akonadi::CalendarUtils::displayName(d->m_calendar.data(), item.parentCollection()),
todo,
QDate(),
true));
} else {
return {};
}
......
Supports Markdown
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