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:
parent
cebd6d59cb
commit
906577c8b0
@ -2388,7 +2388,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_OS_MAC
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
case Qt::Key_Return:
|
case Qt::Key_Return:
|
||||||
// Propagate the enter if you couldn't edit the item and there are no
|
// Propagate the enter if you couldn't edit the item and there are no
|
||||||
@ -2418,7 +2418,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
|
|||||||
selectAll();
|
selectAll();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_OS_MAC
|
||||||
if (event->key() == Qt::Key_O && event->modifiers() & Qt::ControlModifier && currentIndex().isValid()) {
|
if (event->key() == Qt::Key_O && event->modifiers() & Qt::ControlModifier && currentIndex().isValid()) {
|
||||||
emit activated(currentIndex());
|
emit activated(currentIndex());
|
||||||
break;
|
break;
|
||||||
|
@ -1299,9 +1299,6 @@ void tst_QFiledialog::clearLineEdit()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
QTest::qWait(2000);
|
QTest::qWait(2000);
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QEXPECT_FAIL("", "QTBUG-23703", Abort);
|
|
||||||
#endif
|
|
||||||
QVERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
|
QVERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
|
||||||
QVERIFY(!lineEdit->text().isEmpty());
|
QVERIFY(!lineEdit->text().isEmpty());
|
||||||
|
|
||||||
|
@ -861,9 +861,6 @@ void tst_QTreeView::editTriggers()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if we got an editor
|
// 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);
|
QTRY_COMPARE(view.findChild<QLineEdit *>(QString()) != 0, editorOpened);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user