Allow preferring a specific backend in backendloader
ClosedPublic

Authored by sebas on Apr 5 2016, 11:44 PM.

Details

Summary

The name argument to loadBackendPlugin is used from the external backend
launcher, but was not considered when loading the backend plugin. That
means that loading the Fake backend using the out-of-process mechanism
failed, since the backend isn't passed and the runtime-detected plugin
would be loaded - that's never the Fake backend.

This patch passes the name argument into preferredBackend, and if
supplied, it's the preferred filter for the installed backend list.

Test Plan
  • added autotest
  • ran kscreen_backend_launcher Fake" on the command line, verified that the Fake backend is loaded

Diff Detail

Repository
R110 KScreen Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sebas updated this revision to Diff 3146.Apr 5 2016, 11:44 PM
sebas retitled this revision from to Allow preferring a specific backend in backendloader.
sebas updated this object.
sebas edited the test plan for this revision. (Show Details)
sebas added a reviewer: graesslin.
broulik added inline comments.
src/backendmanager.cpp
138

*if not empty

graesslin added inline comments.Apr 6 2016, 10:49 AM
autotests/testbackendloader.cpp
70

QStringLiteral

71

QLatin1String

src/backendmanager.cpp
148–151

should the name really override the environment variable?

src/backendmanager_p.h
67–68

@p name

79

I don't really like the argument name "name" - can that be a little bit more specific on what it's about?

sebas added inline comments.Apr 6 2016, 2:35 PM
src/backendmanager.cpp
148–151

Yes, the logic is that if you are doing an explicit call to the API, you get what you ask for, if not, "auto resolution" is tried.

sebas updated this revision to Diff 3164.Apr 6 2016, 2:41 PM
sebas marked 2 inline comments as done.

address comment

sebas marked 2 inline comments as done.Apr 6 2016, 2:41 PM
graesslin accepted this revision.Apr 7 2016, 1:02 PM
graesslin edited edge metadata.
This revision is now accepted and ready to land.Apr 7 2016, 1:02 PM
This revision was automatically updated to reflect the committed changes.