Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added psi-fix-rename-contact-in-roster patch
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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_; |
0ae5a19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправляет проблему с переименованием контактов в ростере. НЕ исправляет проблему переименования групп.