Revert "BaseTextEditWidget: Forward everything with ControlModifier to QPTE"

Lead to annoying behavior that pressing any disabled shortcut with control
modifier would lead to unwanted characters in the editor.
This reverts commit c1ff105a0c.

Change-Id: If61e52be9f11cabeafb46f5d71b901b4eab8e169
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-01-20 10:12:11 +01:00
parent e51fbd2009
commit 83c61f2eaf

View File

@@ -1808,8 +1808,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
return;
}
if (ro || e->text().isEmpty() || !e->text().at(0).isPrint()
|| (e->modifiers() & (Qt::ControlModifier|Qt::AltModifier)) == Qt::ControlModifier) {
if (ro || e->text().isEmpty() || !e->text().at(0).isPrint()) {
if (!cursorMoveKeyEvent(e)) {
QTextCursor cursor = textCursor();
bool cursorWithinSnippet = false;
@@ -1827,7 +1826,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
d->m_snippetOverlay->updateEquivalentSelections(textCursor());
}
}
} else {
} else if ((e->modifiers() & (Qt::ControlModifier|Qt::AltModifier)) != Qt::ControlModifier){
QTextCursor cursor = textCursor();
QString text = e->text();
const QString &autoText = d->m_autoCompleter->autoComplete(cursor, text);