Review Request 117185: Remove KPluginLoader dependency on KService
Alex Merry
alex.merry at kde.org
Sun Mar 30 11:28:14 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117185/
-----------------------------------------------------------
(Updated March 30, 2014, 11:28 a.m.)
Review request for KDE Frameworks and David Faure.
Changes
-------
Make "KService::operator KPluginName()" const (fixes compilation of kcmutils and other modules).
Repository: kservice
Description
-------
Remove KPluginLoader dependency on KService
The reason for this is so that KPluginLoader, KPluginFactory and
kexportplugin.h do not require anything else from the KService
framework, allowing them to be moved to KCoreAddons.
A KPluginName class is introduced to act as an intermediary between
KService and KPluginLoader. The KPluginLoader(KService) constructor is
replaced with KPluginLoader(KPluginName), and KService gains a cast
operator to convert it to a KPluginName.
Now
KService service("blah.desktop");
KPluginLoader(service);
works as before, maintaining source compatibility.
The reason for the intermediary class (rather than just, say, providing
a QString() operator to KService) is to make sure this combination is
the only one that works (and you can't start using KService everywhere a
QString is expected).
Diffs (updated)
-----
autotests/CMakeLists.txt dcc4a40bd81f7e17f10219649214a8c9aac5cc60
autotests/jsonplugin.h PRE-CREATION
autotests/jsonplugin.cpp PRE-CREATION
autotests/jsonplugin.json PRE-CREATION
autotests/kpluginloadertest.cpp 2b0afb81469f18f93ea43e6ac73df95a60cbd7f3
autotests/kservicetest.h aa1c691c75c9e5b6903bcbf6e2dc95809ee1ce21
autotests/kservicetest.cpp 796abbcc6313d2cfd69bd213281ea30dfebaa421
autotests/noplugin.desktop PRE-CREATION
src/plugin/kpluginloader.h 4e10edf0f152b409c6a4031610ff1f2f9771d08d
src/plugin/kpluginloader.cpp 1602c180db5e1a5f0765d95d68f90d2046c9ef2b
src/services/kservice.h 6df389a130587eea732b1d81718181bbd3df4f6d
src/services/kservice.cpp c897d4c2a08d048e817154101b3a212a098f9768
Diff: https://git.reviewboard.kde.org/r/117185/diff/
Testing
-------
Builds, tests pass.
Thanks,
Alex Merry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140330/c142782e/attachment.html>
More information about the Kde-frameworks-devel
mailing list