KConfig: stop exporting and installing KConfigBackend.

Summary:
It can't possibly have been used anywhere, because it's not in the KConfig
API anywhere. The intended way to use this API was by providing a plugin
that would derive from KConfigBackend but the plugin loading code
in KConfigBackend::create has been disabled since before KF 5.0.

The reason I want to stop exporting this class is to be able to
optimize it (e.g. the QDateTime in it is completely unused but leads
to data races due to tzset)

Test Plan: Note, I'll rename it to _p.h if we agree, it would just have made this diff too big.

Reviewers: mdawson

Reviewed By: mdawson

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D4604
wilder
David Faure 9 years ago
parent 160b8e4266
commit 8d2a89836f
  1. 6
      cmake/rules_PyKF5.py
  2. 2
      src/core/CMakeLists.txt
  3. 8
      src/core/kconfigbackend.h

@ -52,7 +52,6 @@ def discard_base(container, sip, matcher):
def local_container_rules():
return [
[".*", "KConfigBackend", ".*", ".*", ".*", mark_and_discard_QSharedData],
[".*", "KConfigBase", ".*", ".*", ".*", rules_engine.container_mark_abstract],
[".*KCoreConfigSkeleton.*", ".*ItemString", ".*", ".*", ".*", set_skeleton_item_base],
@ -107,11 +106,6 @@ def local_function_rules():
["KEntryMap", "setEntryOption", ".*", ".*", ".*", rules_engine.function_discard],
["KEntryMap", "findEntry", ".*", ".*", ".*", rules_engine.function_discard],
["KEntryMap", "findExactEntry", ".*", ".*", ".*", rules_engine.function_discard],
["KConfigBackend", "registerMappings", ".*", ".*", ".*", rules_engine.function_discard],
["KConfigBackend", "parseConfig", ".*", ".*", ".*", rules_engine.function_discard],
["KConfigBackend", "writeConfig", ".*", ".*", ".*", rules_engine.function_discard],
]
def local_typedef_rules():

@ -40,7 +40,6 @@ ecm_generate_headers(KConfigCore_HEADERS
HEADER_NAMES
KAuthorized
KConfig
KConfigBackend
KConfigBase
KConfigGroup
KDesktopFile
@ -66,7 +65,6 @@ if (PythonModuleGeneration_FOUND)
HEADERS
kauthorized.h
kconfig.h
kconfigbackend.h
kconfigbase.h
kconfiggroup.h
kdesktopfile.h

@ -41,11 +41,13 @@ class QDateTime;
*
* Provides the implementation for accessing configuration sources.
*
* KDELibs only provides an INI backend, but this class can be used
* KConfig only provides an INI backend, but this class can be used
* to create plugins that allow access to other file formats and
* configuration systems.
*
* \internal
*/
class KCONFIGCORE_EXPORT KConfigBackend : public QObject, public QSharedData
class KConfigBackend : public QObject, public QSharedData
{
Q_OBJECT
@ -201,10 +203,12 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(KConfigBackend::ParseOptions)
Q_DECLARE_OPERATORS_FOR_FLAGS(KConfigBackend::WriteOptions)
#if 0 // TODO re-enable if the plugin loading code is re-enabled
/**
* Register a KConfig backend when it is contained in a loadable module
*/
#define K_EXPORT_KCONFIGBACKEND(libname, classname) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();)
#endif
#endif // KCONFIGBACKEND_H

Loading…
Cancel
Save