summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-05-22 16:50:30 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-05-22 16:50:30 (GMT)
commitd9ab330f613bd2c921ba00ed36b6eea8927aec80 (patch)
tree8a5337dac7617fe8e654fd4ffd1302c587967c76 /src/gui/itemviews
parentdacc8cb0b2abd5ec3e9603c9bcf5b8f489639404 (diff)
parent701bdcbc8b7751834f6d24844bcb91a23cbdc409 (diff)
downloadQt-d9ab330f613bd2c921ba00ed36b6eea8927aec80.zip
Qt-d9ab330f613bd2c921ba00ed36b6eea8927aec80.tar.gz
Qt-d9ab330f613bd2c921ba00ed36b6eea8927aec80.tar.bz2
Merge branch '4.5'
Conflicts: src/corelib/kernel/qsharedmemory_unix.cpp
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp3
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index 3b7eb2d..a748199 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -47,6 +47,7 @@
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
+#include <qplaintextedit.h>
#include <qpainter.h>
#include <qpalette.h>
#include <qpoint.h>
@@ -1194,7 +1195,7 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
case Qt::Key_Enter:
case Qt::Key_Return:
#ifndef QT_NO_TEXTEDIT
- if (qobject_cast<QTextEdit*>(editor))
+ if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor))
return false; // don't filter enter key events for QTextEdit
// We want the editor to be able to process the key press
// before committing the data (e.g. so it can do
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp
index be0971b..7f2c8ed 100644
--- a/src/gui/itemviews/qstyleditemdelegate.cpp
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp
@@ -47,6 +47,7 @@
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
+#include <qplaintextedit.h>
#include <qpainter.h>
#include <qpalette.h>
#include <qpoint.h>
@@ -646,7 +647,7 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
case Qt::Key_Enter:
case Qt::Key_Return:
#ifndef QT_NO_TEXTEDIT
- if (qobject_cast<QTextEdit*>(editor))
+ if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor))
return false; // don't filter enter key events for QTextEdit
// We want the editor to be able to process the key press
// before committing the data (e.g. so it can do