From 0ae5a19941911a68365838b009e7b2573990581e Mon Sep 17 00:00:00 2001 From: liuch Date: Mon, 2 Apr 2012 17:25:41 +0400 Subject: [PATCH] added psi-fix-rename-contact-in-roster patch --- ...1930-psi-fix-rename-contact-in-roster.diff | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 patches/1930-psi-fix-rename-contact-in-roster.diff diff --git a/patches/1930-psi-fix-rename-contact-in-roster.diff b/patches/1930-psi-fix-rename-contact-in-roster.diff new file mode 100644 index 0000000..da5c698 --- /dev/null +++ b/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_;