]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix regression in KItemListControllerTest
authorFrank Reininghaus <frank78ac@googlemail.com>
Mon, 13 Feb 2012 19:15:02 +0000 (20:15 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Mon, 13 Feb 2012 19:21:57 +0000 (20:21 +0100)
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)

src/tests/kitemlistcontrollertest.cpp

index 7944d6d3490d700bc77b7b3a7bdf25719dc03ac1..f62ef0c3ef5b644824d7cdd63160744785bc57b4 100644 (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;