Review Request: Pluggable KFileDialog/KAbstractFileModule
Sebastian Trueg
trueg at kde.org
Fri Aug 28 14:16:59 BST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1407/
-----------------------------------------------------------
(Updated 2009-08-28 13:16:59.187956)
Review request for kdelibs.
Changes
-------
Fallback to default if loading failed.
Summary
-------
KIO already loads the widget used in the KFileDialog dynamically from libkfilemodule. The base class is KAbstractFileModule. However, the loaded lib/plugin is fixed. This small patch changes the situation making it really pluggable by using the standard KService procedure of loading plugins. It allows to easily change the file dialog implementation by creating a plugin of type "KIO/FileModule" and adding its name to the "kfilemodulerc" config file.
The reason for this is that in the GSoC Alessandro Sivieri developed a replacement for the file dialog based on Nepomuk. He tried to patch it into kdelibs but it was a mess due to all the dependencies. With this approach implementations can easily be switched.
Open issues:
* the patch uses KService::serviceByDesktopName but also contains commented code using KServiceTypeTrader. I am not sure which is preferable.
* I left in the legacy code of loading the filemodule from libkfilemodule. I suppose this should be removed.
Diffs (updated)
-----
trunk/KDE/kdelibs/kfile/CMakeLists.txt 1013393
trunk/KDE/kdelibs/kfile/kfilemodule.desktop PRE-CREATION
trunk/KDE/kdelibs/kfile/kfilemodule.h 1013393
trunk/KDE/kdelibs/kfile/kfilemodule.cpp 1013393
trunk/KDE/kdelibs/kio/CMakeLists.txt 1013393
trunk/KDE/kdelibs/kio/kfile/kfiledialog.cpp 1013393
trunk/KDE/kdelibs/kio/kfile/kiofilemodule.desktop PRE-CREATION
Diff: http://reviewboard.kde.org/r/1407/diff
Testing
-------
Thanks,
Sebastian
More information about the kde-core-devel
mailing list