On Donnerstag, 8. August 2013 11:24:35 CEST, Kevin Krammer wrote:

I think what Thomas was suggesting was to make the action objects directly accessible instead of making Qt traverse the QObject tree to find them.
Exactly.
Whether unilateral changes in the XML menu file breaks things doesn't matter. 
Unilateral changes always break things.

Problem is, that if you scatter around such weak dependencies, you'll have much 
fun to figure why things broke.
If TrojitaPart tries to access befriended private m_window->composeMail, gcc will 
tell you that it's gone (because action_compose_mail changed to action_compose_message 
and m_window->composeMail turned m_window->composeMessage) - or actually not break 
at all (if you changed the name and kept the variable)

If it tries to find an object with a proper name, changing just that name makes 
things *silently* break and you can go hunt for the reason and change when the 
first bug reports turn in.


- MainWindow could have a method that returns all actions in a list
This carries the same problem, i'd say (object identification) - everything 
else is unobjected by me and the project maintainer may happily pick his 
preference :-P

Cheers,
Thomas

Reply via email to