summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtreeview/tst_qtreeview.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-12 22:04:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-12 22:04:20 (GMT)
commitdc2086caec2c1d208b7ae85506bb6f7c0073f4a9 (patch)
tree0f09eb3804a11429f64a579fa78795352754f96c /tests/auto/qtreeview/tst_qtreeview.cpp
parent1cb8e4b9a569023ad44060252df0b891c1a331d1 (diff)
parent417dd757e8d78d226fc61f6302823bdb6ec09f64 (diff)
downloadQt-dc2086caec2c1d208b7ae85506bb6f7c0073f4a9.zip
Qt-dc2086caec2c1d208b7ae85506bb6f7c0073f4a9.tar.gz
Qt-dc2086caec2c1d208b7ae85506bb6f7c0073f4a9.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (23 commits) My changes Significant digits were lost in QDoubleSpinBox range when changing precision My changelog for 4.6.1. Added my changes to the 4.6.1 change log. Put LinesHint into QVectorPath hints to enable further optimizations Update changes file for 4.6.1 Avoid coordinate limitations in the raster engine. Update changelog with my 4.6.1 changes. 4.6.1 changes Fixed bug where QGLPixmapData::toImage() returned too dark image. Update change log with Yoann Lopes work. Fix completion in QFileDialog. Fix point drawing on raster engine for flat and square caps Update changes file with Rhys Weatherley's work. warning fixes for platforms, where qreal == float fix release mode crash in qfont.cpp initFontSubst() on Windows mobile Fixed justify aligned text drawing with the GL1 engine. Add odf-writer benchmark. Fixed subpixel antialiased text drawing with the GL2 engine. Fixes warning in the QMacStyle ...
Diffstat (limited to 'tests/auto/qtreeview/tst_qtreeview.cpp')
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index d269cc3..fd4815e 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -236,6 +236,7 @@ private slots:
void task248022_changeSelection();
void task245654_changeModelAndExpandAll();
void doubleClickedWithSpans();
+ void taskQTBUG_6450_selectAllWith1stColumnHidden();
};
class QtTestModel: public QAbstractItemModel
@@ -3678,5 +3679,26 @@ void tst_QTreeView::doubleClickedWithSpans()
QTRY_COMPARE(spy.count(), 2);
}
+void tst_QTreeView::taskQTBUG_6450_selectAllWith1stColumnHidden()
+{
+ QTreeWidget tree;
+ tree.setSelectionMode(QAbstractItemView::MultiSelection);
+ tree.setColumnCount(2);
+ QList<QTreeWidgetItem *> items;
+ const int nrRows = 10;
+ for (int i = 0; i < nrRows; ++i) {
+ items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("item: %1").arg(i))));
+ items.last()->setText(1, QString("is an item"));
+ }
+ tree.insertTopLevelItems(0, items);
+
+ tree.hideColumn(0);
+ tree.selectAll();
+
+ QVERIFY(tree.selectionModel()->hasSelection());
+ for (int i = 0; i < nrRows; ++i)
+ QVERIFY(tree.selectionModel()->isRowSelected(i, QModelIndex()));
+}
+
QTEST_MAIN(tst_QTreeView)
#include "tst_qtreeview.moc"