Am Donnerstag, 2. Januar 2014, 15:30:20 schrieb David Faure:
> On Thursday 02 January 2014 14:06:47 Kevin Ottens wrote:
> > On Thursday 02 January 2014 12:25:47 David Faure wrote:
> > > On Thursday 02 January 2014 11:35:43 David Faure wrote:
> > > > See attached patch.
> > > 
> > > I forgot to attach the corresponding patch for ECM.
> > > 
> > > Tested on KParts too, with the addition of a "PREFIX" variable.
> > > 
> > > MODULE_NAME = KParts or KIOCore .. the include dir under KF5, always
> > > titlecase PREFIX = KParts or KIO, the subdir inside MODULE_NAME for
> > > namespaced headers, gets lowercased for lowercase headers.
> > > 
> > > include/KF5/KParts/KParts/BrowserExtension
> > > include/KF5/KParts/kparts/browserextension.h
> > > 
> > > Awaiting for green light.
> > 
> > That would be for the namespaced frameworks only right?
> > 
> > We still plan to have:
> > include/KF5/KCoreAddons/kjob.h
> > include/KF5/KCoreAddons/KJob
> > For the non namespace case?
> 
> Yes.
> 
> include/KF5/MODULE_NAME/the_thing_to_include
> where the_thing_to_include can include a prefix (namespaced headers) or not
> (non-namespaced headers).
> 
> I can see how it looks like duplication when the prefix is equal to the
> module name, but since it's not always the case (KIOCore vs KIO) and since
> there isn't always a prefix (non-namespaced headers), I think this makes
> things consistent.

What about KNewStuff3 forward headers?

There the used namespace does not match the module name:
namespace is "KNS3", the module name "KNewStuff3".
To confuse things, the name of the repo and in the framework is just knewstuff 
or KNewStuff, without the postfix 3, duh.

What about changing the namespace to "KNewStuff" in the framework, and making 
the KNS3 namespace an alias for it in the kde4support headers? Ah, not 
possible, the namespace is in the signature of some headers, so connections 
with SIGNAL() do pick that up literally, ignoring the namespace alias. Bummer.

So "KNS3" or "KNewStuff3" for the prefix? I would opt for "KNS3" to match the 
namespace, see attached patch. Currently the prefix is lowercase, thus wrong 
anyway :)

Cheers
Friedrich
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 05cd500..f217173 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -90,7 +90,7 @@ ecm_generate_headers(
 
   MODULE_NAME KNewStuff3
   REQUIRED_HEADERS KNewStuff_HEADERS
-  PREFIX knewstuff3
+  PREFIX KNS3
 )
 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KNewStuff3 DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
 
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to