diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2016-05-03 11:51:41 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-05-10 08:15:09 +0000 |
commit | 7f5e8a5e3475c7f400a47ca821e78feb2e590222 (patch) | |
tree | d6343568205787f534a74ba03dfdb86470ddf667 | |
parent | d6cbf9efb7c42b10de5fe293589176019faf0373 (diff) |
OS X: Remove unified toolbar test.
The Qt 5 unified toolbar implementation does not move
the toolbar to the “non-client” area. This test is
no longer relevant.
Change-Id: Ia32de2260f8ef400a0dc5acf3e5e3ff59083657a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 41 |
2 files changed, 1 insertions, 42 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 773f4205af..8fc882112e 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -40,8 +40,6 @@ osx osx [render_systemClip] osx -[childAt_unifiedToolBar] -osx [showMinimizedKeepsFocus] osx-10.10 [moveWindowInShowEvent:1] diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 20bdf00292..7e72007ac0 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -435,7 +435,6 @@ private slots: void movedAndResizedAttributes(); void childAt(); #ifdef Q_OS_OSX - void childAt_unifiedToolBar(); void taskQTBUG_11373(); #endif void taskQTBUG_17333_ResizeInfiniteRecursion(); @@ -9577,49 +9576,10 @@ void tst_QWidget::childAt() } #ifdef Q_OS_OSX -void tst_QWidget::childAt_unifiedToolBar() -{ - QLabel *label = new QLabel(QLatin1String("foo")); - QToolBar *toolBar = new QToolBar; - toolBar->addWidget(new QLabel("dummy")); - toolBar->addWidget(label); - - QMainWindow mainWindow; - mainWindow.addToolBar(toolBar); - mainWindow.show(); - - // Calculate the top-left corner of the tool bar and the label (in mainWindow's coordinates). - QPoint labelTopLeft = label->mapTo(&mainWindow, QPoint()); - QPoint toolBarTopLeft = toolBar->mapTo(&mainWindow, QPoint()); - - QCOMPARE(mainWindow.childAt(toolBarTopLeft), static_cast<QWidget *>(toolBar)); - QCOMPARE(mainWindow.childAt(labelTopLeft), static_cast<QWidget *>(label)); - - // Enable unified tool bars. - mainWindow.setUnifiedTitleAndToolBarOnMac(true); - QTest::qWait(50); - - // The tool bar is now in the "non-client" area of QMainWindow, i.e. - // outside the mainWindow's rect(), and since mapTo et al. doesn't work - // in that case (see commit 35667fd45ada49269a5987c235fdedfc43e92bb8), - // we use mapToGlobal/mapFromGlobal to re-calculate the corners. - QPoint oldToolBarTopLeft = toolBarTopLeft; - toolBarTopLeft = mainWindow.mapFromGlobal(toolBar->mapToGlobal(QPoint())); - QVERIFY2(toolBarTopLeft != oldToolBarTopLeft, - msgComparisonFailed(toolBarTopLeft, "!=", oldToolBarTopLeft)); - QVERIFY2(toolBarTopLeft.y() < 0, - msgComparisonFailed(toolBarTopLeft.y(), "<", 0)); - labelTopLeft = mainWindow.mapFromGlobal(label->mapToGlobal(QPoint())); - - QCOMPARE(mainWindow.childAt(toolBarTopLeft), static_cast<QWidget *>(toolBar)); - QCOMPARE(mainWindow.childAt(labelTopLeft), static_cast<QWidget *>(label)); -} void tst_QWidget::taskQTBUG_11373() { -#ifdef Q_OS_OSX QSKIP("QTBUG-52974"); -#endif QScopedPointer<QMainWindow> myWindow(new QMainWindow); QWidget * center = new QWidget(); @@ -9636,6 +9596,7 @@ void tst_QWidget::taskQTBUG_11373() // The drawer should still not be visible, since we haven't shown it. QCOMPARE(drawer->isVisible(), false); } + #endif void tst_QWidget::taskQTBUG_17333_ResizeInfiniteRecursion() |