forked from qt-creator/qt-creator
Inspector: Set the context of console
The current selected item in the inspector view is set as the context of the console. Task-number: QTCREATORBUG-7439 Change-Id: Ibc980218751ce4afacf714cf1ab34f0a36550b2c Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
#include <QSplitter>
|
||||
#include <QStackedWidget>
|
||||
|
||||
const int LOCAL_WIDGET_INDEX = 0;
|
||||
const int INSPECTOR_WIDGET_INDEX = 1;
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -79,7 +82,13 @@ void LocalsAndExpressionsWindow::setShowLocals(bool showLocals)
|
||||
|
||||
void LocalsAndExpressionsWindow::showLocals()
|
||||
{
|
||||
m_localsAndInspector->setCurrentIndex(m_showLocals ? 0 : 1);
|
||||
m_localsAndInspector->setCurrentIndex(m_showLocals ? LOCAL_WIDGET_INDEX
|
||||
: INSPECTOR_WIDGET_INDEX);
|
||||
}
|
||||
|
||||
QWidget *LocalsAndExpressionsWindow::inspectorWidget() const
|
||||
{
|
||||
return m_localsAndInspector->widget(INSPECTOR_WIDGET_INDEX);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user