diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2013-09-23 15:07:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-23 16:08:34 +0200 |
commit | bb9cc387f09abd4ae8819f1470cb275842b85a44 (patch) | |
tree | a372abae749c2995bca82f7660994faf14977df9 | |
parent | f5b3224cb5321b8b3ffefff13f547fbe81ea0c7c (diff) |
Fix a c&p bug in the IA2 bridge when returning the row description
Unfortunately we returned the column description when the AT client
asked for the row description....
Change-Id: I46bc0edb4fd0f7cc6d98d7d6e0d8ca6f77553a26
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
-rw-r--r-- | src/plugins/platforms/windows/accessible/iaccessible2.cpp | 2 | ||||
-rw-r--r-- | tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index a0f2c1812f..9170c774b4 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -955,7 +955,7 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_rowDescription(long row, BS *description = 0; if (QAccessibleTableInterface *tableIface = tableInterface()) { - const QString qtDesc = tableIface->columnDescription(row); + const QString qtDesc = tableIface->rowDescription(row); if (!qtDesc.isEmpty()) *description = QStringToBSTR(qtDesc); } diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index b03aafcf0d..0a705949f3 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -3481,8 +3481,13 @@ void tst_QAccessibility::bridgeTest() BSTR bstrDescription; hr = ia2Table->get_columnDescription(0, &bstrDescription); QVERIFY(SUCCEEDED(hr)); - const QString description((QChar*)bstrDescription); - QCOMPARE(description, QLatin1String("h1")); + QCOMPARE(QString::fromWCharArray(bstrDescription), QLatin1String("h1")); + ::SysFreeString(bstrDescription); + + hr = ia2Table->get_rowDescription(1, &bstrDescription); + QVERIFY(SUCCEEDED(hr)); + QCOMPARE(QString::fromWCharArray(bstrDescription), QLatin1String("v2")); + ::SysFreeString(bstrDescription); IAccessible *accTableCell = 0; hr = ia2Table->get_cellAt(1, 2, (IUnknown**)&accTableCell); |