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:
Daniel Teske
2014-01-09 17:49:00 +01:00
parent 06f35cbbd0
commit c1ff105a0c

View File

@@ -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);