Verified Commit 6952bb44 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

ETMViewStateSaver: allow changing the current item as well

parent 2eeee1c6
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.14.43")
set(PIM_VERSION "5.14.44")
project(Akonadi VERSION ${PIM_VERSION})
set(CMAKE_CXX_STANDARD 17)
......
......@@ -114,3 +114,13 @@ void ETMViewStateSaver::selectItems(const QList< Item::Id > &list)
}
restoreSelection(itemStrings);
}
void ETMViewStateSaver::setCurrentItem(const Akonadi::Item &item)
{
restoreCurrentItem(QStringLiteral("i%1").arg(item.id()));
}
void ETMViewStateSaver::setCurrentCollection(const Akonadi::Collection &col)
{
restoreCurrentItem(QStringLiteral("c%1").arg(col.id()));
}
......@@ -43,6 +43,9 @@ public:
void selectItems(const Akonadi::Item::List &list);
void selectItems(const QList<Akonadi::Item::Id> &list);
void setCurrentItem(const Akonadi::Item &item);
void setCurrentCollection(const Akonadi::Collection &collection);
protected:
/* reimp */
QModelIndex indexFromConfigString(const QAbstractItemModel *model, const QString &key) const override;
......
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