aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2017-03-21 00:11:33 +0100
committerDavid Faure <faure@kde.org>2017-02-21 00:17:01 +0100
commit8d2a89836f0f78d8164df41bd08e61a4951d07b8 (patch)
tree3dc90d6d126d80ffbb3da15abeb816c3c73f2e05
parent160b8e42664d036427a4ab7b7a40a1e754f808ea (diff)
downloadkconfig-8d2a89836f0f78d8164df41bd08e61a4951d07b8.tar.gz
kconfig-8d2a89836f0f78d8164df41bd08e61a4951d07b8.tar.bz2
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
-rw-r--r--cmake/rules_PyKF5.py6
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/kconfigbackend.h8
3 files changed, 6 insertions, 10 deletions
diff --git a/cmake/rules_PyKF5.py b/cmake/rules_PyKF5.py
index 72bee90b..3204a5e6 100644
--- a/cmake/rules_PyKF5.py
+++ b/cmake/rules_PyKF5.py
@@ -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():
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 72a46b91..ed7edba1 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -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
diff --git a/src/core/kconfigbackend.h b/src/core/kconfigbackend.h
index 7dec4b88..332a0b4e 100644
--- a/src/core/kconfigbackend.h
+++ b/src/core/kconfigbackend.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