Skip to content
  • Nikolai Kosjar's avatar
    CppTools: Fix propagating unsaved files · b4d6884c
    Nikolai Kosjar authored
    
    
    On project loading ExtraCompiler objects are created that might read the
    already existing ui_*.h files in the build directory. In this case,
    ExtraCompiler::setContent() is called, which will emit a signal about
    the modified content.
    
    Now GeneratedCodeModelSupport is a client of this signal and it forwards
    the changed contents to the clang code model. However,
    GeneratedCodeModelSupport objects might be created later and miss the
    initial signal emission, thus leaving the code model unaware of some
    unsaved files.
    
    Fix by notifying the code model at construction time of
    GeneratedCodeModelSupport.
    
    Change-Id: I7311867ad7f534920357801647bd2d0c82bb4edb
    Reviewed-by: default avatarUlf Hermann <ulf.hermann@qt.io>
    Reviewed-by: default avatarTobias Hunger <tobias.hunger@qt.io>
    b4d6884c