Bug 175634

Summary: Kross::ActionCollectionModel does not handle insert/remove correctly
Product: [Frameworks and Libraries] kdelibs Reporter: Dag Andersen <dag.andersen>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dag Andersen 2008-11-20 07:37:48 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Hi, here is a patch that fixes some bugs in kross.
Please review and commit if ok.
Please CC if questions, I'm not on the list

I think the changes are BC but I'm not an expert so please check.
In general, methods, signals and slots are added to the api. Existing method 
signatures are not changed.

Short description of changes:
Fixes bug in ActionCollectionModel when actions or actioncollections are 
inserted/removed.
The model did not pick up the changes properly and also the presentation was 
jumbled because stale indexes where stored.
The changes has been tested with ModelTest from qt labs using  koffice script 
manager.
Action:
* removes itself from parent ActionCollection when deleted.
* emit new signal dataChanged(Action*) when data is changed.
ActionCollection:
* new signals to enable models to pick up on inserted/removed objects.
* emits new signal dataChanged(ActionCollection*) when data is changed.
ActionCollectionModel:
* added slots to pick up on changes in the data structure