Go to file
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
bin fixqt4headers: Fix typo in QtMultimedia headers module name 2013-01-18 17:58:48 +01:00
config.tests Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
dist Revert "Added note in the README" 2013-01-15 15:49:56 +01:00
doc Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
examples Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
lib
mkspecs Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmake Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
src Make hierarchy of actions in menubars more consistent. 2013-01-21 18:57:27 +01:00
tests Make hierarchy of actions in menubars more consistent. 2013-01-21 18:57:27 +01:00
tools Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
util Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
.gitattributes
.gitignore Add qmake generated files to .gitignore. 2012-12-19 21:31:58 +01:00
.qmake.conf don't auto-install example sources by default for all modules 2012-12-03 15:56:28 +01:00
.tag
configure Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
configure.bat Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL fix links in INSTALL 2012-10-10 08:45:22 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL
LICENSE.GPL
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtbase.pro rewrite default spec handling 2012-11-01 20:17:57 +01:00
sync.profile Remove compat, obsolete headers 2012-12-19 23:43:25 +01:00