Skip to content

KPluginFactory: Improve logging and error reporting

ivan tkachenko requested to merge (removed):fixes into master

In case of empty QString fileName(), it used to spam lots of warnings which only pollutes journal while not being helpful for troubleshooting. It is completely normal that fileName() may be empty, as per docs:

the metadata could also refer to a non-C++ plugin

Next, the errorText member is not supposed to mirror user-facing translatable text. In bluez and KJob, for example, it is

some extra data associated with the error, such as a URL

... which in our case translates to "plugin file name". Also, printing it in this new way gets rid of double quotes around the whole message -- something that could've been fixed with .noquote() call on a stream.

Merge request reports