qtquick: Add a failing test for #215

This commit is contained in:
Sergio Martins
2021-07-02 16:56:40 +01:00
parent 463b6a1322
commit 362f2d5750
2 changed files with 22 additions and 0 deletions

View File

@@ -7198,6 +7198,27 @@ void TestDocks::tst_toggleTabbed()
QVERIFY(dock1->isVisible());
}
void TestDocks::tst_toggleTabbed2()
{
// Testing the weird bugs reported in #215
EnsureTopLevelsDeleted e;
auto dock0 = createDockWidget("dock0", new MyWidget2(QSize(400, 400)));
auto dock1 = createDockWidget("dock1", new MyWidget2(QSize(400, 400)));
dock0->addDockWidgetAsTab(dock1);
dock0->setAsCurrentTab();
Frame *frame = dock0->dptr()->frame();
QCOMPARE(frame->currentDockWidget(), dock0);
dock0->setFloating(true);
QCOMPARE(dock0->dptr()->frame()->title(), "dock0");
#ifndef KDDOCKWIDGETS_QTWIDGETS
QEXPECT_FAIL("", "Will fix", Continue);
#endif
QCOMPARE(dock1->dptr()->frame()->title(), "dock1");
}
void TestDocks::tst_addMDIDockWidget()
{
EnsureTopLevelsDeleted e;

View File

@@ -233,6 +233,7 @@ private Q_SLOTS:
void tst_toggleAction();
void tst_redocksToPreviousTabIndex();
void tst_toggleTabbed();
void tst_toggleTabbed2();
void tst_addMDIDockWidget();
void tst_redockToMDIRestoresPosition();