QmlConsole: Remove zero width space

Zero width space is inserted at every punctuation to
serve as a potential line break. All occurrences should
be removed before sending the expression to JS engine
for evaluation.

Task-number: QTCREATORBUG-8859

Change-Id: I170dfd5fb0f1122ed945bb2e5f77ecaad925004b
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Aurindam Jana
2013-03-05 10:50:26 +01:00
committed by Kai Koehne
parent f57795aaf2
commit 7bba366482
7 changed files with 19 additions and 7 deletions

View File

@@ -313,7 +313,7 @@ void QmlConsoleItemDelegate::setEditorData(QWidget *editor,
const QModelIndex &index) const
{
QmlConsoleEdit *edtr = qobject_cast<QmlConsoleEdit *>(editor);
edtr->insertPlainText(index.data(Qt::DisplayRole).toString());
edtr->insertPlainText(index.data(QmlConsoleItemModel::ExpressionRole).toString());
}
void QmlConsoleItemDelegate::setModelData(QWidget *editor,