@@ -478,6 +478,7 @@ Controllers::DockWidget *DropArea::mdiDockWidgetWrapper() const
|
||||
Controllers::Group *DropArea::createCentralFrame(MainWindowOptions options)
|
||||
{
|
||||
Controllers::Group *group = nullptr;
|
||||
|
||||
if (options & MainWindowOption_HasCentralFrame) {
|
||||
FrameOptions groupOptions = FrameOption_IsCentralFrame;
|
||||
const bool hasPersistentCentralWidget =
|
||||
|
||||
@@ -636,6 +636,8 @@ bool Group::hasTabsVisible() const
|
||||
QStringList Group::affinities() const
|
||||
{
|
||||
if (isEmpty()) {
|
||||
if (auto m = mainWindow())
|
||||
return m->affinities();
|
||||
return {};
|
||||
} else {
|
||||
return dockWidgetAt(0)->affinities();
|
||||
|
||||
@@ -6415,24 +6415,15 @@ void TestDocks::tst_closeTabOfCentralFrame()
|
||||
QVERIFY(group->isVisible());
|
||||
}
|
||||
|
||||
void TestDocks::tst_centralFrame245()
|
||||
void TestDocks::tst_centralGroupAffinity()
|
||||
{
|
||||
/*
|
||||
auto m =
|
||||
createMainWindow(QSize(500, 500), MainWindowOption_HasCentralFrame, "tst_centralFrame245");
|
||||
const QStringList affinities = { "a" };
|
||||
m->setAffinities(affinities);
|
||||
|
||||
Build: -DKDDockWidgets_DEVELOPER_MODE=ON
|
||||
Run: ./bin/tst_docks tst_centralFrame245 -platform xcb
|
||||
|
||||
auto m = createMainWindow(QSize(500, 500), MainWindowOption_HasCentralFrame,
|
||||
"tst_centralFrame245"); auto dock1 = createDockWidget("1",
|
||||
Platform::instance()->tests_createView({ true })); auto dock2 = createDockWidget("2",
|
||||
Platform::instance()->tests_createView({ true }));
|
||||
|
||||
m->addDockWidgetAsTab(dock1);
|
||||
m->addDockWidgetAsTab(dock2);
|
||||
|
||||
QTest::qWait(100000);
|
||||
|
||||
*/
|
||||
Group *centralGroup = m->dropArea()->m_centralFrame;
|
||||
QCOMPARE(centralGroup->affinities(), affinities);
|
||||
}
|
||||
|
||||
void TestDocks::tst_persistentCentralWidget()
|
||||
|
||||
@@ -111,7 +111,7 @@ private Q_SLOTS:
|
||||
void tst_availableLengthForOrientation();
|
||||
void tst_closeShowWhenNoCentralFrame();
|
||||
void tst_closeTabOfCentralFrame();
|
||||
void tst_centralFrame245();
|
||||
void tst_centralGroupAffinity();
|
||||
void tst_setAsCurrentTab();
|
||||
void tst_placeholderDisappearsOnReadd();
|
||||
void tst_placeholdersAreRemovedProperly();
|
||||
|
||||
Reference in New Issue
Block a user