diff options
| author | Frank Reininghaus <[email protected]> | 2011-01-26 13:20:36 +0000 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2011-01-26 13:20:36 +0000 |
| commit | 72fb2ca0a83deef9c1cbd99e45759d4b49f131ad (patch) | |
| tree | cb0130b0494401981978e8e54f55bf375e8798b6 /src/tests | |
| parent | e85b2ef0ad634e69d8b20ba311027f2efe7359e7 (diff) | |
Make dolphinviewtest_columns more stable.
Up to now, some Columns View tests that need a folder to be displayed
in the view only passed if they were run first: The first test always
passed, and if a test name was passed on the command line, such that
only this test would be run, this test would work as well. In other
cases, the view was empty, not showing the items in the folder.
The problem is worked around by creating a new DolphinView before each
test in the case of the Columns View. Added a TODO comment to make me
remember to look into this again at some point.
svn path=/trunk/KDE/kdebase/apps/; revision=1217260
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/dolphinviewtest_allviewmodes.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tests/dolphinviewtest_allviewmodes.cpp b/src/tests/dolphinviewtest_allviewmodes.cpp index 36285a959..45f4cb56b 100644 --- a/src/tests/dolphinviewtest_allviewmodes.cpp +++ b/src/tests/dolphinviewtest_allviewmodes.cpp @@ -37,6 +37,13 @@ DolphinViewTest_AllViewModes::DolphinViewTest_AllViewModes() { } void DolphinViewTest_AllViewModes::init() { + if (mode() == DolphinView::ColumnView) { + // In Columns View mode, we need to create a new DolphinView after each + // test to make the file-related tests after the first one pass. + // TODO: Try to find out if there is a hidden bug in the Columns View that causes this. + delete m_view; + m_view = new DolphinView(KUrl(m_path), 0); + } m_view->setMode(mode()); QVERIFY(verifyCorrectViewMode()); m_view->resize(200, 300); @@ -143,13 +150,6 @@ void DolphinViewTest_AllViewModes::testViewPropertySettings() m_view->setShowHiddenFiles(false); QVERIFY(!m_view->showHiddenFiles()); - if (mode() == DolphinView::ColumnView) { - // If the columns view is used, the view is empty before calling qApp->sendPostedEvents. - // It seems that some event needs to be processed to see the items in the view. - // TODO: Find out why this is needed for the columns view, but not for the other view modes. - qApp->sendPostedEvents(); - } - /** Check that the sort order is correct for different kinds of settings */ // Sort by Name, ascending |
