diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2014-11-13 21:36:47 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2014-11-14 21:01:46 +0100 |
commit | 30a9c8fe8adcb4d7f476484b3215dd1e87b40fe9 (patch) | |
tree | 317f33e81a788c48d82bbcf8acb7db605a378899 /src/widgets/itemviews | |
parent | 766775f6a0aeff1d21877518d9f7eecf44af559b (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')
-rw-r--r-- | src/widgets/itemviews/qitemdelegate.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qstyleditemdelegate.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp index ef14ab8ed5..c261fa72c0 100644 --- a/src/widgets/itemviews/qitemdelegate.cpp +++ b/src/widgets/itemviews/qitemdelegate.cpp @@ -1188,11 +1188,11 @@ bool QItemDelegate::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; 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; |