Currently we have the same KPluginLoader code all over the place with varying degrees of error handling.
To consolidate this create a helper that take a file path, a parent, args and a template parameter and returns an instantiated object or an error.
Working draft is at https://invent.kde.org/frameworks/kcoreaddons/-/commit/c4f60cf24e2dcef7e798ec9d5c815d532c1ba6c8
Open question is what return type to use, see T14312