summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@digia.com>2012-09-27 11:32:18 +0200
committerTobias Hunger <tobias.hunger@digia.com>2012-09-27 12:23:50 +0200
commitb1bb59aeff1717c82e74bc00cdfd82e21879bd12 (patch)
treeaccc81d9d7b603593a4704a4dbc532fb5d2d515d /src/plugins/texteditor
parent069ad73fb66b1c2e0b12c36821ea574008c5143e (diff)
downloadqt-creator-b1bb59aeff1717c82e74bc00cdfd82e21879bd12.tar.gz
Editor: Fix autocompletion under Qt5
Change-Id: Id8ce9ebe53823abe211e43c7c44ec19a24ed63f5 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r--src/plugins/texteditor/basetexteditor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index 606629d667..21ce348c16 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -2099,7 +2099,12 @@ QChar BaseTextEditorWidget::characterAt(int pos) const
bool BaseTextEditorWidget::event(QEvent *e)
{
+#if QT_VERSION >= 0x050000
+ if (e->type() != QEvent::InputMethodQuery)
+ d->m_contentsChanged = false;
+#else
d->m_contentsChanged = false;
+#endif
switch (e->type()) {
case QEvent::ShortcutOverride:
if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape && d->m_snippetOverlay->isVisible()) {