forked from qt-creator/qt-creator
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:
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user