Merge remote-tracking branch 'origin/4.12'

Conflicts:
	src/plugins/baremetal/debugservers/uvsc/uvtargetdevicemodel.cpp

Change-Id: I4a90920e52dbbe9eb46aef3437ee3c5a6e7b31c6
This commit is contained in:
Eike Ziller
2020-03-16 08:30:33 +01:00
181 changed files with 1729 additions and 856 deletions

View File

@@ -66,6 +66,7 @@
#include <QLayout>
#include <QBoxLayout>
#include <QDir>
#include <QComboBox>
#include <advanceddockingsystem/dockareawidget.h>
#include <advanceddockingsystem/docksplitter.h>
@@ -399,6 +400,30 @@ void DesignModeWidget::setup()
}
});
auto workspaceComboBox = new QComboBox();
workspaceComboBox->setMinimumWidth(120);
workspaceComboBox->setToolTip(tr("Switch the active workspace."));
auto sortedWorkspaces = m_dockManager->workspaces();
Utils::sort(sortedWorkspaces);
workspaceComboBox->addItems(sortedWorkspaces);
workspaceComboBox->setCurrentText(m_dockManager->activeWorkspace());
toolBar->addWidget(workspaceComboBox);
connect(m_dockManager, &ADS::DockManager::workspaceListChanged,
workspaceComboBox, [this, workspaceComboBox]() {
workspaceComboBox->clear();
auto sortedWorkspaces = m_dockManager->workspaces();
Utils::sort(sortedWorkspaces);
workspaceComboBox->addItems(sortedWorkspaces);
workspaceComboBox->setCurrentText(m_dockManager->activeWorkspace());
});
connect(m_dockManager, &ADS::DockManager::workspaceLoaded, workspaceComboBox, &QComboBox::setCurrentText);
connect(workspaceComboBox, QOverload<int>::of(&QComboBox::activated),
m_dockManager, [this, workspaceComboBox] (int index) {
Q_UNUSED(index)
m_dockManager->openWorkspace(workspaceComboBox->currentText());
});
viewManager().enableWidgets();
readSettings();
show();