1. 28 Apr, 2017 1 commit
    • Daniel Vrátil's avatar
      Don't use LocalDataBaseManager as a singleton · 4df06e0e
      Daniel Vrátil authored
      Instead make LocalDatabaseManager an instance-based interface for a
      singleton backend. The reason is that when running Kontact, both
      Akregator, KMail and possibly others who use WebEngineViewer would
      share the same instance of LocalDataBaseManager and connect to its
      signal. This means that when you click on a link in KMail, KMail
      requests URL check from LocalDataBaseManager singleton and the
      singleton emits a signal, the signal is delivered to all
      applications that are connected to it, not just KMail. This results
      in each application opening the link.
      This patch removes the singleton from LocalDataBaseManager and makes
      each WebEngineView own its own instance of LocalDataBaseManager.
      Internally, the actual implementation is still a singleton, however
      the public interface is non-singleton, which means that each application
      is connected to its own LocalDataBaseManager instance, thus avoiding
      the issue described above.
      Differential Review: https://phabricator.kde.org/D5577