Fix regression in KItemListControllerTest

Since commit 66ce4db487, enabling or
disabling groupling may change the number of columns in the view.
Therefore, the test should first change the "grouping" setting and then
change the view geometry to make sure that the column count is correct.
This commit is contained in:
Frank Reininghaus 2012-02-13 20:15:02 +01:00
parent 97cde85b77
commit 61390b201a

View file

@ -447,15 +447,15 @@ void KItemListControllerTest::testKeyboardNavigation()
m_view->setScrollOrientation(scrollOrientation);
QCOMPARE(m_view->scrollOrientation(), scrollOrientation);
adjustGeometryForColumnCount(columnCount);
QCOMPARE(m_view->m_layouter->m_columnCount, columnCount);
m_controller->setSelectionBehavior(selectionBehavior);
QCOMPARE(m_controller->selectionBehavior(), selectionBehavior);
m_model->setGroupedSorting(groupingEnabled);
QCOMPARE(m_model->groupedSorting(), groupingEnabled);
adjustGeometryForColumnCount(columnCount);
QCOMPARE(m_view->m_layouter->m_columnCount, columnCount);
while (!testList.isEmpty()) {
const QPair<KeyPress, ViewState> test = testList.takeFirst();
const Qt::Key key = test.first.m_key;