Syntax: yes
Technically: this is a little bit "iffy"
First problem: are you sure that dmgr is always valid? If dmgr isn't valid at some point, your code will most likely crash.
Second problem: are you sure that customerModel() always returns a valid pointer? Again, this might crash your program.
You don't need to create a new standard item model first. The dmgr object will provide the one you want.
However, I do not see any safety checks or any guarantees that the model object is valid and existing.





Reply With Quote
Bookmarks