summaryrefslogtreecommitdiff
path: root/extra/psi/configureroomcrash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/psi/configureroomcrash.patch')
-rw-r--r--extra/psi/configureroomcrash.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/extra/psi/configureroomcrash.patch b/extra/psi/configureroomcrash.patch
new file mode 100644
index 000000000..99fa30794
--- /dev/null
+++ b/extra/psi/configureroomcrash.patch
@@ -0,0 +1,40 @@
+commit ec91add0e6398ad20c7a8f14a1a08c5e3282c5bd
+Author: Michail Pishchagin <mblsha@users.sourceforge.net>
+Date: Tue Oct 19 11:26:31 2010 +0400
+
+ Fix crash in MUCAffiliationsModel on Qt 4.7 (closes #1087)
+ Based on 1610-psi-fix-crash-in-muc-configurator.diff from Psi+
+
+diff --git a/src/mucaffiliationsmodel.cpp b/src/mucaffiliationsmodel.cpp
+index 722b762..fd0a830 100644
+--- a/src/mucaffiliationsmodel.cpp
++++ b/src/mucaffiliationsmodel.cpp
+@@ -150,15 +150,18 @@ void MUCAffiliationsModel::resetAffiliationLists()
+
+ void MUCAffiliationsModel::resetAffiliationList(MUCItem::Affiliation a)
+ {
++ emit layoutAboutToBeChanged();
+ enabled_[(AffiliationListIndex) affiliationToIndex(a)] = false;
+ QModelIndex index = affiliationListIndex(a);
+ if (hasChildren(index)) {
+ removeRows(0,rowCount(index),index);
+ }
++ emit layoutChanged();
+ }
+
+ void MUCAffiliationsModel::setAffiliationListEnabled(MUCItem::Affiliation a, bool b)
+ {
++ emit layoutAboutToBeChanged();
+ QModelIndex index = affiliationListIndex(a);
+ enabled_[(AffiliationListIndex) index.row()] = b;
+ emit layoutChanged();
+@@ -208,6 +211,9 @@ void MUCAffiliationsModel::addItems(const QList<MUCItem>& items)
+ foreach(MUCItem item, items) {
+ QModelIndex list = affiliationListIndex(item.affiliation());
+ if (list.isValid() && !item.jid().isEmpty()) {
++ if (!dirty) {
++ emit layoutAboutToBeChanged();
++ }
+ int row = rowCount(list);
+ if (row == 0) {
+ enabled_[(AffiliationListIndex) list.row()] = true;