diff options
author | Fathi Boudra <fabo@debian.org> | 2010-04-21 23:00:36 +0300 |
---|---|---|
committer | Fathi Boudra <fabo@debian.org> | 2010-04-21 23:00:36 +0300 |
commit | e1104272c723f1b5de51f4bba604635d294b5463 (patch) | |
tree | 944995ae22d3c56f075221a2c612f9ea345f2a00 | |
parent | 6aa353be12f338db976d0e0f18e15db9395b69f8 (diff) | |
download | qt4-x11-e1104272c723f1b5de51f4bba604635d294b5463.tar.gz |
Add upstream patch 0006_expand_indicator_would_not_be_displayed.diff
QTBUG-7443 - Expand indicator would not be displayed after removal
of a collapsed item's child.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/0006_expand_indicator_would_not_be_displayed.diff | 70 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 74 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 136d883..e872ae1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ qt4-x11 (4:4.6.2-5) UNRELEASED; urgency=low - 0005_always_redraw_the_complete_control.diff (Closes: #578606) QTBUG-8807 - Always redraw the complete control when an input event comes in. + - 0006_expand_indicator_would_not_be_displayed.diff + QTBUG-7443 - Expand indicator would not be displayed after removal of a + collapsed item's child. -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Sun, 18 Apr 2010 23:42:13 +0300 diff --git a/debian/patches/0006_expand_indicator_would_not_be_displayed.diff b/debian/patches/0006_expand_indicator_would_not_be_displayed.diff new file mode 100644 index 0000000..cfb5b5c --- /dev/null +++ b/debian/patches/0006_expand_indicator_would_not_be_displayed.diff @@ -0,0 +1,70 @@ +From 120905fbc48ac7658fac392113bf45e00880c456 Mon Sep 17 00:00:00 2001 +From: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> +Date: Wed, 24 Feb 2010 16:55:15 +0100 +Subject: [PATCH] Expand indicator would not be displayed after removal of a collapsed item's child + +While setting the hasChildren property of QTreeViewItem, "collapsed" and +"not visible" were being mistaken. + +Auto-test included. + +Reviewed-by: Olivier +Task-number: QTBUG-7443 +(cherry picked from commit 77670c3c0fdc3021356e212e94042a0b5a4f4f8c) +--- + src/gui/itemviews/qtreeview.cpp | 13 +++++++++---- + tests/auto/qtreeview/tst_qtreeview.cpp | 14 ++++++++++++++ + 2 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp +index 706d2a8..37168eb 100644 +--- a/src/gui/itemviews/qtreeview.cpp ++++ b/src/gui/itemviews/qtreeview.cpp +@@ -3770,10 +3770,15 @@ void QTreeViewPrivate::rowsRemoved(const QModelIndex &parent, + if (previousSibiling != -1 && after && model->rowCount(parent) == start) + viewItems[previousSibiling].hasMoreSiblings = false; + +- +- updateChildCount(parentItem, -removedCount); +- if (parentItem != -1 && viewItems.at(parentItem).total == 0) +- viewItems[parentItem].hasChildren = false; //every children have been removed; ++ if (parentItem != -1) { ++ if (viewItems.at(parentItem).expanded) { ++ updateChildCount(parentItem, -removedCount); ++ if (viewItems.at(parentItem).total == 0) ++ viewItems[parentItem].hasChildren = false; //every children have been removed; ++ } else if (viewItems[parentItem].hasChildren && !hasVisibleChildren(parent)) { ++ viewItems[parentItem].hasChildren = false; ++ } ++ } + if (after) { + q->updateGeometries(); + viewport->update(); +diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp +index fd4815e..e39cf6c 100644 +--- a/tests/auto/qtreeview/tst_qtreeview.cpp ++++ b/tests/auto/qtreeview/tst_qtreeview.cpp +@@ -3083,6 +3083,20 @@ void tst_QTreeView::styleOptionViewItem() + QApplication::processEvents(); + QTRY_VERIFY(delegate.count >= 3); + QApplication::processEvents(); ++ ++ item00->setText("OnlyOne"); ++ item0->insertRow(2, new QStandardItem("OnlyOne Last")); ++ view.collapse(item0->index()); ++ item0->removeRow(0); ++ delegate.count = 0; ++ QTRY_VERIFY(delegate.count >= 2); ++ QApplication::processEvents(); ++ ++ item0->removeRow(1); ++ item0->setText("OnlyOne"); ++ delegate.count = 0; ++ QTRY_VERIFY(delegate.count >= 2); ++ QApplication::processEvents(); + } + } + +-- +1.6.1 + diff --git a/debian/patches/series b/debian/patches/series index 5bea16b..af93b8c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,6 +4,7 @@ 0003_s390_fix_atomic_ops_related_crashes.diff 0004_problem_displaying_half_width_character.diff 0005_always_redraw_the_complete_control.diff +0006_expand_indicator_would_not_be_displayed.diff # qt-copy patches 0180-window-role.diff |