summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-05-03 08:11:20 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-05-03 08:11:58 (GMT)
commit68de350953841e5789656831b08099a6d136c397 (patch)
treeb18723ffa2153410db7c1b51b377f7cc88d952d2 /tests/auto
parente970b88cab8f071f3dbaac5f0d520d7196241ab7 (diff)
downloadQt-68de350953841e5789656831b08099a6d136c397.zip
Qt-68de350953841e5789656831b08099a6d136c397.tar.gz
Qt-68de350953841e5789656831b08099a6d136c397.tar.bz2
Revert "Revert "Revert "Implement heightForWidth support for QTabWidget and QStackedLayout."""
This reverts commit 1f00130097f81bc78aebb3c055f38c066221bc98. (Sorry about this. The previous commit got pushed by accident. The proper fix has been done for 4.8 instead.)
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qtabwidget/tst_qtabwidget.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/auto/qtabwidget/tst_qtabwidget.cpp b/tests/auto/qtabwidget/tst_qtabwidget.cpp
index 54e7259..504579f 100644
--- a/tests/auto/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/qtabwidget/tst_qtabwidget.cpp
@@ -45,7 +45,6 @@
#include <qdebug.h>
#include <qapplication.h>
#include <qlabel.h>
-#include <qboxlayout.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -121,8 +120,6 @@ class tst_QTabWidget:public QObject {
void clear();
void keyboardNavigation();
void paintEventCount();
- void heightForWidth();
- void heightForWidth_data();
private:
int addPage();
@@ -627,50 +624,6 @@ void tst_QTabWidget::paintEventCount()
QCOMPARE(tab2->count, 1);
}
-void tst_QTabWidget::heightForWidth_data()
-{
- QTest::addColumn<int>("tabPosition");
- QTest::newRow("West") << int(QTabWidget::West);
- QTest::newRow("North") << int(QTabWidget::North);
- QTest::newRow("East") << int(QTabWidget::East);
- QTest::newRow("South") << int(QTabWidget::South);
-}
-
-void tst_QTabWidget::heightForWidth()
-{
- QFETCH(int, tabPosition);
-
- QWidget *window = new QWidget;
- QVBoxLayout *lay = new QVBoxLayout(window);
- lay->setMargin(0);
- lay->setSpacing(0);
- QTabWidget *tabWid = new QTabWidget(window);
- QWidget *w = new QWidget;
- tabWid->addTab(w, QLatin1String("HFW page"));
- tabWid->setTabPosition(QTabWidget::TabPosition(tabPosition));
- QVBoxLayout *lay2 = new QVBoxLayout(w);
- QLabel *label = new QLabel("Label with wordwrap turned on makes it trade height for width."
- " Make it a really long text so that it spans on several lines"
- " when the label is on its narrowest."
- " I don't like to repeat myself."
- " I don't like to repeat myself."
- " I don't like to repeat myself."
- " I don't like to repeat myself."
- );
- label->setWordWrap(true);
- lay2->addWidget(label);
- lay2->setMargin(0);
-
- lay->addWidget(tabWid);
- int h = window->heightForWidth(160);
- window->resize(160, h);
- window->show();
-
- QTest::qWaitForWindowShown(window);
- QVERIFY(label->height() >= label->heightForWidth(label->width()));
-
- delete window;
-}
QTEST_MAIN(tst_QTabWidget)
#include "tst_qtabwidget.moc"