Accessibility: make sure right objects are cached on linux

This patch goes together with 730a5a994f
and is the second code path that deals with the hash of valid objects.

Change-Id: Ia7b0995cb667cfce5f7697aa61856e44f745a932
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Frederik Gladhorn 2012-10-19 11:13:09 +02:00 committed by The Qt Project
parent 31b4507cf4
commit e6258e390a

View File

@ -1507,7 +1507,7 @@ QString AtSpiAdaptor::pathForObject(QObject *object) const
qAtspiDebug() << "AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.";
}
quintptr uintptr = reinterpret_cast<quintptr>(object);
if (!m_handledObjects.contains(uintptr))
if (!m_handledObjects.contains(uintptr) || m_handledObjects.value(uintptr) == 0)
m_handledObjects[uintptr] = QPointer<QObject>(object);
return QLatin1String(QSPI_OBJECT_PATH_PREFIX) + QString::number(uintptr);
}