Skip to content

Use correct variable to denote that ResourcesModel is done initializing

Nate Graham requested to merge ngraham/discover:fix-wrong-variable-usage into master

This merge request contains two commits which should not be squashed:

commit d3def74e13f9236a8b21338dbc146b897aa00532 (HEAD -> fix-wrong-variable-usage)
Author: Nate Graham <nate@kde.org>
Date:   Mon Aug 8 14:26:48 2022 -0600

    Rename m_initializingBackends to m_initializingBackendsCount for clarity
    
    This way it'll be clear just from looking at its name that it holds an
    int, not a bool. This should make it harder to accidentally use it in
    place of m_isInitializing in the future.
commit 31fd4a4db304188deb351ae59e4c2765280562bb
Author: Nate Graham <nate@kde.org>
Date:   Mon Aug 8 14:22:32 2022 -0600

    Use correct variable to denote that ResourcesModel is done initializing
    
    Due to somewhat confusing variable naming, we were accidentally setting
    m_initializingBackends to false, when that variable actually holds the
    number of backends that are still initializing. Instead we need to set
    m_isInitializing to false.
    
    This fixes a bug where the placeholder message for the MIME type screen
    would fail to appear as expected, because one of the conditions in its
    opacity property was `!ResourcesModel.isInitializing` and that was never
    getting set to false.
    
    BUG: 457528
    FIXED-IN: 5.24.7

I would like to cherry-pick the bugfix commit to 5.24.

BUG: 457528

cc @apol @nicolasfella

Merge request reports