forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user