summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qstyleditemdelegate.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-11-13 21:36:47 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-11-14 21:01:46 +0100
commit30a9c8fe8adcb4d7f476484b3215dd1e87b40fe9 (patch)
tree317f33e81a788c48d82bbcf8acb7db605a378899 /src/widgets/itemviews/qstyleditemdelegate.cpp
parent766775f6a0aeff1d21877518d9f7eecf44af559b (diff)
Q(Styled)ItemDelegate: code tidies
Fix a comment and move another out of a ifdef. Change-Id: Ib1bc2efba34bd37aa8525621e430d7f6094238ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/itemviews/qstyleditemdelegate.cpp')
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index fd4fb4440e..a5b7418285 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -659,11 +659,11 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
case Qt::Key_Return:
#ifndef QT_NO_TEXTEDIT
if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor))
- return false; // don't filter enter key events for QTextEdit
+ return false; // don't filter enter key events for QTextEdit or QPlainTextEdit
+#endif // QT_NO_TEXTEDIT
// We want the editor to be able to process the key press
// before committing the data (e.g. so it can do
// validation/fixup of the input).
-#endif // QT_NO_TEXTEDIT
if (!d->tryFixup(editor))
return true;