Skip to content

Commit

Permalink
added psi-fix-rename-contact-in-roster patch
Browse files Browse the repository at this point in the history
  • Loading branch information
liuch committed Apr 2, 2012
1 parent 798efba commit 0ae5a19
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions patches/1930-psi-fix-rename-contact-in-roster.diff
@@ -0,0 +1,41 @@
--- psi.orig/src/contactlistdragview.cpp
+++ psi/src/contactlistdragview.cpp
@@ -252,6 +252,7 @@ void ContactListDragView::setModel(QAbst
disconnect(model(), SIGNAL(modelAboutToBeReset()), this, SLOT(modelChanged()));
disconnect(model(), SIGNAL(layoutAboutToBeChanged()), this, SLOT(modelChanged()));
disconnect(model(), SIGNAL(layoutChanged()), this, SLOT(doItemsLayout()));
+ disconnect(model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(closeCurrentEditor()));
}

// it's critical that we hook on signals prior to selectionModel,
@@ -265,6 +266,8 @@ void ContactListDragView::setModel(QAbst
// invalidating proxy model, and we want tree state to be up to date in order
// to avoid weird impossible crashes
connect(newModel, SIGNAL(layoutChanged()), this, SLOT(doItemsLayout()));
+
+ connect(newModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(closeCurrentEditor()));
}

ContactListView::setModel(newModel);
@@ -652,6 +655,11 @@ void ContactListDragView::removeSelectio
delete mimeData;
}

+void ContactListDragView::closeCurrentEditor()
+{
+ closeEditor(currentEditor(), QAbstractItemDelegate::NoHint);
+}
+
bool ContactListDragView::extendedSelectionAllowed() const
{
return selectedIndexes().count() > 1 || keyboardModifiers_ != 0;
--- psi.orig/src/contactlistdragview.h
+++ psi/src/contactlistdragview.h
@@ -127,6 +127,7 @@ private slots:
void updateCursorMouseHover(const QModelIndex&);
void updateCursorMouseHover();
void removeSelection();
+ void closeCurrentEditor();

private:
QMimeData* backedUpSelection_;

1 comment on commit 0ae5a19

@liuch
Copy link
Member Author

@liuch liuch commented on 0ae5a19 Apr 2, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправляет проблему с переименованием контактов в ростере. НЕ исправляет проблему переименования групп.

Please sign in to comment.