Revert "Fix issue with snippet variables not behaving correctly on Gnome"

This reverts commit e693c9a02e.

The workaround filters out the last input mehtod event when deleting
characters with backspace leading to unwanted side effects. Also we
were not able to reproduce the original issue with the latest Qt neither
on Debian nor Ubuntu with GNOME.

Fixes: QTCREATORBUG-21483
Change-Id: I986d48216b5f62b0f67fc62f94f8e876bbea23d2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2018-11-22 14:42:08 +01:00
parent bd493f963d
commit 25a135ef95

View File

@@ -3020,14 +3020,6 @@ void TextEditorWidget::contextMenuEvent(QContextMenuEvent *e)
void TextEditorWidget::inputMethodEvent(QInputMethodEvent *e)
{
if (e->commitString().isEmpty() && e->preeditString().isEmpty() && e->attributes().isEmpty()) {
// Avoid doing anything when getting bogus events as it can happen on Gnome desktop.
// Otherwise QPlainTextEdit will report content changes for locations where factually
// nothing changed.
// Workaround for QTCREATORBUG-19571
e->accept();
return;
}
if (d->m_inBlockSelectionMode) {
if (!e->commitString().isEmpty())
d->insertIntoBlockSelection(e->commitString());