Enter/Return should cause an edit inside an itemview on OS X

This was available before but was protected with the wrong define for OS
X, so this is changed to the right define.

Task-number: QTBUG-23696
             QTBUG-23703
Change-Id: I669a6cf2ff7c01020693adff9f04a4b8b9404d02
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Andy Shaw 2014-12-09 15:10:09 +01:00
parent cebd6d59cb
commit 906577c8b0
3 changed files with 2 additions and 8 deletions

View File

@ -2388,7 +2388,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
}
#endif
break;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
case Qt::Key_Enter:
case Qt::Key_Return:
// Propagate the enter if you couldn't edit the item and there are no
@ -2418,7 +2418,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
selectAll();
break;
}
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
if (event->key() == Qt::Key_O && event->modifiers() & Qt::ControlModifier && currentIndex().isValid()) {
emit activated(currentIndex());
break;

View File

@ -1299,9 +1299,6 @@ void tst_QFiledialog::clearLineEdit()
#endif
QTest::qWait(2000);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23703", Abort);
#endif
QVERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
QVERIFY(!lineEdit->text().isEmpty());

View File

@ -861,9 +861,6 @@ void tst_QTreeView::editTriggers()
}
// Check if we got an editor
#ifdef Q_OS_MAC
QEXPECT_FAIL("EditKeyPressed 4", "QTBUG-23696", Continue);
#endif
QTRY_COMPARE(view.findChild<QLineEdit *>(QString()) != 0, editorOpened);
}