Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c5b478a8 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Adapt to KCalCore API changes

parent 943fe638
......@@ -75,6 +75,9 @@ find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Crash ${KF5_VERSION} REQUIRED)
find_package(KF5Completion ${KF5_VERSION} REQUIRED)
find_package(KF5ItemViews ${KF5_VERSION} REQUIRED)
find_package(KF5KIO ${KF5_VERSION} REQUIRED)
# Find KdepimLibs Package
find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
......
......@@ -102,6 +102,10 @@ target_link_libraries(libakonadiconsole
KF5::PimTextEdit
Qt5::Sql
KF5::Crash
KF5::Completion
KF5::ItemViews
KF5::TextWidgets
KF5::XmlGui
)
set_target_properties(libakonadiconsole
......@@ -138,6 +142,10 @@ target_link_libraries(akonadiconsole
KF5::PimTextEdit
Qt5::Sql
KF5::Crash
KF5::Completion
KF5::ItemViews
KF5::TextWidgets
KF5::XmlGui
)
install(TARGETS akonadiconsole ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -35,8 +35,9 @@ AgentConfigModel::~AgentConfigModel()
void AgentConfigModel::setAgentInstance(const Akonadi::AgentInstance &instance)
{
beginResetModel();
m_settings.clear();
reset();
m_interface = new QDBusInterface(
QStringLiteral("org.freedesktop.Akonadi.Agent.%1").arg(instance.identifier()),
......@@ -46,12 +47,13 @@ void AgentConfigModel::setAgentInstance(const Akonadi::AgentInstance &instance)
delete m_interface;
return;
}
endResetModel();
reload();
}
void AgentConfigModel::reload()
{
beginResetModel();
m_settings.clear();
for (int i = 0; i < m_interface->metaObject()->methodCount(); ++i) {
const QMetaMethod method = m_interface->metaObject()->method(i);
......@@ -77,7 +79,7 @@ void AgentConfigModel::reload()
const QString settingName = methodName.at(0).toUpper() + methodName.mid(1);
m_settings.append(qMakePair(settingName, reply.arguments().at(0)));
}
reset();
endResetModel();
}
int AgentConfigModel::columnCount(const QModelIndex &parent) const
......
......@@ -505,9 +505,10 @@ void NotificationModel::slotNotify(const Akonadi::ChangeNotification &ntf)
void NotificationModel::clear()
{
beginResetModel();
qDeleteAll(m_data);
m_data.clear();
reset();
endResetModel();
}
Protocol::ChangeNotificationPtr NotificationModel::notification(const QModelIndex &index) const
......
......@@ -53,7 +53,7 @@ NotificationMonitor::NotificationMonitor(QWidget *parent) :
tv->expandAll();
tv->setAlternatingRowColors(true);
tv->setContextMenuPolicy(Qt::CustomContextMenu);
tv->header()->setResizeMode(QHeaderView::ResizeToContents);
tv->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
connect(tv, &QTreeView::customContextMenuRequested, this, &NotificationMonitor::contextMenu);
layout->addWidget(tv);
......
......@@ -740,10 +740,10 @@ QueryDebugger::QueryDebugger(QWidget *parent):
proxy->setSourceModel(mQueryList);
proxy->setDynamicSortFilter(true);
mUi->queryListView->setModel(proxy);
mUi->queryListView->header()->setResizeMode(QueryDebuggerModel::CallsColumn, QHeaderView::Fixed);
mUi->queryListView->header()->setResizeMode(QueryDebuggerModel::DurationColumn, QHeaderView::Fixed);
mUi->queryListView->header()->setResizeMode(QueryDebuggerModel::AvgDurationColumn, QHeaderView::Fixed);
mUi->queryListView->header()->setResizeMode(QueryDebuggerModel::QueryColumn, QHeaderView::ResizeToContents);
mUi->queryListView->header()->setSectionResizeMode(QueryDebuggerModel::CallsColumn, QHeaderView::Fixed);
mUi->queryListView->header()->setSectionResizeMode(QueryDebuggerModel::DurationColumn, QHeaderView::Fixed);
mUi->queryListView->header()->setSectionResizeMode(QueryDebuggerModel::AvgDurationColumn, QHeaderView::Fixed);
mUi->queryListView->header()->setSectionResizeMode(QueryDebuggerModel::QueryColumn, QHeaderView::ResizeToContents);
connect(mUi->queryTreeView, &QTreeView::doubleClicked,
this, &QueryDebugger::queryTreeDoubleClicked);
......
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