Skip to content
Commit 4df06e0e authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Don't use LocalDataBaseManager as a singleton

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
parent 04f595fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment