QmlDesigner: Remove project explorer from navigator

This was a 'hack' to make the project explorer more accessible
and with dock widgets this is not required anymore.

Change-Id: I92b0a168a41eade2718698b9602e33550286e96f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Thomas Hartmann
2020-02-21 15:21:50 +01:00
parent c74a3042d4
commit af9f703dc3

View File

@@ -61,32 +61,7 @@ NavigatorWidget::NavigatorWidget(NavigatorView *view)
layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
auto tabBar = new QTabBar(this);
tabBar->addTab(tr("Navigator"));
tabBar->addTab(tr("Project"));
tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
QWidget *spacer = new QWidget(this);
spacer->setObjectName(QStringLiteral("itemLibrarySearchInputSpacer"));
spacer->setFixedHeight(4);
layout->addWidget(tabBar);
layout->addWidget(spacer);
auto stackedWidget = new QStackedWidget(this);
stackedWidget->addWidget(m_treeView);
#ifndef QMLDESIGNER_TEST
auto projectManager = QmlDesignerPlugin::instance()->createProjectExplorerWidget(this);
QTC_ASSERT(projectManager, ;);
if (projectManager)
stackedWidget->addWidget(projectManager);
#endif
connect(tabBar, &QTabBar::currentChanged, stackedWidget, &QStackedWidget::setCurrentIndex);
layout->addWidget(stackedWidget);
layout->addWidget(m_treeView);
setLayout(layout);
setWindowTitle(tr("Navigator", "Title of navigator view"));