diff --git a/src/widgets/kacleditwidget.cpp b/src/widgets/kacleditwidget.cpp --- a/src/widgets/kacleditwidget.cpp +++ b/src/widgets/kacleditwidget.cpp @@ -682,6 +682,9 @@ connect(this, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(slotItemClicked(QTreeWidgetItem*,int))); + + connect(this, &KACLListView::itemDoubleClicked, + this, &KACLListView::slotItemDoubleClicked); } KACLListView::~KACLListView() @@ -939,6 +942,26 @@ */ } +void KACLListView::slotItemDoubleClicked(QTreeWidgetItem *item, int column) +{ + if (!item) { + return; + } + + // avoid conflict with clicking to toggle permission + if (column >= 2 && column <= 4) { + return; + } + + KACLListViewItem *aclListItem = static_cast(item); + if (!aclListItem->isAllowedToChangeType()) { + return; + } + + setCurrentItem(item); + slotEditEntry(); +} + void KACLListView::calculateEffectiveRights() { QTreeWidgetItemIterator it(this); diff --git a/src/widgets/kacleditwidget_p.h b/src/widgets/kacleditwidget_p.h --- a/src/widgets/kacleditwidget_p.h +++ b/src/widgets/kacleditwidget_p.h @@ -122,6 +122,7 @@ protected Q_SLOTS: void slotItemClicked(QTreeWidgetItem *pItem, int col); + void slotItemDoubleClicked(QTreeWidgetItem *item, int col); protected: void contentsMousePressEvent(QMouseEvent *e);