Commit ab82045a authored by Emmanuel Pescosta's avatar Emmanuel Pescosta

Fix Bug 309338 - flood of error boxes while renaming a folder in the folder panel

BUG: 309338
FIXED-IN: 4.9.3
REVIEW: 107070
parent 0b16a06c
......@@ -1429,12 +1429,16 @@ void KItemListView::slotGeometryOfGroupHeaderParentChanged()
void KItemListView::slotRoleEditingCanceled(int index, const QByteArray& role, const QVariant& value)
{
disconnectRoleEditingSignals(index);
emit roleEditingCanceled(index, role, value);
m_editingRole = false;
}
void KItemListView::slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value)
{
disconnectRoleEditingSignals(index);
emit roleEditingFinished(index, role, value);
m_editingRole = false;
}
......@@ -2505,6 +2509,17 @@ bool KItemListView::hasSiblingSuccessor(int index) const
return hasSuccessor;
}
void KItemListView::disconnectRoleEditingSignals(int index)
{
KItemListWidget* widget = m_visibleItems.value(index);
if (!widget) {
return;
}
widget->disconnect(SIGNAL(roleEditingCanceled(int,QByteArray,QVariant)), this);
widget->disconnect(SIGNAL(roleEditingFinished(int,QByteArray,QVariant)), this);
}
int KItemListView::calculateAutoScrollingIncrement(int pos, int range, int oldInc)
{
int inc = 0;
......
......@@ -662,6 +662,13 @@ private:
*/
bool hasSiblingSuccessor(int index) const;
/**
* Helper method for slotRoleEditingCanceled() and slotRoleEditingFinished().
* Disconnects the two Signals "roleEditingCanceled" and
* "roleEditingFinished"
*/
void disconnectRoleEditingSignals(int index);
/**
* Helper function for triggerAutoScrolling().
* @param pos Logical position of the mouse relative to the range.
......
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