Skip to content
  • hjk's avatar
    TreeModel: Take responsibility for some of the casting · 7a80f2f0
    hjk authored
    
    
    This adds a templated layer on top of TreeModel that can specify
    item types for the top three layers in the model, relieving user
    code from some of the previously necessary type casting.
    
    Two common setups get an extra layer with convenience functions
    on top: TwoLevelTreeModel for two-level model with a first level
    of static headers and a uniform second level, and UniformTreeModel
    where all non-root nodes are the same.
    
    "Untyped" plain TreeModels are still possible.
    
    The walkTree() feature and untyped iteration in the base
    TreeItem and TreeModel is retained for now to ease transition
    in downstream modules, but is planned to be removed soon.
    
    Change-Id: I67d75a1a4e18e8f254dbfb458db03510d8990d8b
    Reviewed-by: default avatarEike Ziller <eike.ziller@qt.io>
    7a80f2f0