diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -set(PIM_VERSION "5.14.40") +set(PIM_VERSION "5.14.41") project(Akonadi-Calendar VERSION ${PIM_VERSION}) # ECM setup diff --git a/src/incidencechanger.h b/src/incidencechanger.h --- a/src/incidencechanger.h +++ b/src/incidencechanger.h @@ -31,6 +31,7 @@ #include namespace Akonadi { +class EntityTreeModel; /** * @short IncidenceChanger is the preferred way to easily create, modify and delete incidences. * @@ -241,6 +242,17 @@ */ void endAtomicOperation(); + /** + * Sets the base ETM tree model + * Used by the editor dialog's collection combobox, for instance. + */ + void setEntityTreeModel(Akonadi::EntityTreeModel *model); + + /** + * Returns the base ETM tree model + */ + Akonadi::EntityTreeModel *entityTreeModel() const; + /** * Sets the default collection. * @param collection The collection to be used in createIncidence() if the diff --git a/src/incidencechanger.cpp b/src/incidencechanger.cpp --- a/src/incidencechanger.cpp +++ b/src/incidencechanger.cpp @@ -1128,6 +1128,16 @@ return d->mDestinationPolicy; } +void IncidenceChanger::setEntityTreeModel(Akonadi::EntityTreeModel *entityTreeModel) +{ + d->mEntityTreeModel = entityTreeModel; +} + +Akonadi::EntityTreeModel *IncidenceChanger::entityTreeModel() const +{ + return d->mEntityTreeModel; +} + void IncidenceChanger::setDefaultCollection(const Akonadi::Collection &collection) { d->mDefaultCollection = collection; diff --git a/src/incidencechanger_p.h b/src/incidencechanger_p.h --- a/src/incidencechanger_p.h +++ b/src/incidencechanger_p.h @@ -314,6 +314,7 @@ QHash mChangeForJob; bool mShowDialogsOnError = false; Akonadi::Collection mDefaultCollection; + Akonadi::EntityTreeModel *mEntityTreeModel = nullptr; DestinationPolicy mDestinationPolicy; QVector mDeletedItemIds; Change::List mPendingCreations; // Creations waiting for collections to be loaded