diff --git a/infocenter.h b/infocenter.h --- a/infocenter.h +++ b/infocenter.h @@ -141,6 +141,7 @@ void clearSearchLine(); + const KcmTreeItem *m_kcmItem = nullptr; KcmContainer *m_contain = nullptr; QSplitter *m_splitter = nullptr; diff --git a/infocenter.cpp b/infocenter.cpp --- a/infocenter.cpp +++ b/infocenter.cpp @@ -200,20 +200,21 @@ void KInfoCenter::itemClickedSlot(const KcmTreeItem *item) { - resetCondition(); - if(item->type() != KcmTreeItem::CATEGORY) { - setKcm(item); + if (item != m_kcmItem) { + resetCondition(); + if(item->type() != KcmTreeItem::CATEGORY) { + setKcm(item); + } } + m_kcmItem = item; } void KInfoCenter::setKcm(const KcmTreeItem *kcmItem) { - if (m_contain->fileName() != kcmItem->kcm().fileName()) { - m_contain->setKcm(kcmItem->kcm()); + m_contain->setKcm(kcmItem->kcm()); - setButtons(m_contain->buttons()); - m_aboutKcm->setEnabled(true); - } + setButtons(m_contain->buttons()); + m_aboutKcm->setEnabled(true); } void KInfoCenter::setButtons(const KCModule::Buttons buttons) diff --git a/sidepanel.cpp b/sidepanel.cpp --- a/sidepanel.cpp +++ b/sidepanel.cpp @@ -48,13 +48,11 @@ setMouseTracking(true); setModel(m_proxyModel); connect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot); - connect(this,SIGNAL(clicked(QModelIndex)),this,SLOT(clickedSlot(QModelIndex))); } SidePanel::~SidePanel() { disconnect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot); - disconnect(this,SIGNAL(clicked(QModelIndex)),this,SLOT(clickedSlot(QModelIndex))); delete m_proxyModel; delete m_model;