diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-05-06 10:24:25 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-05-06 10:24:25 (GMT) |
commit | 578003cf087f663d23d5d67f96df75c9d50f9456 (patch) | |
tree | 1a03a9aca6ee9edb37fb5b5f50718045ab1a1e8b | |
parent | d873afaa7adfc5e633191332d0674aa1977904d1 (diff) | |
download | Qt-578003cf087f663d23d5d67f96df75c9d50f9456.zip Qt-578003cf087f663d23d5d67f96df75c9d50f9456.tar.gz Qt-578003cf087f663d23d5d67f96df75c9d50f9456.tar.bz2 |
Fix tst_qaccessibility::accelerators on Mac
QAccessibleInterface::text(QAccessibile::Accelerator) returns
the Mac symbol for the key known as ALT on other platforms, so
we must use QKeySequence::NativeText when verifying.
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index e5a332a..b96323e 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -4073,7 +4073,8 @@ void tst_QAccessibility::accelerators() window->show(); QAccessibleInterface *accLineEdit = QAccessible::queryAccessibleInterface(le); - QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString() + QLatin1String("L")); + QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString(QKeySequence::NativeText) + QLatin1String("L")); + QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString(QKeySequence::NativeText) + QLatin1String("L")); label->setText(tr("Q &")); QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QString()); label->setText(tr("Q &&")); @@ -4081,11 +4082,11 @@ void tst_QAccessibility::accelerators() label->setText(tr("Q && A")); QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QString()); label->setText(tr("Q &&&A")); - QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString() + QLatin1String("A")); + QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString(QKeySequence::NativeText) + QLatin1String("A")); label->setText(tr("Q &&A")); QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QString()); label->setText(tr("Q &A&B")); - QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString() + QLatin1String("A")); + QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString(QKeySequence::NativeText) + QLatin1String("A")); #if defined(Q_WS_X11) qt_x11_wait_for_window_manager(window); |