┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/dolphindetailsviewtest.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2010-11-20 19:13:57 +0000
committerFrank Reininghaus <[email protected]>2010-11-20 19:13:57 +0000
commit730ac2c5975964eb190c681f475af6a92036ad94 (patch)
treedf41d335679a6e578b629a041080abe5befce581 /src/tests/dolphindetailsviewtest.cpp
parent5e7da43c2ddeb9cf99e5a2d2521b4274557b921a (diff)
Backup and restore the zoom level in
bug234600_overlappingIconsWhenZooming() such that it's the standard value again in the following test. Also verify that the zoom level is as expected after each call to DolphinView::setZoomLevel(int). svn path=/trunk/KDE/kdebase/apps/; revision=1199137
Diffstat (limited to 'src/tests/dolphindetailsviewtest.cpp')
-rw-r--r--src/tests/dolphindetailsviewtest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/dolphindetailsviewtest.cpp b/src/tests/dolphindetailsviewtest.cpp
index 6f10c0f55..03d3ade1d 100644
--- a/src/tests/dolphindetailsviewtest.cpp
+++ b/src/tests/dolphindetailsviewtest.cpp
@@ -237,6 +237,7 @@ void DolphinDetailsViewTest::bug234600_overlappingIconsWhenZooming()
// Setting the zoom level to the minimum value and triggering DolphinDetailsView::currentChanged(...)
// should make sure that the bug is triggered.
+ int zoomLevelBackup = m_view->zoomLevel();
int zoomLevel = ZoomLevelInfo::minimumLevel();
m_view->setZoomLevel(zoomLevel);
@@ -248,11 +249,13 @@ void DolphinDetailsViewTest::bug234600_overlappingIconsWhenZooming()
while(zoomLevel < ZoomLevelInfo::maximumLevel()) {
zoomLevel++;
m_view->setZoomLevel(zoomLevel);
+ QCOMPARE(m_view->zoomLevel(), zoomLevel);
//Check for each zoom level that the height of each item is at least the icon size.
QVERIFY(detailsView->visualRect(index1).height() >= ZoomLevelInfo::iconSizeForZoomLevel(zoomLevel));
}
+ m_view->setZoomLevel(zoomLevelBackup);
m_view->hide();
cleanupTestDir();
}