diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-04-13 10:28:00 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-04-13 10:28:00 (GMT) |
commit | 42fc3d36260c409918431c1fc058ee2d10f6c147 (patch) | |
tree | 6106ec4e29311baf59aa8c92cf9f54681d833e54 /tests/auto | |
parent | 33d20d417ea9387b449de96097c3d2b5913a0533 (diff) | |
download | Qt-42fc3d36260c409918431c1fc058ee2d10f6c147.zip Qt-42fc3d36260c409918431c1fc058ee2d10f6c147.tar.gz Qt-42fc3d36260c409918431c1fc058ee2d10f6c147.tar.bz2 |
Revert "Implement heightForWidth support for QTabWidget and QStackedLayout."
This reverts commit d22c8c60ffd986cc46d1f1cab878d60b03b5d4ea.
The change is not binary compatible
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtabwidget/tst_qtabwidget.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/auto/qtabwidget/tst_qtabwidget.cpp b/tests/auto/qtabwidget/tst_qtabwidget.cpp index 204c27a..4491fb3 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(); @@ -624,50 +621,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" |