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>bb10
parent
766775f6a0
commit
30a9c8fe8a
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue