QmlDesigner: Don't show extra tool buttons in the side bars

Task-number: QTCREATORBUG-11731
Change-Id: I75b70ace17ef291a7baa64abd6068bf472b43546
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2014-03-25 14:26:55 +01:00
parent 1e6577d940
commit 0e3634d311

View File

@@ -303,6 +303,12 @@ void DesignModeWidget::setCurrentDesignDocument(DesignDocument *newDesignDocumen
}
static void deleteToolButtons(QList<QToolButton*> &buttons)
{
qDeleteAll(buttons);
buttons.clear();
}
void DesignModeWidget::setup()
{
QList<Core::INavigationWidgetFactory *> factories =
@@ -318,14 +324,17 @@ void DesignModeWidget::setup()
if (factory->id() == "Projects") {
navigationView = factory->createWidget();
projectsExplorer = navigationView.widget;
deleteToolButtons(navigationView.dockToolBarWidgets);
projectsExplorer->setWindowTitle(tr("Projects"));
} else if (factory->id() == "File System") {
navigationView = factory->createWidget();
fileSystemExplorer = navigationView.widget;
deleteToolButtons(navigationView.dockToolBarWidgets);
fileSystemExplorer->setWindowTitle(tr("File System"));
} else if (factory->id() == "Open Documents") {
navigationView = factory->createWidget();
openDocumentsWidget = navigationView.widget;
deleteToolButtons(navigationView.dockToolBarWidgets);
openDocumentsWidget->setWindowTitle(tr("Open Documents"));
}