Commit dbaf5ba7 authored by Harald Sitter's avatar Harald Sitter 🎶

connect clicked signal of view (again)

Summary:
activated, when the system is in double click mode is only triggered
on double click. but even with in double click mode we want side panels to
trigger on single clicks. so we need both clicked and activated.

double-activation continues to be properly guarded in clickedSlot, so
this change looks to be save vis-a-vis state changes in the UI

BUG: 405373
FIXED-IN: 5.15.3
CHANGELOG: single-clicks correctly activate modules again when the system is in double-click mode

Test Plan:
single click system:
- clicking enables modules
- keyboard navigation enables modules
- double clicking has no unintended side effects

double-click system:
- same

Reviewers: mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19703
parent 37a1d2ab
......@@ -47,12 +47,16 @@ SidePanel::SidePanel(QWidget *parent)
setMouseTracking(true);
setModel(m_proxyModel);
// Mind that activated does not include clicked when the system is in
// double-click mode https://bugs.kde.org/show_bug.cgi?id=405373
connect(this,&QAbstractItemView::clicked,this,&SidePanel::clickedSlot);
connect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot);
}
SidePanel::~SidePanel()
{
disconnect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot);
disconnect(this,&QAbstractItemView::clicked,this,&SidePanel::clickedSlot);
delete m_proxyModel;
delete m_model;
......
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