diff options
author | root <root@rshg054.dnsready.net> | 2012-02-26 23:15:00 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-26 23:15:00 +0000 |
commit | f6a79a3f5989efc8db63af942851c56f0c462bb1 (patch) | |
tree | 08bddecba9bbd4fc2c2075bfa2c514f710fcd351 /extra/psi/configureroomcrash.patch | |
parent | e4a5730eb358cb0d78bc022204ddccac068c2bf2 (diff) |
Sun Feb 26 23:15:00 UTC 2012
Diffstat (limited to 'extra/psi/configureroomcrash.patch')
-rw-r--r-- | extra/psi/configureroomcrash.patch | 40 |
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; |