Check accessible name when raising QAction actions.

git-svn-id: http://yate.null.ro/svn/yate/trunk@2257 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2008-10-13 15:40:25 +00:00
parent 060e52a67e
commit 2c3c0108e3
1 changed files with 7 additions and 2 deletions

View File

@ -364,6 +364,8 @@ static void setWidget(QWidget* parent, QWidget* child)
// Utility function used to get the name of a control
static bool translateName(QtWidget& w, String& name)
{
static String actionProp = "accessibleName";
if (w.invalid())
return false;
if (w.type() != QtWidget::Action)
@ -371,8 +373,11 @@ static bool translateName(QtWidget& w, String& name)
QtClient::getUtf8(name,w->objectName());
else
QtClient::getUtf8(name,w->accessibleName());
else
QtClient::getUtf8(name,w.action()->objectName());
else {
QtClient::getProperty(w.action(),actionProp,name);
if (!name)
QtClient::getUtf8(name,w.action()->objectName());
}
return true;
}