From: Frank Reininghaus Date: Mon, 13 Feb 2012 19:15:02 +0000 (+0100) Subject: Fix regression in KItemListControllerTest X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/e1766d0e5f0f71b37ca7cc5adbe56de5e6bf8b57 Fix regression in KItemListControllerTest Since commit 66ce4db4879cd80b2dcb6d65a0c74599c5e5f0ba, 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. (cherry picked from commit 61390b201acae2d8eea94fefc947977a8799af85) --- diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index 7944d6d34..f62ef0c3e 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -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 test = testList.takeFirst(); const Qt::Key key = test.first.m_key;