I wonder how to design a good plugin architecture in C++/Qt. The main concern I have is about dependency injection vs globals when it comes to the core components. Plugins should have access to several core functionalities like registering a socket listener, modifiying the tray menu, have acces to the main window, starting/restarting the app, have acces to the extension pool etc...
What I wonder now is if a class PluginLoader should hold all these things and inject them in a method initialize(…………)
with a huge parameter list, or if globals are 'ok' in this context, since these core components are singletons by nature anyway.