qt6-bb10/tests/auto/other
Jan Arve Saether e17dddfd3b Make hierarchy of actions in menubars more consistent.
There is an assumption that the interface returned from iface->parent()
would have iface as one of its children (thus,
parent->indexOfChild(iface)
should always return an integer != -1, indicating that it is a child.

This is a good assumption, otherwise an hierarchy would be presented
differently depending on how it is traversed.

However, a QMenu created like this:
QMenu *menu = new QMenu("weird parent", mainWindow);
mainWindow->menuBar()->addMenu(menu);

will have a different ancestor sequence than a menu created like this:

mainWindow->menuBar()->addMenu("ok parent");

This is because it will walk up the QObject hierarchy.

This patch tries to deal with that by looking at which widgets the
action of the menu is associated with before determining which should
be the accessible parent.

Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-21 18:57:27 +01:00
..
atwrapper Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
baselineexample Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
collections Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
compiler Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
exceptionsafety Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
exceptionsafety_objects Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
gestures Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
headersclean centralize headersclean test 2012-12-11 13:37:57 +01:00
lancelot Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
languagechange Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
macgui Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
macnativeevents Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
macplist Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
modeltest Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
networkselftest Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qaccessibility Make hierarchy of actions in menubars more consistent. 2013-01-21 18:57:27 +01:00
qaccessibilitylinux Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qcomplextext Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qfocusevent Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qnetworkaccessmanager_and_qprogressdialog Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qobjectperformance Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qobjectrace Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qsharedpointer_and_qwidget Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qtokenautomaton Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qvariant_common Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
windowsmobile Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
other.pro add and use qtHaveModule() function 2012-12-21 19:05:02 +01:00