diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-10-28 06:45:26 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-10-28 06:45:26 (GMT) |
commit | 9acfff1792cf9aa13d6dc213369ac620a203c22a (patch) | |
tree | 9f102a59aec5ea119c1049c996ec56013d8fb208 /tools | |
parent | 55a3fcd7b2fe9cd43f3c0c20d75aaef056a05c5b (diff) | |
download | Qt-9acfff1792cf9aa13d6dc213369ac620a203c22a.zip Qt-9acfff1792cf9aa13d6dc213369ac620a203c22a.tar.gz Qt-9acfff1792cf9aa13d6dc213369ac620a203c22a.tar.bz2 |
Use ShellMode for creator plugin expression widget.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmldebugger/creatorplugin/qmlinspectormode.cpp | 2 | ||||
-rw-r--r-- | tools/qmldebugger/standalone/expressionquerywidget.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp b/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp index a90ca2c..5881cd1 100644 --- a/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp +++ b/tools/qmldebugger/creatorplugin/qmlinspectormode.cpp @@ -385,7 +385,7 @@ void QmlInspectorMode::initWidgets() m_propertiesWidget = new ObjectPropertiesView; m_watchTableView = new WatchTableView(m_watchTableModel); m_frameRateWidget = new CanvasFrameRate; - m_expressionWidget = new ExpressionQueryWidget(ExpressionQueryWidget::SeparateEntryMode); + m_expressionWidget = new ExpressionQueryWidget(ExpressionQueryWidget::ShellMode); // FancyMainWindow uses widgets' window titles for tab labels m_objectTreeWidget->setWindowTitle(tr("Object Tree")); diff --git a/tools/qmldebugger/standalone/expressionquerywidget.cpp b/tools/qmldebugger/standalone/expressionquerywidget.cpp index 3c4296d..e064189 100644 --- a/tools/qmldebugger/standalone/expressionquerywidget.cpp +++ b/tools/qmldebugger/standalone/expressionquerywidget.cpp @@ -42,6 +42,7 @@ ExpressionQueryWidget::ExpressionQueryWidget(Mode mode, QmlEngineDebug *client, m_lineEdit->installEventFilter(this); } else { m_textEdit->installEventFilter(this); + appendPrompt(); } } @@ -55,6 +56,8 @@ void ExpressionQueryWidget::clear() m_textEdit->clear(); if (m_lineEdit) m_lineEdit->clear(); + if (m_mode == ShellMode) + appendPrompt(); } void ExpressionQueryWidget::updateTitle() @@ -99,6 +102,12 @@ void ExpressionQueryWidget::checkCurrentContext() void ExpressionQueryWidget::showCurrentContext() { + if (m_mode == ShellMode) { + // clear the initial prompt + if (m_textEdit->document()->lineCount() == 1) + m_textEdit->clear(); + } + m_textEdit->moveCursor(QTextCursor::End); m_textEdit->setTextColor(Qt::darkGreen); m_textEdit->append(m_currObject.className() |