forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.3' into 4.4
Change-Id: Ifb1dcc847ba4b32a79b349955fad5207e402cb7b
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QMenu>
|
||||
#include <QStackedWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QToolButton>
|
||||
|
||||
using namespace Debugger;
|
||||
@@ -142,6 +143,16 @@ void DebuggerMainWindow::onModeChanged(Core::Id mode)
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerMainWindow::setPerspectiveEnabled(const QByteArray &perspectiveId, bool enabled)
|
||||
{
|
||||
const int index = m_perspectiveChooser->findData(perspectiveId);
|
||||
QTC_ASSERT(index != -1, return);
|
||||
auto model = qobject_cast<QStandardItemModel*>(m_perspectiveChooser->model());
|
||||
QTC_ASSERT(model, return);
|
||||
QStandardItem *item = model->item(index, 0);
|
||||
item->setFlags(enabled ? item->flags() | Qt::ItemIsEnabled : item->flags() & ~Qt::ItemIsEnabled );
|
||||
}
|
||||
|
||||
void DebuggerMainWindow::resetCurrentPerspective()
|
||||
{
|
||||
loadPerspectiveHelper(m_currentPerspectiveId, false);
|
||||
|
||||
Reference in New Issue
Block a user