summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/arch/x86_64/qatomic_sun.s40
-rw-r--r--src/gui/itemviews/qlistview.cpp4
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp12
3 files changed, 14 insertions, 42 deletions
diff --git a/src/corelib/arch/x86_64/qatomic_sun.s b/src/corelib/arch/x86_64/qatomic_sun.s
index 4517fe4..37969e6 100644
--- a/src/corelib/arch/x86_64/qatomic_sun.s
+++ b/src/corelib/arch/x86_64/qatomic_sun.s
@@ -1,43 +1,3 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!!
-!! Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-!! Contact: Nokia Corporation (qt-info@nokia.com)
-!!
-!! This file is part of the QtGui module of the Qt Toolkit.
-!!
-!! $QT_BEGIN_LICENSE:LGPL$
-!! No Commercial Usage
-!! This file contains pre-release code and may not be distributed.
-!! You may use this file in accordance with the terms and conditions
-!! contained in the Technology Preview License Agreement accompanying
-!! this package.
-!!
-!! GNU Lesser General Public License Usage
-!! Alternatively, this file may be used under the terms of the GNU Lesser
-!! General Public License version 2.1 as published by the Free Software
-!! Foundation and appearing in the file LICENSE.LGPL included in the
-!! packaging of this file. Please review the following information to
-!! ensure the GNU Lesser General Public License version 2.1 requirements
-!! will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-!!
-!! In addition, as a special exception, Nokia gives you certain
-!! additional rights. These rights are described in the Nokia Qt LGPL
-!! Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-!! package.
-!!
-!! If you have questions regarding the use of this file, please contact
-!! Nokia at qt-info@nokia.com.
-!!
-!!
-!!
-!!
-!!
-!!
-!!
-!!
-!! $QT_END_LICENSE$
-!!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.code64
.globl q_atomic_increment
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index fc801ad..5b5cfa1 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -1804,12 +1804,12 @@ QItemSelection QListViewPrivate::selection(const QRect &rect) const
void QCommonListViewBase::appendHiddenRow(int row)
{
- dd->hiddenRows.append(dd->model->index(row, 0));
+ dd->hiddenRows.append(dd->model->index(row, 0, qq->rootIndex()));
}
void QCommonListViewBase::removeHiddenRow(int row)
{
- dd->hiddenRows.remove(dd->hiddenRows.indexOf(dd->model->index(row, 0)));
+ dd->hiddenRows.remove(dd->hiddenRows.indexOf(dd->model->index(row, 0, qq->rootIndex())));
}
void QCommonListViewBase::updateHorizontalScrollBar(const QSize &step)
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 2281fb7..c598aeb 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -424,6 +424,18 @@ void tst_QListView::hideRows()
view.setRowHidden(0, false);
QVERIFY(!view.isRowHidden(0));
+ QStandardItemModel sim(0);
+ QStandardItem *root = new QStandardItem("Root row");
+ for (int i=0;i<5;i++)
+ root->appendRow(new QStandardItem(QString("Row %1").arg(i)));
+ sim.appendRow(root);
+ view.setModel(&sim);
+ view.setRootIndex(root->index());
+ QVERIFY(!view.isRowHidden(0));
+ view.setRowHidden(0, true);
+ QVERIFY(view.isRowHidden(0));
+ view.setRowHidden(0, false);
+ QVERIFY(!view.isRowHidden(0));
}