summaryrefslogtreecommitdiffstats
path: root/abs/core/qt
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-10-19 18:31:38 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-10-19 18:31:38 (GMT)
commitd9aad8b00a9f3fb60e456c0e528df90189acb5b3 (patch)
tree6b9126d2336c62d1e5533798e7348f6a5723f6ba /abs/core/qt
parentd9a08ac22f9c6661cf3b478927be321274d10794 (diff)
parentc65b741914b31ac88086e363edc4415eb6aa1686 (diff)
downloadlinhes_pkgbuild-d9aad8b00a9f3fb60e456c0e528df90189acb5b3.zip
linhes_pkgbuild-d9aad8b00a9f3fb60e456c0e528df90189acb5b3.tar.gz
linhes_pkgbuild-d9aad8b00a9f3fb60e456c0e528df90189acb5b3.tar.bz2
Merge remote-tracking branch 'origin/testing' into testing
Conflicts: abs/core/LinHES-config/PKGBUILD
Diffstat (limited to 'abs/core/qt')
-rw-r--r--abs/core/qt/qtbug-16292.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/abs/core/qt/qtbug-16292.patch b/abs/core/qt/qtbug-16292.patch
new file mode 100644
index 0000000..9728e28
--- /dev/null
+++ b/abs/core/qt/qtbug-16292.patch
@@ -0,0 +1,62 @@
+From e340844bd614add505a39a3a6b915632476f6305 Mon Sep 17 00:00:00 2001
+From: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
+Date: Tue, 15 Feb 2011 11:19:26 +0100
+Subject: [PATCH] Fix crash in KPackageKit
+
+QTreeViewPrivate::itemHeight() may refer to an invalid QModelIndex
+after calling QTreeView::indexRowSizeHint().
+
+Same thing inside QTreeView::indexRowSizeHint(), since
+QHeaderView::count() will call
+QAbstractItemViewPrivate::executePostedLayout() which may invalidate
+all the QModelIndex.
+
+Reviewed-by: Olivier
+Task-number: QTBUG-16292
+---
+ src/gui/itemviews/qtreeview.cpp | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
+index f1f3236..c0573bb 100644
+--- a/src/gui/itemviews/qtreeview.cpp
++++ b/src/gui/itemviews/qtreeview.cpp
+@@ -2753,6 +2753,7 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const
+
+ int start = -1;
+ int end = -1;
++ int indexRow = index.row();
+ int count = d->header->count();
+ bool emptyHeader = (count == 0);
+ QModelIndex parent = index.parent();
+@@ -2789,7 +2790,7 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const
+ int logicalColumn = emptyHeader ? column : d->header->logicalIndex(column);
+ if (d->header->isSectionHidden(logicalColumn))
+ continue;
+- QModelIndex idx = d->model->index(index.row(), logicalColumn, parent);
++ QModelIndex idx = d->model->index(indexRow, logicalColumn, parent);
+ if (idx.isValid()) {
+ QWidget *editor = d->editorForIndex(idx).editor;
+ if (editor && d->persistent.contains(editor)) {
+@@ -3224,14 +3225,14 @@ int QTreeViewPrivate::itemHeight(int item) const
+ if (viewItems.isEmpty())
+ return 0;
+ const QModelIndex &index = viewItems.at(item).index;
++ if (!index.isValid())
++ return 0;
+ int height = viewItems.at(item).height;
+- if (height <= 0 && index.isValid()) {
++ if (height <= 0) {
+ height = q_func()->indexRowSizeHint(index);
+ viewItems[item].height = height;
+ }
+- if (!index.isValid() || height < 0)
+- return 0;
+- return height;
++ return qMax(height, 0);
+ }
+
+
+--
+1.6.1
+