[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: KConfig issues prevent compiling KDE applications under Windows
From:       Stephen Kelly <steveire () gmail ! com>
Date:       2017-02-04 9:46:41
Message-ID: 38062576-c66f-9b9e-4d90-c99ab9726393 () gmail ! com
[Download RAW message or body]

On 02/04/2017 08:14 AM, Matthew Dawson wrote:
> On Thursday, February 2, 2017 10:08:53 PM EST Jaroslaw Staniek wrote:
>> On 1 February 2017 at 14:34, David Faure <faure@kde.org> wrote:
>>> One note though: this is a failure to link a unittest, your release isn't
>>> blocked, you can just disable the building of unittests in kconfig.
>>>
>>> The double definition can be explained, the unittest links to
>>> KF5ConfigCore
>>> and then also compiles in ../src/core/kconfigdata.cpp because that class
>>> is not
>>> exported.
>> Hi,
>> Apparently it is since eab822e20620 (Jan 15).
>> ​The bug #​375654 does not seem to provide version info but the fix isn't
>> just released, right? CC'd Stephen Kelly.
> It seems this class was exported so it can be accessed through the Python 
> bindings.  Considering it wasn't exported before, I'm wondering why it was 
> exported for Python?
>
> Since removing it would be an ABI for Python scripts and the tagging is 
> happening today, can we just back out the KEntryMap API from Python?  We can 
> add it back for the next release if there is a use case for it.
>
> @David Faure, when do you plan on tagging this change?  For now I committed a 
> change to the auto test so it will at least build on Windows 
> (b939b48f8d5e5eaf9a51a7e9bda2ad8cedca27d9) which should be included.  Would 
> there be time to remove KEntryMap before the tag/release?


In case you want to not export the class instead, the attached should work.


Thanks,

Steve.



["0001-Don-t-export-KEntryMap.patch" (text/x-patch)]

From c92bbb5b5978c4bf6a1b93082114a7d84e0d7d43 Mon Sep 17 00:00:00 2001
From: Stephen Kelly <steveire@gmail.com>
Date: Sat, 4 Feb 2017 09:45:19 +0000
Subject: [PATCH] Don't export KEntryMap

It is internal.
---
 autotests/CMakeLists.txt | 3 ++-
 cmake/rules_PyKF5.py     | 5 +++++
 src/core/CMakeLists.txt  | 1 -
 src/core/kconfigdata.h   | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 6d25988..96c7b65 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -16,7 +16,8 @@ if(NOT Qt5Concurrent_FOUND)
     return()
 endif()
 
-set(kentrymaptest_SRCS kentrymaptest.cpp)
+# compile KEntryMap into the test since it's not exported
+set(kentrymaptest_SRCS kentrymaptest.cpp ../src/core/kconfigdata.cpp)
 ecm_add_test(${kentrymaptest_SRCS}
   TEST_NAME kentrymaptest
   LINK_LIBRARIES KF5::ConfigCore Qt5::Test
diff --git a/cmake/rules_PyKF5.py b/cmake/rules_PyKF5.py
index 7d3f041..72bee90 100644
--- a/cmake/rules_PyKF5.py
+++ b/cmake/rules_PyKF5.py
@@ -107,6 +107,11 @@ 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 83e4f76..72a46b9 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -68,7 +68,6 @@ if (PythonModuleGeneration_FOUND)
       kconfig.h
       kconfigbackend.h
       kconfigbase.h
-      kconfigdata.h
       kconfiggroup.h
       kdesktopfile.h
       ksharedconfig.h
diff --git a/src/core/kconfigdata.h b/src/core/kconfigdata.h
index 5839dfd..a243016 100644
--- a/src/core/kconfigdata.h
+++ b/src/core/kconfigdata.h
@@ -157,7 +157,7 @@ QDebug operator<<(QDebug dbg, const KEntry &entry);
  * with the group name.
  * @internal
  */
-class KCONFIGCORE_EXPORT KEntryMap : public QMap<KEntryKey, KEntry>
+class KEntryMap : public QMap<KEntryKey, KEntry>
 {
 public:
     enum SearchFlag {
-- 
2.7.4



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic