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>
bb10
Jan Arve Saether 2013-09-23 15:07:00 +02:00 committed by The Qt Project
parent f5b3224cb5
commit bb9cc387f0
2 changed files with 8 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);