Changeset View
Standalone View
src/core/kconfigbackend.h
Show All 35 Lines | |||||
36 | class QByteArray; | 36 | class QByteArray; | ||
37 | class QDateTime; | 37 | class QDateTime; | ||
38 | 38 | | |||
39 | /** | 39 | /** | ||
40 | * \class KConfigBackend kconfigbackend.h <KConfigBackend> | 40 | * \class KConfigBackend kconfigbackend.h <KConfigBackend> | ||
41 | * | 41 | * | ||
42 | * Provides the implementation for accessing configuration sources. | 42 | * Provides the implementation for accessing configuration sources. | ||
43 | * | 43 | * | ||
44 | * KDELibs only provides an INI backend, but this class can be used | 44 | * KConfig only provides an INI backend, but this class can be used | ||
45 | * to create plugins that allow access to other file formats and | 45 | * to create plugins that allow access to other file formats and | ||
46 | * configuration systems. | 46 | * configuration systems. | ||
47 | * | ||||
48 | * \internal | ||||
47 | */ | 49 | */ | ||
48 | class KCONFIGCORE_EXPORT KConfigBackend : public QObject, public QSharedData | 50 | class KConfigBackend : public QObject, public QSharedData | ||
49 | { | 51 | { | ||
50 | Q_OBJECT | 52 | Q_OBJECT | ||
51 | 53 | | |||
52 | public: | 54 | public: | ||
53 | /** | 55 | /** | ||
54 | * Creates a new KConfig backend. | 56 | * Creates a new KConfig backend. | ||
55 | * | 57 | * | ||
56 | * If no @p system is given, or the given @p system is unknown, this method tries | 58 | * If no @p system is given, or the given @p system is unknown, this method tries | ||
▲ Show 20 Lines • Show All 139 Lines • ▼ Show 20 Line(s) | |||||
196 | 198 | | |||
197 | private: | 199 | private: | ||
198 | KConfigBackendPrivate *const d; | 200 | KConfigBackendPrivate *const d; | ||
199 | }; | 201 | }; | ||
200 | 202 | | |||
201 | Q_DECLARE_OPERATORS_FOR_FLAGS(KConfigBackend::ParseOptions) | 203 | Q_DECLARE_OPERATORS_FOR_FLAGS(KConfigBackend::ParseOptions) | ||
202 | Q_DECLARE_OPERATORS_FOR_FLAGS(KConfigBackend::WriteOptions) | 204 | Q_DECLARE_OPERATORS_FOR_FLAGS(KConfigBackend::WriteOptions) | ||
203 | 205 | | |||
206 | #if 0 // TODO re-enable if the plugin loading code is re-enabled | ||||
204 | /** | 207 | /** | ||
205 | * Register a KConfig backend when it is contained in a loadable module | 208 | * Register a KConfig backend when it is contained in a loadable module | ||
206 | */ | 209 | */ | ||
207 | #define K_EXPORT_KCONFIGBACKEND(libname, classname) \ | 210 | #define K_EXPORT_KCONFIGBACKEND(libname, classname) \ | ||
208 | K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) | 211 | K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) | ||
212 | #endif | ||||
mdawson: I don't think this is worth saving as a comment, just remove it completely. If we decide to… | |||||
In general I agree that leaving dead code is bad. In this particular case, though, the other side of the plugin code is still there Alternatively, we decide that plugin-based backends are not even on the far-future radar and we clean up both sides completely. Works for me too. The whole idea was crazy anyway (apps make assumptions about config files being files, if one day we change that for e.g. something like gconf then it won't be as transparent as just switching to a different backend). dfaure: In general I agree that leaving dead code is bad.
In this particular case, though, the other… | |||||
Sure, #if 0 is best since it has the code, and they will at least match. I'd actually like to try and bring this back sometime, but as you say it would be very difficult. I don't know if it will ever come to pass, so I don't want to hold up actual improvements for a nice to have. I definitely don't know if it would ever be plugin based, or just built into KConfig. mdawson: Sure, #if 0 is best since it has the code, and they will at least match.
I'd actually like to… | |||||
209 | 213 | | |||
210 | #endif // KCONFIGBACKEND_H | 214 | #endif // KCONFIGBACKEND_H |
I don't think this is worth saving as a comment, just remove it completely. If we decide to undo this, it's in git.