forked from qt-creator/qt-creator
BaseTextEditWidget: Forward everything with ControlModifier to QPTE
Task-number: QTCREATORBUG-11137 Change-Id: Icd1bd55cb8bb3087667b01e18b6774987971601b Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1805,7 +1805,8 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
||||
return;
|
||||
}
|
||||
|
||||
if (ro || e->text().isEmpty() || !e->text().at(0).isPrint()) {
|
||||
if (ro || e->text().isEmpty() || !e->text().at(0).isPrint()
|
||||
|| (e->modifiers() & (Qt::ControlModifier|Qt::AltModifier)) == Qt::ControlModifier) {
|
||||
if (!cursorMoveKeyEvent(e)) {
|
||||
QTextCursor cursor = textCursor();
|
||||
bool cursorWithinSnippet = false;
|
||||
@@ -1823,7 +1824,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
||||
d->m_snippetOverlay->updateEquivalentSelections(textCursor());
|
||||
}
|
||||
}
|
||||
} else if ((e->modifiers() & (Qt::ControlModifier|Qt::AltModifier)) != Qt::ControlModifier){
|
||||
} else {
|
||||
QTextCursor cursor = textCursor();
|
||||
QString text = e->text();
|
||||
const QString &autoText = d->m_autoCompleter->autoComplete(cursor, text);
|
||||
|
||||
Reference in New Issue
Block a user