• Mike Kaganski's avatar
    Make handled flags for Java interaction handler static · 1710f23e
    Mike Kaganski yazdı
    In commit 5785e4f4, initial work to only
    show Java error dialogs once had been done. Still, in some cases, multiple
    such dialogs can still be shown.
    
    JavaInteractionHandler instances can be created in at least two contexts:
    in JavaContext::getValueByName, and in DesktopContext::getValueByName.
    Additionally, in the latter, it is not kept for subsequent reuse, but re-
    created anew each time. So, it is possible that "Java Missing" (and friends)
    dialogs will be shown multiple times per session. E.g., specific installed
    extensions (not using Java, but rather Python) can trigger said behavior
    in Desktop::doShutdown inside BackupFileHelper::tryPushExtensionInfo.
    
    This patch makes the "already handled" flags static, thus sharing the
    status among different handler instances.
    
    Also, unchanged-after-const-initializing m_bShowErrorsOnce is removed.
    
    Change-Id: I79d40639caa9764a04af9201c7e1a6fa624f03e5
    Reviewed-on: https://gerrit.libreoffice.org/48678Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
    Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
    1710f23e
javainteractionhandler.hxx 2.2 KB